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

Re: Clean up sha1 file writing

From
Junio C Hamano <junkio@cox.net>
Date
May 24, 2006, 20:46 UTC
Message-ID
<7vslmz5ewt.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605240820560.5623@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 13 quoted lines
> ... On the other hand, from a longer-term 
> maintenance standpoint and from a "be much more careful when doing file 
> writes" standpoint, I think it's worth it.
>
> The re-write is "obviously correct" (famous last words) and is mostly 
> just moving code around and getting rid of a few temporaries that become 
> unnecessary as a result.
>
> The patch looks a bit messy: the changes aren't actually that big, but the 
> split-up and the resulting re-indentation makes the patch fairly 
> unreadable, so the cleanups are more obvious when you look at the 
> before-and-after side by side rather than when looking at the unified 
> diff..)

I usually work in text-only terminal, but with the above warning, I did this:

	git cat-file -p HEAD^:sha1_file.c >/var/tmp/1
        xxdiff /var/tmp/1 sha1_file.c
        
with ignorespace and stuff enabled.  It was very pleasant to
read the changes that way, especially around write_sha1_to_fd()
vs repack_object().  xxdiff is my new friend.
Previous: H. Peter AnvinNext: Linus Torvalds
Message 10 of 15 in “Clean up sha1 file writing”
  1. Linus TorvaldsMay 24, 2006
  2. Matthias LederhoferMay 24, 2006
  3. Linus TorvaldsMay 24, 2006
  4. H. Peter AnvinJun 2, 2006
  5. Linus TorvaldsJun 2, 2006
  6. H. Peter AnvinJun 4, 2006
  7. Linus TorvaldsJun 4, 2006
  8. Linus TorvaldsJun 4, 2006
  9. H. Peter AnvinJun 4, 2006
  10. Junio C HamanoMay 24, 2006
  11. Linus TorvaldsMay 24, 2006
  12. Junio C HamanoMay 25, 2006
  13. SeanMay 25, 2006
  14. Junio C HamanoMay 26, 2006
  15. cat-file: document -p optionJeff King, May 25, 2006

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.