Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted fixes for Git for windows #1

Merged
merged 16 commits into from
Feb 22, 2015

Commits on Feb 22, 2015

  1. Instead of swallowing the TZ environment variable, pass it on as MSYS_TZ

    It is true that pure Windows programs cannot handle the TZ variable
    well. However, the same is not true of Git, which handles the timezone
    environment variable quite well. Let's give it a chance by passing on
    the TZ environment variable as MSYS2_TZ.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    ea82e47 View commit details
    Browse the repository at this point in the history
  2. Do not add a trailing slash when converting / to a Win32 path

    This resembles MSys1' behavior on which Git's t0060 relies.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    466140f View commit details
    Browse the repository at this point in the history
  3. Stop assuming that there are no spaces in POSIX-style paths

    Git's test suite most prominently sports a POSIX path with a space in
    it: the tests are executed in directories whose names have the form
    'trash directory.t0123-blub'. Therefore, we *must* handle those names
    correctly.
    
    This fix makes Git's t1504-ceiling-dirs.sh pass.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    4a02039 View commit details
    Browse the repository at this point in the history
  4. Pass environment variables with empty values

    There is a difference between an empty value and an unset environment
    variable. We should not confuse both; If the user wants to unset an
    environment variable, they can certainly do so (unsetenv(3), or in the
    shell: 'unset ABC').
    
    This fixes Git's t3301-notes.sh, which overrides environment variables
    with empty values.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    ff4ba3e View commit details
    Browse the repository at this point in the history
  5. Handle 8-bit characters under LOCALE=C

    Even when the character set is specified as ASCII, we should handle data
    outside the 7-bit range gracefully by simply copying it, even if it is
    technically no longer ASCII.
    
    This fixes several of Git for Windows' tests, e.g. t7400.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    0e94254 View commit details
    Browse the repository at this point in the history
  6. Mention the extremely useful small_printf() function

    It came in real handy while debugging an issue that strace 'fixed'.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    fde9a71 View commit details
    Browse the repository at this point in the history
  7. Add a helpful debug message for posix-to-windows conversion

    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    9248ddb View commit details
    Browse the repository at this point in the history
  8. Avoid unnecessary recursion in find_path_start_and_type()

    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    7ebcbd6 View commit details
    Browse the repository at this point in the history
  9. Leave arguments starting with a tilde or quote alone

    It is not a good idea to expand, say, ~/.gitconfig partially: replacing
    it by ~C:\msys64\.gitconfig is most likely the wrong thing to do!
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    58c420d View commit details
    Browse the repository at this point in the history
  10. Leave Git's :name and :/message arguments alone, please

    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    7c9da7b View commit details
    Browse the repository at this point in the history
  11. Leave paths containing any special characters alone

    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    4692941 View commit details
    Browse the repository at this point in the history
  12. Leave paths containing '/~' alone

    We do not perform tilde expansion in the MSys2 runtime; let's leave
    those paths intact for programs that want to expand such paths
    themselves.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    4191193 View commit details
    Browse the repository at this point in the history
  13. Skip posix-to-windows conversion when '::' is seen

    The substring '::' most likely denotes an IPv6 address, not a path.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    e24f358 View commit details
    Browse the repository at this point in the history
  14. Also leave Git's <rev>:./<name> syntax alone

    This fixes Git's t1506-rev-parse-diagnosis.sh
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    9ee8a80 View commit details
    Browse the repository at this point in the history
  15. Arguments starting with '@@' are no paths

    ... so let's skip posix-to-windows conversion on such parameters.
    
    This fixes Git's t1508-at-combinations.sh.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    379db4b View commit details
    Browse the repository at this point in the history
  16. Prevent scp-style arguments from being mangled

    An argument like me@example.com:/tmp/ is not something we should convert
    into a Windows path; Use the absence of a slash before the colon as a
    tell-tale that it is *not* a POSIX path list (exception: if the part
    left of the colon is "." or "..").
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 22, 2015
    Configuration menu
    Copy the full SHA
    aefedc0 View commit details
    Browse the repository at this point in the history