Re: Clean up sha1 file writing

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Clean up sha1 file writing

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:27

Linus Torvalds [off-list ref] writes:
... 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.

Re: Clean up sha1 file writing

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:27


On Wed, 24 May 2006, Junio C Hamano wrote:
It was very pleasant to read the changes that way, especially around 
write_sha1_to_fd() vs repack_object().  xxdiff is my new friend.
I think "kompare" (the KDE diff tool) is nicer.

I'm tolf xxdiff integrates with some of the other SCM tools well (svn and 
tla), so it people use xxdiff, maybe it could support the git way of doing 
things too..

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help