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

Re: [PATCH] filter-branch: resolve $commit^{tree} in no-index case

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 19, 2016, 22:23 UTC
Message-ID
<xmqqr3hd8azs.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160119220722.GB6556@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
> Actually, I ended up not including the part about doing that comparison.
> So the commit message isn't _wrong_, but it is incomplete. This
> paragraph:
>
>   However, the value of $tree here is technically
>   user-visible. The user can provide arbitrary shell code at
>   this stage, which could itself have a similar assumption to
>   what is in git_commit_non_empty_tree. So the conservative
>   choice to fix this regression is to take the 20% hit and
>   give the pre-348d4f2 behavior.
>
> should start with something like:
>
>   We could try to make git_commit_non_empty_tree more clever.
>
> to make it clear why we care about the user-visibility of the variable
> in the first place.
>
> Here is a re-roll with that fixup.

Thanks. I failed to spot and realize that $tree is also part of what we expose and end-user scripts may already be looking at when I commented, and I agree with the reasoning behind this conservative route.

Will queue.
Previous: Jeff KingNext: Jeff King
Message 9 of 19 in “git filter-branch not removing commits when it should in 2.7.0”
  1. John FultzJan 19, 2016
  2. Junio C HamanoJan 19, 2016
  3. Junio C HamanoJan 19, 2016
  4. Jeff KingJan 19, 2016
  5. Junio C HamanoJan 19, 2016
  6. filter-branch: resolve $commit^{tree} in no-index caseJeff King, Jan 19, 2016
  7. Jeff KingJan 19, 2016
  8. Jeff KingJan 19, 2016
  9. Junio C HamanoJan 19, 2016
  10. Jeff KingJan 19, 2016
  11. Jeff KingJan 19, 2016
  12. Jonathan NiederJan 20, 2016
  13. Jeff KingJan 20, 2016
  14. Junio C HamanoJan 20, 2016
  15. Jeff KingJan 20, 2016
  16. Junio C HamanoJan 20, 2016
  17. Junio C HamanoJan 20, 2016
  18. Jeff KingJan 20, 2016
  19. Jonathan NiederJan 20, 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.