On Tue, Mar 19, 2013 at 08:58:23AM +0700, Duy Nguyen wrote: > On Tue, Mar 19, 2013 at 1:26 AM, John Keeping <john@xxxxxxxxxxxxx> wrote: > > On Fri, Mar 15, 2013 at 01:06:42PM +0700, Nguyễn Thái Ngọc Duy wrote: > >> This passes the pathspec, more or less unmodified, to > >> git-add--interactive. The command itself does not process pathspec. It > >> simply passes the pathspec to other builtin commands. So if all those > >> commands support pathspec, we're good. > > > > This breaks "git reset --keep" in a subdirectory for me. > > > > I ran "git reset --keep <branch>" in a subdirectory and got: > > > > fatal: BUG: parse_pathspec cannot take no argument in this case > > > > Bisecting points to this commit. > > > > The simplest test case is: > > > > ( cd t && ../bin-wrappers/git reset --keep HEAD ) > > > > which works on master but not pu. > > Beautiful. I got messed up with C operator precedence. This should fix > it. I'll check the rest of parse_pathspec calls later. Yes, this fixes it. Thanks. > diff --git a/builtin/reset.c b/builtin/reset.c > index ab3917d..b665218 100644 > --- a/builtin/reset.c > +++ b/builtin/reset.c > @@ -219,7 +219,7 @@ static void parse_args(struct pathspec *pathspec, > *rev_ret = rev; > parse_pathspec(pathspec, 0, > PATHSPEC_PREFER_FULL | > - patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0, > + (patch_mode ? PATHSPEC_PREFIX_ORIGIN : 0), > prefix, argv); > } > > -- > Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html