Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-24 Thread Junio C Hamano
Jeff King writes: > There is an open question of how carefully we want to document it, but I > think the strategy so far has been: > > - if you want to be careful, use "--" > > - if you don't, git will use black magic to guess, but that magic is >subject to change, so don't

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-24 Thread Jeff King
On Fri, Nov 24, 2017 at 10:01:41AM +0900, Junio C Hamano wrote: > Actually the second example is a lot worse (and that is why I am > bringing it up). If git does spend cycles to realize that "git > could", for consistency, it must also check if "next" is unambiguous > between a path or a rev,

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-24 Thread Jeff King
On Thu, Nov 23, 2017 at 09:55:03PM +0100, Kevin Daudt wrote: > > > > Without a disambiguating `--`, Git makes a reasonable guess. If it > > > > cannot guess (because your request is ambiguous), then it will error > > > > out. > [...] > > > 1) even without the "--", git can generally parse

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-23 Thread Junio C Hamano
Kevin Daudt writes: > Just for completeness, as it is somewhat covered by point 1 already, but > there are cases where there is no real ambiguity but you are required to > add '--' to tell git that it should not look for the file in the working > tree: > > $ git show abc123

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-23 Thread Kevin Daudt
On Thu, Nov 23, 2017 at 08:51:55AM -0500, Jeff King wrote: > On Thu, Nov 23, 2017 at 02:45:44AM -0500, Robert P. J. Day wrote: > > > > It's pretty clear to me as it is, but maybe we can write it differently. > > > Like: > > > > > > Without a disambiguating `--`, Git makes a reasonable guess. If

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-23 Thread Jeff King
On Thu, Nov 23, 2017 at 02:45:44AM -0500, Robert P. J. Day wrote: > > It's pretty clear to me as it is, but maybe we can write it differently. > > Like: > > > > Without a disambiguating `--`, Git makes a reasonable guess. If it > > cannot guess (because your request is ambiguous), then it

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Robert P. J. Day
On Wed, 22 Nov 2017, Jeff King wrote: > On Tue, Nov 21, 2017 at 10:45:52PM +0100, Kevin Daudt wrote: > > > > - * Without disambiguating `--`, Git makes a reasonable guess, but errors > > > - out and asking you to disambiguate when ambiguous. E.g. if you have a > > > + * Without a

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Junio C Hamano
Jeff King writes: > I read the rest of the thread, and I think the question here is not > about Git's behavior, but about parsing this sentence. > > Without a "--" Git can sometimes do what you want. Or it may error out, > if what you asked for is ambiguous. And that sentence is

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Jeff King
On Tue, Nov 21, 2017 at 10:45:52PM +0100, Kevin Daudt wrote: > > - * Without disambiguating `--`, Git makes a reasonable guess, but errors > > - out and asking you to disambiguate when ambiguous. E.g. if you have a > > + * Without a disambiguating `--`, Git makes a reasonable guess, but can >

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Robert P. J. Day
On Wed, 22 Nov 2017, Kevin Daudt wrote: > On Wed, Nov 22, 2017 at 06:19:23AM -0500, Robert P. J. Day wrote: > > On Wed, 22 Nov 2017, Junio C Hamano wrote: > > > > > "Robert P. J. Day" writes: > > > > > > > git repo with a file called "Gemfile", so i created a branch called

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Kevin Daudt
On Wed, Nov 22, 2017 at 06:19:23AM -0500, Robert P. J. Day wrote: > On Wed, 22 Nov 2017, Junio C Hamano wrote: > > > "Robert P. J. Day" writes: > > > > > git repo with a file called "Gemfile", so i created a branch called > > > "Gemfile", and when i ran: > > > > > > $

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Robert P. J. Day
On Wed, 22 Nov 2017, Junio C Hamano wrote: > "Robert P. J. Day" writes: > > > git repo with a file called "Gemfile", so i created a branch called > > "Gemfile", and when i ran: > > > > $ git checkout Gemfile > > > > git switched to the branch. so even with the ambiguity,

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Junio C Hamano
"Robert P. J. Day" writes: > git repo with a file called "Gemfile", so i created a branch called > "Gemfile", and when i ran: > > $ git checkout Gemfile > > git switched to the branch. so even with the ambiguity, git obviously > has some sort of precedence order it

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-22 Thread Robert P. J. Day
On Tue, 21 Nov 2017, Kevin Daudt wrote: > On Tue, Nov 21, 2017 at 04:27:59PM -0500, Robert P. J. Day wrote: > > No major changes, just some rewording and showing some variations of > > general Git commands. > > > > Signed-off-by: Robert P. J. Day > > > > --- > > > > diff

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-21 Thread Robert P. J. Day
On Tue, 21 Nov 2017, Kevin Daudt wrote: > On Tue, Nov 21, 2017 at 04:47:42PM -0500, Robert P. J. Day wrote: > > On Tue, 21 Nov 2017, Kevin Daudt wrote: > > > > > On Tue, Nov 21, 2017 at 04:27:59PM -0500, Robert P. J. Day wrote: > > > > No major changes, just some rewording and showing some

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-21 Thread Kevin Daudt
On Tue, Nov 21, 2017 at 04:47:42PM -0500, Robert P. J. Day wrote: > On Tue, 21 Nov 2017, Kevin Daudt wrote: > > > On Tue, Nov 21, 2017 at 04:27:59PM -0500, Robert P. J. Day wrote: > > > No major changes, just some rewording and showing some variations of > > > general Git commands. > > > > > >

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-21 Thread Robert P. J. Day
On Tue, 21 Nov 2017, Kevin Daudt wrote: > On Tue, Nov 21, 2017 at 04:27:59PM -0500, Robert P. J. Day wrote: > > No major changes, just some rewording and showing some variations of > > general Git commands. > > > > Signed-off-by: Robert P. J. Day > > > > --- > > > > diff

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-21 Thread Kevin Daudt
On Tue, Nov 21, 2017 at 04:27:59PM -0500, Robert P. J. Day wrote: > No major changes, just some rewording and showing some variations of > general Git commands. > > Signed-off-by: Robert P. J. Day > > --- > > diff --git a/Documentation/gitcli.txt

[PATCH v2] gitcli: tweak "man gitcli" for clarity

2017-11-21 Thread Robert P. J. Day
No major changes, just some rewording and showing some variations of general Git commands. Signed-off-by: Robert P. J. Day --- diff --git a/Documentation/gitcli.txt b/Documentation/gitcli.txt index 9f13266a6..d690d1ff0 100644 --- a/Documentation/gitcli.txt +++