Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-25 Thread Johannes Schindelin
Hi Junio, On Wed, 24 Feb 2016, Junio C Hamano wrote: > Junio C Hamano writes: > > > Johannes Schindelin writes: > > > >> diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh > >> index 91235b7..f62409e 100755 > >> --- a/t/t1308-config-set.sh > >> +++ b/t/t1308-config-set.sh > >> @@ -218,

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh >> index 91235b7..f62409e 100755 >> --- a/t/t1308-config-set.sh >> +++ b/t/t1308-config-set.sh >> @@ -218,4 +218,13 @@ test_expect_success 'check line errors for malformed >> val

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Junio C Hamano
Johannes Schindelin writes: > diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh > index 91235b7..f62409e 100755 > --- a/t/t1308-config-set.sh > +++ b/t/t1308-config-set.sh > @@ -218,4 +218,13 @@ test_expect_success 'check line errors for malformed > values' ' > test_i18ngrep "fata

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Duy Nguyen
On Wed, Feb 24, 2016 at 8:26 PM, Johannes Schindelin wrote: > Hi Duy, > > On Wed, 24 Feb 2016, Duy Nguyen wrote: > >> On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: >> > + die("not in a git directory"); >> >> Maybe wrap this string with _() for translation? Then we

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Johannes Schindelin
Hi Duy, On Wed, 24 Feb 2016, Duy Nguyen wrote: > On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: > > + die("not in a git directory"); > > Maybe wrap this string with _() for translation? Then we can pile this > patch on top to fix the rest in builtin/config.c. Giv

Re: [PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Duy Nguyen
On Wed, Feb 24, 2016 at 01:48:11PM +0100, Johannes Schindelin wrote: > + die("not in a git directory"); Maybe wrap this string with _() for translation? Then we can pile this patch on top to fix the rest in builtin/config.c. -- 8< -- Subject: [PATCH] builtin/config.c: mark strings for

[PATCH v2] git config: report when trying to modify a non-existing repo config

2016-02-24 Thread Johannes Schindelin
It is a pilot error to call `git config section.key value` outside of any Git worktree. The message error: could not lock config file .git/config: No such file or directory is not very helpful in that situation, though. Let's print a helpful message instead. Signed-off-by: Johann