git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Junio C Hamano
Message 2 of 2 in “sha1_name: remove ONELINE_SEEN bit”
  1. sha1_name: remove ONELINE_SEEN bitJunio C Hamano, Oct 18, 2016
  2. Johannes SchindelinOct 19, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.