Re: [PATCH 1/3] t9350: point out that refs are not updated correctly
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 25, 2012, 07:34 UTC
- Message-ID
- <20121025073454.GB15790@elie.Belkin>
- In-Reply-To
- <CAGdFq_hgYPF5eeCB9hSsjVfUyEhkBNJAtzoNuNqs5N6V-+w9Hg@mail.gmail.com>
Sverre Rabbelier wrote:
Show 7 quoted lines
> That's weird, we have this bit: > > + if (elem->whence != REV_CMD_REV && elem->whence != REV_CMD_RIGHT) > + continue; > > If I understand correctly that should cause it to only output revs > (e.g. 'foo1') and the rhs side of a have..want spec.
If I remember right, '^foo1' is (whence == REV_CMD_REV) with (flags == UNINTERESTING). That's why sequencer.c checks for unadorned revs like this:
if (opts->revs->cmdline.nr == 1 &&
opts->revs->cmdline.rev->whence == REV_CMD_REV &&
opts->revs->no_walk &&
!opts->revs->cmdline.rev->flags) {Maybe
if (elem->flags & UNINTERESTING) continue; if (elem->whence == REV_CMD_PARENTS_ONLY) /* foo^@ */ continue;
would work well here? That would handle bizarre cases like "--not next..master" (and ordinary cases like "master...next") better, by focusing on the semantics instead of syntax.