Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git-for-windows/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 57190aee^
Choose a base ref
...
head repository: git-for-windows/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 57190aee^2
Choose a head ref
  • 3 commits
  • 7 files changed
  • 2 contributors

Commits on May 27, 2015

  1. config: factor out repeated code

    Factor out near identical per-file logic.
    
    Signed-off-by: Karsten Blees <[email protected]>
    Signed-off-by: Johannes Schindelin <[email protected]>
    kblees authored and dscho committed May 27, 2015
    Configuration menu
    Copy the full SHA
    7612a76 View commit details
    Browse the repository at this point in the history
  2. config.c: create missing parent directories when modifying config files

    'git config' (--add / --unset etc.) automatically creates missing config
    files. However, it fails with a misleading error message "could not lock
    config file" if the parent directory doesn't exist.
    
    Also create missing parent directories.
    
    This is particularly important when calling
    
    	git config -f /non/existing/directory/config ...
    
    Signed-off-by: Karsten Blees <[email protected]>
    Signed-off-by: Johannes Schindelin <[email protected]>
    kblees authored and dscho committed May 27, 2015
    Configuration menu
    Copy the full SHA
    fd9fa26 View commit details
    Browse the repository at this point in the history
  3. Windows: add support for a Windows-wide configuration

    Between the libgit2 and the Git for Windows project, there has been a
    discussion how we could share Git configuration to avoid duplication (or
    worse: skew).
    
    Earlier, libgit2 was nice enough to just re-use Git for Windows'
    
    	C:\Program Files (x86)\Git\etc\gitconfig
    
    but with the upcoming Git for Windows 2.x, there would be more paths to
    search, as we will have 64-bit and 32-bit versions, and the
    corresponding config files will be in %PROGRAMFILES%\Git\mingw64\etc and
    ...\mingw32\etc, respectively.
    
    Worse: there are portable Git for Windows versions out there which live
    in totally unrelated directories, still.
    
    Therefore we came to a consensus to use `%PROGRAMDATA%\Git\config` as the
    location for shared Git settings that are of wider interest than just Git
    for Windows.
    
    On XP, there is no %PROGRAMDATA%, therefore we need to use
    "%ALLUSERSPROFILE%\Application Data\Git\config" in those setups.
    
    Of course, the configuration in `%PROGRAMDATA%\Git\config` has the
    widest reach, therefore it must take the lowest precedence, i.e. Git for
    Windows can still override settings in its `etc/gitconfig` file.
    
    Signed-off-by: Johannes Schindelin <[email protected]>
    dscho committed May 27, 2015
    Configuration menu
    Copy the full SHA
    4b738e2 View commit details
    Browse the repository at this point in the history
Loading