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

Re: reset reports file as modified when it's in fact deleted

From
Jeff King <peff@peff.net>
Date
Nov 14, 2011, 22:50 UTC
Message-ID
<20111114225056.GA27370@sigill.intra.peff.net>
In-Reply-To
<7vhb2aqjwu.fsf@alter.siamese.dyndns.org>
On Fri, Nov 11, 2011 at 04:11:29PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> > I'm happy to make that change. What do you think of the feature overall?
> 
> The "feature" is more or less "Meh" to me; I do not mind differentiating M
> and D there because the necessary information is already there in the
> codepath, but if we were to really do that, then the variables must be
> renamed. We shouldn't name them after "you must do this at the plumbing
> level" like we have done so far, and instead use "the path is in this
> state". This is even more so if we were to further split a single "state"
> that plumbing layer considers the same and gives the same "needs X" to
> different states that Porcelains would give different messages in the
> future.

I admit I don't care all that much either, but it's easy to do, and I think it is less surprising to users. Patches are below.

Show 6 quoted lines
> > And should typechanges also be handled here (it's no extra work for git
> > to detect them; we just have to pass the TYPE_CHANGED flag back up the
> > stack)?
> 
> As long as "pass ... back up the stack" does not result in too much
> ugliness in the code, I am OK with it.

It ended up pretty simple, but I split it out from the deletion case so you can see it more clearly (and can drop the latter half of the series if we don't want it).

  [1/4]: refresh_index: rename format variables
  [2/4]: refresh_index: mark deletions in porcelain output
  [3/4]: read-cache: let refresh_cache_ent pass up changed flags
  [4/4]: refresh_index: notice typechanges in output

(If I were sure we wanted the typechange output, I think a more reasonable ordering would be 1, then 3, then squash 2 and 4 into a single patch. But see my comment in 4/4).

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 7 of 18 in “reset reports file as modified when it's in fact deleted”
  1. Carlos Martín NietoNov 7, 2011
  2. Jeff KingNov 7, 2011
  3. Carlos Martín NietoNov 11, 2011
  4. Junio C HamanoNov 11, 2011
  5. Jeff KingNov 11, 2011
  6. Junio C HamanoNov 12, 2011
  7. Jeff KingNov 14, 2011
  8. 1/4 refresh_index: rename format variablesJeff King, Nov 14, 2011
  9. 2/4 refresh_index: mark deletions in porcelain outputJeff King, Nov 14, 2011
  10. 3/4 read-cache: let refresh_cache_ent pass up changed flagsJeff King, Nov 14, 2011
  11. 4/4 refresh_index: notice typechanges in outputJeff King, Nov 14, 2011
  12. Junio C HamanoNov 15, 2011
  13. Jeff KingNov 15, 2011
  14. Jeff KingNov 18, 2011
  15. 1/3 read-cache: let refresh_cache_ent pass up changed flagsJeff King, Nov 18, 2011
  16. 2/3 refresh_index: rename format variablesJeff King, Nov 18, 2011
  17. 3/3 refresh_index: make porcelain output more specificJeff King, Nov 18, 2011
  18. Junio C HamanoNov 18, 2011

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.