* [PATCH] Minor grammar fix in the 'Not a git repository' message [not found] <cover.1234825069u.git.johannes.schindelin@gmx.de> @ 2009-02-16 22:58 ` Johannes Schindelin 2009-02-16 23:27 ` Wincent Colaiuta 2009-02-16 23:33 ` Junio C Hamano 0 siblings, 2 replies; 8+ messages in thread From: Johannes Schindelin @ 2009-02-16 22:58 UTC (permalink / raw) To: git, gitster; +Cc: Richard Hartmann It might cause less head-scratching to say 'nor any of the parent directories' than 'or ...' after saying that this is not a git repository. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- setup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/setup.c b/setup.c index 6c2deda..05bd462 100644 --- a/setup.c +++ b/setup.c @@ -386,7 +386,7 @@ const char *setup_git_directory_gently(int *nongit_ok) *nongit_ok = 1; return NULL; } - die("Not a git repository (or any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT); + die("Not a git repository (nor any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT); } if (chdir("..")) die("Cannot change to %s/..: %s", cwd, strerror(errno)); -- 1.6.2.rc0.397.g19ae22 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Minor grammar fix in the 'Not a git repository' message 2009-02-16 22:58 ` [PATCH] Minor grammar fix in the 'Not a git repository' message Johannes Schindelin @ 2009-02-16 23:27 ` Wincent Colaiuta 2009-02-16 23:33 ` Junio C Hamano 1 sibling, 0 replies; 8+ messages in thread From: Wincent Colaiuta @ 2009-02-16 23:27 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git, gitster, Richard Hartmann El 16/2/2009, a las 23:58, Johannes Schindelin escribió: > It might cause less head-scratching to say 'nor any of the parent > directories' than 'or ...' after saying that this is not a git > repository. > > - die("Not a git repository (or any of the parent directories): > %s", DEFAULT_GIT_DIR_ENVIRONMENT); > + die("Not a git repository (nor any of the parent directories): > %s", DEFAULT_GIT_DIR_ENVIRONMENT); Or could just avoid the whole "or/nor" construct entirely by just saying? "Not inside a git repository" ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Minor grammar fix in the 'Not a git repository' message 2009-02-16 22:58 ` [PATCH] Minor grammar fix in the 'Not a git repository' message Johannes Schindelin 2009-02-16 23:27 ` Wincent Colaiuta @ 2009-02-16 23:33 ` Junio C Hamano 2009-02-17 0:17 ` [PATCH] " Nicolas Sebrecht 1 sibling, 1 reply; 8+ messages in thread From: Junio C Hamano @ 2009-02-16 23:33 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git, Richard Hartmann Johannes Schindelin <johannes.schindelin@gmx.de> writes: > It might cause less head-scratching to say 'nor any of the parent > directories' than 'or ...' after saying that this is not a git > repository. > ... > + die("Not a git repository (nor any of the parent directories): %s", DEFAULT_GIT_DIR_ENVIRONMENT); > } > if (chdir("..")) > die("Cannot change to %s/..: %s", cwd, strerror(errno)); The grammar may be more correct, but I wonder if the parenthesised part is adding any value to the message or instead it is making the message more confusing. You will get this message when you are in /a/b/c/d and no .git subdirectory was found in /a/b/c/d, nor in /a/b/c, nor in /a/b,... But the message sounds as if the command expected ".git" to be either (1) a git repository (which is false, because ".git" would mean /a/b/c/d/.git and there is no git repository there), or (2) a parent directory (of something unspecified, but a natural interpretation is "where you are"), i.e. "I wanted you to be somewhere inside .git". That obviously is not what you wanted to say. "No git repository ".git" found here nor in any of the parent directories" might be an improvement, though. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] Re: Minor grammar fix in the 'Not a git repository' message 2009-02-16 23:33 ` Junio C Hamano @ 2009-02-17 0:17 ` Nicolas Sebrecht 2009-02-17 0:51 ` Junio C Hamano 0 siblings, 1 reply; 8+ messages in thread From: Nicolas Sebrecht @ 2009-02-17 0:17 UTC (permalink / raw) To: Junio C Hamano; +Cc: git On Mon, Feb 16, 2009 at 03:33:56PM -0800, Junio C Hamano wrote: > "No git repository ".git" found here nor in any of the parent directories" What about bare repositories ? The message "Not inside a git repository" of Wincent looks like the clearest and the fairest one. -- Nicolas Sebrecht ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Minor grammar fix in the 'Not a git repository' message 2009-02-17 0:17 ` [PATCH] " Nicolas Sebrecht @ 2009-02-17 0:51 ` Junio C Hamano 2009-02-17 3:16 ` Boyd Stephen Smith Jr. 2009-02-17 8:50 ` Lars Noschinski 0 siblings, 2 replies; 8+ messages in thread From: Junio C Hamano @ 2009-02-17 0:51 UTC (permalink / raw) To: Nicolas Sebrecht; +Cc: git Nicolas Sebrecht <nicolas.s-dev@laposte.net> writes: > The message > "Not inside a git repository" > of Wincent looks like the clearest and the fairest one. I tend to agree. I was only trying to see if we can salvage a more precise diagnosis f66bc5f (Always show which directory is not a git repository, 2008-12-22) tried to give users, but to do it throughly the sentence will become even more awkward. "Not inside a bare git repository nor a work tree that has .git/ somewhere in it." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Minor grammar fix in the 'Not a git repository' message 2009-02-17 0:51 ` Junio C Hamano @ 2009-02-17 3:16 ` Boyd Stephen Smith Jr. 2009-02-17 9:29 ` Jakub Narebski 2009-02-17 8:50 ` Lars Noschinski 1 sibling, 1 reply; 8+ messages in thread From: Boyd Stephen Smith Jr. @ 2009-02-17 3:16 UTC (permalink / raw) To: Junio C Hamano; +Cc: Nicolas Sebrecht, git [-- Attachment #1: Type: text/plain, Size: 720 bytes --] On Monday 16 February 2009 18:51:03 Junio C Hamano wrote: > Nicolas Sebrecht <nicolas.s-dev@laposte.net> writes: > > The message > > "Not inside a git repository" > > of Wincent looks like the clearest and the fairest one. > > I tend to agree. I was only trying to see if we can salvage a more > precise diagnosis f66bc5f (Always show which directory is not a git > repository, 2008-12-22) tried to give users. "Not in a git repository or work tree: %s", DEFAULT_GIT_DIR_ENVIRONMENT ? -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/ [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Minor grammar fix in the 'Not a git repository' message 2009-02-17 3:16 ` Boyd Stephen Smith Jr. @ 2009-02-17 9:29 ` Jakub Narebski 0 siblings, 0 replies; 8+ messages in thread From: Jakub Narebski @ 2009-02-17 9:29 UTC (permalink / raw) To: Boyd Stephen Smith Jr.; +Cc: Junio C Hamano, Nicolas Sebrecht, git "Boyd Stephen Smith Jr." <bss@iguanasuicide.net> writes: > On Monday 16 February 2009 18:51:03 Junio C Hamano wrote: > > Nicolas Sebrecht <nicolas.s-dev@laposte.net> writes: > > > The message > > > "Not inside a git repository" > > > of Wincent looks like the clearest and the fairest one. > > > > I tend to agree. I was only trying to see if we can salvage a more > > precise diagnosis f66bc5f (Always show which directory is not a git > > repository, 2008-12-22) tried to give users. > > "Not in a git repository or work tree: %s", DEFAULT_GIT_DIR_ENVIRONMENT > ? "Not in a git repository or in a work tree: %s" perhaps... cwd or DEFAULT_GIT_DIR_ENVIRONMENT? -- Jakub Narebski Poland ShadeHawk on #git ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Re: Minor grammar fix in the 'Not a git repository' message 2009-02-17 0:51 ` Junio C Hamano 2009-02-17 3:16 ` Boyd Stephen Smith Jr. @ 2009-02-17 8:50 ` Lars Noschinski 1 sibling, 0 replies; 8+ messages in thread From: Lars Noschinski @ 2009-02-17 8:50 UTC (permalink / raw) To: Junio C Hamano; +Cc: Nicolas Sebrecht, git * Junio C Hamano <gitster@pobox.com> [09-02-17 01:51]: >Nicolas Sebrecht <nicolas.s-dev@laposte.net> writes: > >> The message >> "Not inside a git repository" >> of Wincent looks like the clearest and the fairest one. > >I tend to agree. I was only trying to see if we can salvage a more >precise diagnosis f66bc5f (Always show which directory is not a git >repository, 2008-12-22) tried to give users, but to do it throughly the >sentence will become even more awkward. > > "Not inside a bare git repository nor a work tree that has .git/ somewhere in it." I think f66bc5f used the wrong path for the error message. If the comment above this part of the code is accurate, cwd is which should be belonging to a git repository, so I would suggest die("Not inside a git repository: %s", cwd) - Lars. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-17 9:30 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1234825069u.git.johannes.schindelin@gmx.de> 2009-02-16 22:58 ` [PATCH] Minor grammar fix in the 'Not a git repository' message Johannes Schindelin 2009-02-16 23:27 ` Wincent Colaiuta 2009-02-16 23:33 ` Junio C Hamano 2009-02-17 0:17 ` [PATCH] " Nicolas Sebrecht 2009-02-17 0:51 ` Junio C Hamano 2009-02-17 3:16 ` Boyd Stephen Smith Jr. 2009-02-17 9:29 ` Jakub Narebski 2009-02-17 8:50 ` Lars Noschinski
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).