Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Duy Nguyen
On Sat, Dec 8, 2018 at 6:37 PM Robert P. J. Day  wrote:
>
> On Sat, 8 Dec 2018, Duy Nguyen wrote:
>
> > On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day  
> > wrote:
> > >
> > > On Sat, 8 Dec 2018, Duy Nguyen wrote:
> > >
> > > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  
> > > > wrote:
> > > > >
> > > > >
> > > > >   from "man git-reset":
> > > > >
> > > > > SYNOPSIS
> > > > >   git reset [-q] [] [--] ...
> > > > >   git reset (--patch | -p) [] [--] [...]
> > > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> > > > > []
> > > > >
> > > > > oddly, the third form says nothing about possible "", even
> > > > > though i'm pretty sure they're valid in that third case (at least
> > > > > for "--mixed"). thoughts? is that just an oversight in the man
> > > > > page?
> > > >
> > > > --mixed prints a deprecation warning. I don't think it's worth
> > > > making the synopsis more complicated for that. All other modes
> > > > reject pathspec.
> > >
> > >   i just tested this, and i don't see a deprecation warning.
> >
> > Hmm.. maybe I misread the code. I just tried it
> >
> > $ ./git reset --mixed HEAD foo
> > warning: --mixed with paths is deprecated; use 'git reset -- ' 
> > instead.
>
>   weird ... i just tried this two ways, explicitly specifying
> "--mixed" and also without (which is the default mode, right?), and i
> got the deprecated message with the first but not the second. that
> seems ... odd.

Without --mixed, you're using the first form

git reset [-q] [] [--] ...

which accepts pathspec. If it's not clear, of course patches are welcome.
-- 
Duy


Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Robert P. J. Day
On Sat, 8 Dec 2018, Duy Nguyen wrote:

> On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day  wrote:
> >
> > On Sat, 8 Dec 2018, Duy Nguyen wrote:
> >
> > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  
> > > wrote:
> > > >
> > > >
> > > >   from "man git-reset":
> > > >
> > > > SYNOPSIS
> > > >   git reset [-q] [] [--] ...
> > > >   git reset (--patch | -p) [] [--] [...]
> > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> > > > []
> > > >
> > > > oddly, the third form says nothing about possible "", even
> > > > though i'm pretty sure they're valid in that third case (at least
> > > > for "--mixed"). thoughts? is that just an oversight in the man
> > > > page?
> > >
> > > --mixed prints a deprecation warning. I don't think it's worth
> > > making the synopsis more complicated for that. All other modes
> > > reject pathspec.
> >
> >   i just tested this, and i don't see a deprecation warning.
>
> Hmm.. maybe I misread the code. I just tried it
>
> $ ./git reset --mixed HEAD foo
> warning: --mixed with paths is deprecated; use 'git reset -- ' instead.

  my test:

  Changes to be committed:
(use "git reset HEAD ..." to unstage)

modified:   README.asc
modified:   Rakefile

  $ git reset -- README.asc
  Unstaged changes after reset:
  M README.asc
  $ git reset --mixed -- Rakefile
  warning: --mixed with paths is deprecated; use 'git reset -- ' instead.
  Unstaged changes after reset:
  M README.asc
  M Rakefile
  $

that definitely seems inconsistent.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
  http://crashcourse.ca/dokuwiki

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday




Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Robert P. J. Day
On Sat, 8 Dec 2018, Duy Nguyen wrote:

> On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day  wrote:
> >
> > On Sat, 8 Dec 2018, Duy Nguyen wrote:
> >
> > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  
> > > wrote:
> > > >
> > > >
> > > >   from "man git-reset":
> > > >
> > > > SYNOPSIS
> > > >   git reset [-q] [] [--] ...
> > > >   git reset (--patch | -p) [] [--] [...]
> > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> > > > []
> > > >
> > > > oddly, the third form says nothing about possible "", even
> > > > though i'm pretty sure they're valid in that third case (at least
> > > > for "--mixed"). thoughts? is that just an oversight in the man
> > > > page?
> > >
> > > --mixed prints a deprecation warning. I don't think it's worth
> > > making the synopsis more complicated for that. All other modes
> > > reject pathspec.
> >
> >   i just tested this, and i don't see a deprecation warning.
>
> Hmm.. maybe I misread the code. I just tried it
>
> $ ./git reset --mixed HEAD foo
> warning: --mixed with paths is deprecated; use 'git reset -- ' instead.

  weird ... i just tried this two ways, explicitly specifying
"--mixed" and also without (which is the default mode, right?), and i
got the deprecated message with the first but not the second. that
seems ... odd.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
  http://crashcourse.ca/dokuwiki

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday



Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Duy Nguyen
On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day  wrote:
>
> On Sat, 8 Dec 2018, Duy Nguyen wrote:
>
> > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  
> > wrote:
> > >
> > >
> > >   from "man git-reset":
> > >
> > > SYNOPSIS
> > >   git reset [-q] [] [--] ...
> > >   git reset (--patch | -p) [] [--] [...]
> > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> > > []
> > >
> > > oddly, the third form says nothing about possible "", even
> > > though i'm pretty sure they're valid in that third case (at least
> > > for "--mixed"). thoughts? is that just an oversight in the man
> > > page?
> >
> > --mixed prints a deprecation warning. I don't think it's worth
> > making the synopsis more complicated for that. All other modes
> > reject pathspec.
>
>   i just tested this, and i don't see a deprecation warning.

Hmm.. maybe I misread the code. I just tried it

$ ./git reset --mixed HEAD foo
warning: --mixed with paths is deprecated; use 'git reset -- ' instead.
-- 
Duy


Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Robert P. J. Day
On Sat, 8 Dec 2018, Duy Nguyen wrote:

> On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  wrote:
> >
> >
> >   from "man git-reset":
> >
> > SYNOPSIS
> >   git reset [-q] [] [--] ...
> >   git reset (--patch | -p) [] [--] [...]
> >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> > []
> >
> > oddly, the third form says nothing about possible "", even
> > though i'm pretty sure they're valid in that third case (at least
> > for "--mixed"). thoughts? is that just an oversight in the man
> > page?
>
> --mixed prints a deprecation warning. I don't think it's worth
> making the synopsis more complicated for that. All other modes
> reject pathspec.

  i just tested this, and i don't see a deprecation warning.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
  http://crashcourse.ca/dokuwiki

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday



Re: why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Duy Nguyen
On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day  wrote:
>
>
>   from "man git-reset":
>
> SYNOPSIS
>   git reset [-q] [] [--] ...
>   git reset (--patch | -p) [] [--] [...]
>   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] 
> []
>
> oddly, the third form says nothing about possible "", even
> though i'm pretty sure they're valid in that third case (at least for
> "--mixed"). thoughts? is that just an oversight in the man page?

--mixed prints a deprecation warning. I don't think it's worth making
the synopsis more complicated for that. All other modes reject
pathspec.
-- 
Duy


why doesn't "git reset" mention optional pathspec?

2018-12-08 Thread Robert P. J. Day


  from "man git-reset":

SYNOPSIS
  git reset [-q] [] [--] ...
  git reset (--patch | -p) [] [--] [...]
  git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] []

oddly, the third form says nothing about possible "", even
though i'm pretty sure they're valid in that third case (at least for
"--mixed"). thoughts? is that just an oversight in the man page?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
  http://crashcourse.ca/dokuwiki

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday