Re: [PATCH 2/2] fast-export: refactor get_tags_and_duplicates()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 3, 2013, 20:17 UTC
- Message-ID
- <xmqq38plr76b.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqsixlr8p2.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 11 quoted lines
> Felipe Contreras <felipe.contreras@gmail.com> writes: > >> Split into a separate helper function get_commit() so that the part that >> finds the relevant commit, and the part that does something with it >> (handle tag object, etc.) are in different places. >> >> No functional changes. > > Actually, the old code used to use commit unchecked if e->item->type > said it is OBJ_COMMIT but e->item was somehow NULL. The new code > checks ...
Nah, I am an idiot. We will segfault where we check e->item->type before reaching that far down the code either way, so this is really a no-op but makes it easier to fix (if we wanted to---I do not think it matters that much).