Re: [PATCH] sha1_name: remove ONELINE_SEEN bit
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 19, 2016, 07:49 UTC
- Message-ID
- <alpine.DEB.2.20.1610190949040.197091@virtualbox>
- In-Reply-To
- <xmqqd1ixphog.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Tue, 18 Oct 2016, Junio C Hamano wrote:
Show 16 quoted lines
> 28a4d94044 ("object name: introduce ':/<oneline prefix>' notation",
> 2007-02-24) started using its own bit from object->flags to mark
> commits used while parsing the ":/token" extended SHA-1 syntax to
> name a commit temporarily, and this was kept even when f7bff00314
> ("sha1_name.c: fix parsing of ":/token" syntax", 2010-08-02) found
> and fixed a bug in its implementation.
>
> The use of that flag bit, however, is limited to a single function,
> get_sha1_oneline(), which first sets it for the commits sitting at
> the tips of refs, uses the bit to avoid duplicate traversal while
> walking the history, and then cleans the bit from all commits it
> walked.
>
> Which is exactly what the general-purpose TMP_MARK bit meant to be
> used for isolated case was invented for. Replace ONELINE_SEEN with
> TMP_MARK and retire the former.ACK, Dscho