On Mon, Jun 01, 2015 at 06:20:46AM -0400, Jeff King wrote: > So I think what you really want is lookup_commit_reference. And the > error message is really not "invalid tag", but "not a commit". I think > you can just use lookup_commit_or_die.
Thanks. That does seem to be what I want.
> As an aside, now that we are dereferencing, these flags are from the
> wrong object. They _should_ be the same (we mark the tag as
> UNINTERESTING, too), but it's a little weird that at the end of the
> function we restore the saved flags from the tag object onto the commit.
> Just bumping the assignment of flags{1,2} would work (or just bump up
> the lookup_commit_or_die call to where we assign to o{1,2}).
I tried looking up the flags after dereferencing the tags, but that led
to the die("Not a range.") being triggered. That's why the commit
message ended up mentioning loading the flags before dereferencing.
> I think this avoids the usual "wc" whitespace pitfall because you don't
> use double-quotes. But maybe:
>
> grep "^From " patch1 >count &&
> test_line_count = 2 patch1
>
> would be more idiomatic.
I can certainly make that change. I made the test as similar as
possible to other tests in the area, but I wasn't aware of
test_line_count.
I'll reroll the patch later today.
--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
signature.asc
Description: Digital signature

