summaryrefslogtreecommitdiff
path: root/patch-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-30 07:07:39 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-30 17:35:49 (GMT)
commit9d429ff6ff2832d6e63933e6d33b8380be703017 (patch)
tree6d154648564180b6a18e0b40edc99160e812f868 /patch-delta.c
parent01c4e70f637c0617e24d9a7abb7239e25de9a51d (diff)
downloadgit-9d429ff6ff2832d6e63933e6d33b8380be703017.zip
git-9d429ff6ff2832d6e63933e6d33b8380be703017.tar.gz
git-9d429ff6ff2832d6e63933e6d33b8380be703017.tar.bz2
[PATCH] diff: further cleanup.
When preparing data to feed the external diff, we should give the mode we obtained from the caller, even when we are dealing with a file with 0{40} SHA1 (i.e. the caller said "look at the filesystem"), since the mode passed by the caller via diff_addremove() or diff_change() is always trustworthy. This is _not_ a bugfix --- the existing code stat() on the file ifself and does the same computation on st.st_mode to compute the mode the same way the caller did to give the original mode. We cannot remove the stat() call from here, but the extra computation to create the mode value is unnecessary. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'patch-delta.c')
0 files changed, 0 insertions, 0 deletions