git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Philip Oakley <philipoakley@iee.email>
Cc: Junio C Hamano <gitster@pobox.com>,
	git-for-windows@googlegroups.com, git@vger.kernel.org,
	git-packagers@googlegroups.com
Subject: Re: [git-for-windows] Git for Windows v2.24.0-rc0, was Re: [ANNOUNCE] Git v2.24.0-rc0
Date: Fri, 25 Oct 2019 01:08:16 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.1910250052350.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <74f50326-e613-8545-2c69-65cd29dd3cfb@iee.email>

[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]

Hi Philip,

On Tue, 22 Oct 2019, Philip Oakley wrote:

> The minor pedant did notice that the new location is listed slightly
> differently from the release notes.
> `file:C:/Program Files/Git/mingw64/../etc/gitconfig`  --system,
> while the release notes simplify the path to C:/Program
> Files/Git/etc/gitconfig

That's a good point. I guess that it would make sense to normalize the
location of the system gitconfig:

-- snip --
Subject: [PATCH] config: normalize the path of the system gitconfig

Git for Windows is compiled with a runtime prefix, and that runtime
prefix is typically `C:/Program Files/Git/mingw64`. As we want the
system gitconfig to live in the sibling directory `etc`, we define the
relative path as `../etc/gitconfig`.

However, as reported by Philip Oakley, the output of `git config
--show-origin --system -l` looks rather ugly, as it shows the path as
`file:C:/Program Files/Git/mingw64/../etc/gitconfig`, i.e. with the
`mingw64/../` part.

By normalizing the path, we get a prettier path.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/config.c b/config.c
index e7052b39773..8e2f4748c49 100644
--- a/config.c
+++ b/config.c
@@ -1658,8 +1658,10 @@ static int git_config_from_blob_ref(config_fn_t fn,
 const char *git_etc_gitconfig(void)
 {
 	static const char *system_wide;
-	if (!system_wide)
+	if (!system_wide) {
 		system_wide = system_path(ETC_GITCONFIG);
+		normalize_path_copy((char *)system_wide, system_wide);
+	}
 	return system_wide;
 }

--
2.24.0.rc1.windows.1
-- snap --

See also https://github.com/git-for-windows/git/pull/2370

Ciao,
Dscho

  reply	other threads:[~2019-10-24 23:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18  6:29 [ANNOUNCE] Git v2.24.0-rc0 Junio C Hamano
2019-10-21 20:48 ` Derrick Stolee
2019-10-21 23:04   ` Elijah Newren
2019-10-22  6:42     ` Jeff King
2019-10-21 22:05 ` Git for Windows v2.24.0-rc0, was " Johannes Schindelin
2019-10-22 14:50   ` [git-for-windows] " Philip Oakley
2019-10-24 23:08     ` Johannes Schindelin [this message]
2019-10-24 23:34       ` Jeff King
2019-10-25  8:18         ` Johannes Schindelin
2019-10-25 16:58           ` Jeff King
2019-10-24 18:24   ` Bryan Turner
2019-10-24 22:52     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.1910250052350.46@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=git-for-windows@googlegroups.com \
    --cc=git-packagers@googlegroups.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=philipoakley@iee.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).