Re: [PATCH] git-config: handle --file option with relative pathname properly
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 9, 2007, 13:14 UTC
- Message-ID
- <Pine.LNX.4.64.0710091413500.4174@racer.site>
- In-Reply-To
- <20071009124932.1184.qmail@395d4a80f3eafd.315fe32.mid.smarden.org>
Hi,
On Tue, 9 Oct 2007, Gerrit Pape wrote:
Show 6 quoted lines
> @@ -189,7 +189,11 @@ int cmd_config(int argc, const char **argv, const char *prefix)
> else if (!strcmp(argv[1], "--file") || !strcmp(argv[1], "-f")) {
> if (argc < 3)
> usage(git_config_set_usage);
> - setenv(CONFIG_ENVIRONMENT, argv[2], 1);
> + if (argv[2][0] == '/')Please use is_absolute_path() instead.
Ciao, Dscho