Re: [PATCH v3 3/4] name-rev: provide debug output
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 31, 2017, 16:55 UTC
- Message-ID
- <xmqqpogxz8pv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <xmqqtw69z8vz.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 8 quoted lines
> The only case that this change may make a difference I can think of > is when you have a tag object pointed at from outside refs/tags > (e.g. refs/heads/foo is a tag object); if you are trying to change > the definition of "from_tag" from the current "Is the tip inside > refs/tags/?" to "Is the tip either inside refs/tags/ or is it a tag > object anywhere?", that may be a good change (I didn't think things > through, though), but that shouldn't be hidden inside a commit that > claims to only add support for debugging.
And if that "a tag object outside refs/tags/" is what you are solving, I think a better place to do it is in name_ref().
Instead of saying "from_tag is true iff it starts with refs/tags/", you'd say "... or deref is set to true, because we know that the original was a tag object in that case".
Show 14 quoted lines
> What problem are you solving?
>
>> @@ -236,7 +273,6 @@ static int name_ref(const char *path, const struct object_id *oid, int flags, vo
>> }
>>
>> add_to_tip_table(oid->hash, path, can_abbreviate_output);
>> -
>> while (o && o->type == OBJ_TAG) {
>> struct tag *t = (struct tag *) o;
>> if (!t->tagged)
>
> This is a patch noise we can do without.
>
> Thanks.