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

Re: Memory overrun in http-push.c

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Mar 4, 2007, 09:18 UTC
Message-ID
<Pine.LNX.4.64.0703040335110.6485@iabervon.org>
In-Reply-To
<7virdh76kh.fsf@assigned-by-dhcp.cox.net>
On Sun, 4 Mar 2007, Junio C Hamano wrote:
Show 13 quoted lines
> Daniel Barkalow <barkalow@iabervon.org> writes:
> 
> > Actually, how about doing keyword expansion just like the new CRLF
> > handling?
> 
> That part is true, but practically speaking the only thing you
> can honestly replace is $Id$ with blob object name, and nothing
> else.  Trying to put anything that is available via commit would
> at best telling a lie and at worst ending up denying the index
> (and denying the index is denying git as somebody said).  You
> could fake the values for $Author$ and $Date$ from HEAD commit,
> but your index may or may not match HEAD commit when you check
> out path from it.

I was somehow expecting the index to be on the "working directory" side of conversions, but that obviously doesn't work very well (since you'd get a ton of unreachable blobs all the time that way). Even so, I think the useful thing would the the "git-describe" for HEAD, if the index entry is actually from HEAD (otherwise, it's a state that nobody else has seen, right? No point in trying to specify further...). I don't think Author and Date from a commit really works, because they wouldn't actually reflect the last change to anything near the tag, necessarily. The commit hash, on the other hand, tends you what to run blame on.

But, in any case, $Id <blob hash>$ would put into the working directory file (and suitable installed derivates thereof) something that would lead people with the repository to the actual blob, with at least a possible context. $Id <commit hash>:<path>$, for <commit hash>=HEAD, if HEAD:<path> is <blob hash>, should be just right.

Is it common to check out files from the index which don't match HEAD? The only case I can think of is resetting to a state stored in the index with update-index. I think my personal workflow is always HEAD->index->working directory->index->new HEAD.

	-Daniel
*This .sig left intentionally blank*
Previous: Junio C HamanoNext: Alex Riesen
Message 27 of 39 in “Memory overrun in http-push.c”
  1. Eygene RyabinkinFeb 28, 2007
  2. Andy ParkinsFeb 28, 2007
  3. Johannes SchindelinFeb 28, 2007
  4. Eygene RyabinkinMar 1, 2007
  5. Alex RiesenMar 1, 2007
  6. Eygene RyabinkinMar 1, 2007
  7. Alex RiesenMar 1, 2007
  8. Eygene RyabinkinMar 1, 2007
  9. Junio C HamanoMar 1, 2007
  10. Alex RiesenMar 1, 2007
  11. Andy ParkinsMar 1, 2007
  12. Eygene RyabinkinMar 1, 2007
  13. Junio C HamanoMar 1, 2007
  14. Eygene RyabinkinMar 1, 2007
  15. Johannes SchindelinMar 1, 2007
  16. Andy ParkinsMar 1, 2007
  17. Johannes SchindelinMar 1, 2007
  18. Andy ParkinsMar 1, 2007
  19. Johannes SchindelinMar 1, 2007
  20. Andy ParkinsMar 2, 2007
  21. Jakub NarebskiMar 2, 2007
  22. Andy ParkinsMar 2, 2007
  23. Johannes SchindelinMar 2, 2007
  24. Andy ParkinsMar 2, 2007
  25. Daniel BarkalowMar 4, 2007
  26. Junio C HamanoMar 4, 2007
  27. Daniel BarkalowMar 4, 2007
  28. Alex RiesenMar 1, 2007
  29. Shawn O. PearceMar 1, 2007
  30. Uwe Kleine-KönigMar 1, 2007
  31. Jakub NarebskiMar 2, 2007
  32. Johannes SchindelinMar 2, 2007
  33. identifying blobs (was Re: Memory overrun in http-push.c)Junio C Hamano, Mar 2, 2007
  34. Linus TorvaldsMar 2, 2007
  35. Andy ParkinsMar 2, 2007
  36. Matthieu MoyMar 2, 2007
  37. Andy ParkinsMar 2, 2007
  38. Florian WeimerFeb 28, 2007
  39. Eygene RyabinkinMar 1, 2007

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.