{"thread":{"id":"49979","subject":"why doesn't \"git reset\" mention optional pathspec?","startedAt":"2018-12-08T16:05:53Z","lastAt":"2018-12-09T01:42:29Z","messageCount":8,"participants":["Robert P. J. Day","Duy Nguyen","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"364804","messageId":"alpine.LFD.2.21.1812081103500.29142@localhost.localdomain","threadId":"49979","inReplyTo":null,"subject":"why doesn't \"git reset\" mention optional pathspec?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-12-08T16:05:46Z","receivedAt":"2018-12-08T16:05:53Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  from \"man git-reset\":\n\nSYNOPSIS\n  git reset [-q] [<tree-ish>] [--] <paths>...\n  git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n  git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n\noddly, the third form says nothing about possible \"<paths>\", even\nthough i'm pretty sure they're valid in that third case (at least for\n\"--mixed\"). thoughts? is that just an oversight in the man page?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"364815","messageId":"CACsJy8APyyAWM+L=HU1XM4V+qdTWqjto6x=Q06By8DbgtYfpCA@mail.gmail.com","threadId":"49979","inReplyTo":"alpine.LFD.2.21.1812081103500.29142@localhost.localdomain","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-08T17:28:09Z","receivedAt":"2018-12-08T17:29:06Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n>\n>   from \"man git-reset\":\n>\n> SYNOPSIS\n>   git reset [-q] [<tree-ish>] [--] <paths>...\n>   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n>   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n>\n> oddly, the third form says nothing about possible \"<paths>\", even\n> though i'm pretty sure they're valid in that third case (at least for\n> \"--mixed\"). thoughts? is that just an oversight in the man page?\n\n--mixed prints a deprecation warning. I don't think it's worth making\nthe synopsis more complicated for that. All other modes reject\npathspec.\n-- \nDuy\n"},{"id":"364816","messageId":"alpine.LFD.2.21.1812081232240.32380@localhost.localdomain","threadId":"49979","inReplyTo":"CACsJy8APyyAWM+L=HU1XM4V+qdTWqjto6x=Q06By8DbgtYfpCA@mail.gmail.com","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-12-08T17:32:55Z","receivedAt":"2018-12-08T17:33:01Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Sat, 8 Dec 2018, Duy Nguyen wrote:\n\n> On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> >\n> >\n> >   from \"man git-reset\":\n> >\n> > SYNOPSIS\n> >   git reset [-q] [<tree-ish>] [--] <paths>...\n> >   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n> >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n> >\n> > oddly, the third form says nothing about possible \"<paths>\", even\n> > though i'm pretty sure they're valid in that third case (at least\n> > for \"--mixed\"). thoughts? is that just an oversight in the man\n> > page?\n>\n> --mixed prints a deprecation warning. I don't think it's worth\n> making the synopsis more complicated for that. All other modes\n> reject pathspec.\n\n  i just tested this, and i don't see a deprecation warning.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"364817","messageId":"CACsJy8AC-anZ=EA3zxWeX8UUNcZiKsQMu8x0eCHAOCUjFWoFuQ@mail.gmail.com","threadId":"49979","inReplyTo":"alpine.LFD.2.21.1812081232240.32380@localhost.localdomain","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-08T17:34:36Z","receivedAt":"2018-12-08T17:35:04Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n> On Sat, 8 Dec 2018, Duy Nguyen wrote:\n>\n> > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> > >\n> > >\n> > >   from \"man git-reset\":\n> > >\n> > > SYNOPSIS\n> > >   git reset [-q] [<tree-ish>] [--] <paths>...\n> > >   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n> > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n> > >\n> > > oddly, the third form says nothing about possible \"<paths>\", even\n> > > though i'm pretty sure they're valid in that third case (at least\n> > > for \"--mixed\"). thoughts? is that just an oversight in the man\n> > > page?\n> >\n> > --mixed prints a deprecation warning. I don't think it's worth\n> > making the synopsis more complicated for that. All other modes\n> > reject pathspec.\n>\n>   i just tested this, and i don't see a deprecation warning.\n\nHmm.. maybe I misread the code. I just tried it\n\n$ ./git reset --mixed HEAD foo\nwarning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.\n-- \nDuy\n"},{"id":"364818","messageId":"alpine.LFD.2.21.1812081236220.32716@localhost.localdomain","threadId":"49979","inReplyTo":"CACsJy8AC-anZ=EA3zxWeX8UUNcZiKsQMu8x0eCHAOCUjFWoFuQ@mail.gmail.com","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-12-08T17:37:25Z","receivedAt":"2018-12-08T17:37:33Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Sat, 8 Dec 2018, Duy Nguyen wrote:\n\n> On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> >\n> > On Sat, 8 Dec 2018, Duy Nguyen wrote:\n> >\n> > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> > > >\n> > > >\n> > > >   from \"man git-reset\":\n> > > >\n> > > > SYNOPSIS\n> > > >   git reset [-q] [<tree-ish>] [--] <paths>...\n> > > >   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n> > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n> > > >\n> > > > oddly, the third form says nothing about possible \"<paths>\", even\n> > > > though i'm pretty sure they're valid in that third case (at least\n> > > > for \"--mixed\"). thoughts? is that just an oversight in the man\n> > > > page?\n> > >\n> > > --mixed prints a deprecation warning. I don't think it's worth\n> > > making the synopsis more complicated for that. All other modes\n> > > reject pathspec.\n> >\n> >   i just tested this, and i don't see a deprecation warning.\n>\n> Hmm.. maybe I misread the code. I just tried it\n>\n> $ ./git reset --mixed HEAD foo\n> warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.\n\n  weird ... i just tried this two ways, explicitly specifying\n\"--mixed\" and also without (which is the default mode, right?), and i\ngot the deprecated message with the first but not the second. that\nseems ... odd.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"},{"id":"364819","messageId":"alpine.LFD.2.21.1812081239480.3382@localhost.localdomain","threadId":"49979","inReplyTo":"CACsJy8AC-anZ=EA3zxWeX8UUNcZiKsQMu8x0eCHAOCUjFWoFuQ@mail.gmail.com","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2018-12-08T17:42:20Z","receivedAt":"2018-12-08T17:42:26Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Sat, 8 Dec 2018, Duy Nguyen wrote:\n\n> On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> >\n> > On Sat, 8 Dec 2018, Duy Nguyen wrote:\n> >\n> > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> > > >\n> > > >\n> > > >   from \"man git-reset\":\n> > > >\n> > > > SYNOPSIS\n> > > >   git reset [-q] [<tree-ish>] [--] <paths>...\n> > > >   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n> > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n> > > >\n> > > > oddly, the third form says nothing about possible \"<paths>\", even\n> > > > though i'm pretty sure they're valid in that third case (at least\n> > > > for \"--mixed\"). thoughts? is that just an oversight in the man\n> > > > page?\n> > >\n> > > --mixed prints a deprecation warning. I don't think it's worth\n> > > making the synopsis more complicated for that. All other modes\n> > > reject pathspec.\n> >\n> >   i just tested this, and i don't see a deprecation warning.\n>\n> Hmm.. maybe I misread the code. I just tried it\n>\n> $ ./git reset --mixed HEAD foo\n> warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.\n\n  my test:\n\n  Changes to be committed:\n    (use \"git reset HEAD <file>...\" to unstage)\n\n  \tmodified:   README.asc\n  \tmodified:   Rakefile\n\n  $ git reset -- README.asc\n  Unstaged changes after reset:\n  M\tREADME.asc\n  $ git reset --mixed -- Rakefile\n  warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.\n  Unstaged changes after reset:\n  M\tREADME.asc\n  M\tRakefile\n  $\n\nthat definitely seems inconsistent.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n\n"},{"id":"364820","messageId":"CACsJy8A_vaVUt389O5ABa+vsrVDgo1L3WZzVx+P0qfiaY9=p1w@mail.gmail.com","threadId":"49979","inReplyTo":"alpine.LFD.2.21.1812081236220.32716@localhost.localdomain","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-12-08T18:17:28Z","receivedAt":"2018-12-08T18:17:56Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Sat, Dec 8, 2018 at 6:37 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n>\n> On Sat, 8 Dec 2018, Duy Nguyen wrote:\n>\n> > On Sat, Dec 8, 2018 at 6:32 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> > >\n> > > On Sat, 8 Dec 2018, Duy Nguyen wrote:\n> > >\n> > > > On Sat, Dec 8, 2018 at 5:08 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:\n> > > > >\n> > > > >\n> > > > >   from \"man git-reset\":\n> > > > >\n> > > > > SYNOPSIS\n> > > > >   git reset [-q] [<tree-ish>] [--] <paths>...\n> > > > >   git reset (--patch | -p) [<tree-ish>] [--] [<paths>...]\n> > > > >   git reset [--soft | --mixed [-N] | --hard | --merge | --keep] [-q] [<commit>]\n> > > > >\n> > > > > oddly, the third form says nothing about possible \"<paths>\", even\n> > > > > though i'm pretty sure they're valid in that third case (at least\n> > > > > for \"--mixed\"). thoughts? is that just an oversight in the man\n> > > > > page?\n> > > >\n> > > > --mixed prints a deprecation warning. I don't think it's worth\n> > > > making the synopsis more complicated for that. All other modes\n> > > > reject pathspec.\n> > >\n> > >   i just tested this, and i don't see a deprecation warning.\n> >\n> > Hmm.. maybe I misread the code. I just tried it\n> >\n> > $ ./git reset --mixed HEAD foo\n> > warning: --mixed with paths is deprecated; use 'git reset -- <paths>' instead.\n>\n>   weird ... i just tried this two ways, explicitly specifying\n> \"--mixed\" and also without (which is the default mode, right?), and i\n> got the deprecated message with the first but not the second. that\n> seems ... odd.\n\nWithout --mixed, you're using the first form\n\n    git reset [-q] [<tree-ish>] [--] <paths>...\n\nwhich accepts pathspec. If it's not clear, of course patches are welcome.\n-- \nDuy\n"},{"id":"364830","messageId":"xmqqftv75vcz.fsf@gitster-ct.c.googlers.com","threadId":"49979","inReplyTo":"CACsJy8A_vaVUt389O5ABa+vsrVDgo1L3WZzVx+P0qfiaY9=p1w@mail.gmail.com","subject":"Re: why doesn't \"git reset\" mention optional pathspec?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-12-09T01:42:20Z","receivedAt":"2018-12-09T01:42:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Duy Nguyen <pclouds@gmail.com> writes:\n\n> Without --mixed, you're using the first form\n>\n>     git reset [-q] [<tree-ish>] [--] <paths>...\n>\n> which accepts pathspec. If it's not clear, of course patches are welcome.\n\nYup.  The deprecation is about spelling with \"--mixed\" when invoking\nthe \"restore these paths out of tree-ish (or HEAD when omitted)\nonly in the index\" mode.  The feature is of course not deprecated\n(but it might have been better if it were \"git checkout --cached\").\n\n"}]}