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

Re: Should reset_revision_walk clear more flags?

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2016, 07:26 UTC
Message-ID
<xmqqmvga6dmb.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20161205054013.taosbwjamxiwzocn@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> Which I think would include both of the flags you mentioned, along with
> others like SYMMETRIC_LEFT, PATCHSAME, etc. Probably really everything
> mentioned in revision.h, which should be summed up as ALL_REV_FLAGS.
> Some callsites already seem to feed that to clear_commit_marks().
>
> I doubt you can go too wrong by clearing more flags. 
This and ...
Show 5 quoted lines
> It's possible that
> some caller is relying on a flag _not_ being cleared between two
> traversals, but in that case it should probably be using
> clear_commit_marks() or clear_object_flags() explicitly to make it clear
> what it expects to be saved.
... this are contradictory, no?  

A caller may use two sets of its own flags in addition to letting the traversal machinery use the basic ones, and it may want to keep one of its own two sets while clearing the other set. It would clear_commit_marks() to clear the latter. And then it would let that the next traversal to reset_revision_walk() clear the basic ones.

So if you make reset_revision_walk() clear "more flags", that would break such a caller that is using clear_commit_marks() to make it clear what its expectations are, no?

I dunno.
Previous: Jeff KingNext: Jeff King
Message 4 of 5 in “Should reset_revision_walk clear more flags?”
  1. Mike HommeyDec 4, 2016
  2. Mike HommeyDec 4, 2016
  3. Jeff KingDec 5, 2016
  4. Junio C HamanoDec 5, 2016
  5. Jeff KingDec 5, 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.