diff options
author | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:08:39 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-08-26 01:08:39 -0700 |
commit | b4c27c186f6282ead5d2af0cfd9b6015b011bc38 (patch) | |
tree | 4ad1f74af2cd95e8cf0ee82a4b06d6c1ffae5611 /diff-lib.c | |
parent | 903acca75329841996bbf0c3a32a7cfeb3ae0d0f (diff) | |
parent | a7f051987c5f020e60da1e5d6ddefc3d443d3299 (diff) | |
download | git-b4c27c186f6282ead5d2af0cfd9b6015b011bc38.tar.gz |
Merge branch 'master' into gl/web
* master: (34 commits)
gitweb: git_annotate didn't expect negative numeric timezone
git-svn: add the 'dcommit' command
git-svn: recommend rebase for syncing against an SVN repo
git-svn: establish new connections on commit after fork
describe: fix off-by-one error in --abbrev=40 handling
git-svn(1): improve asciidoc markup
gitview.txt: improve asciidoc markup
git(7): put the synopsis in a verse style paragraph
gitk(1): expand the manpage to look less like a template
git-blame(1): mention options in the synopsis and advertise pickaxe
git-ls-remote(1): document --upload-pack
git-apply(1): document missing options and improve existing ones
update-index -g
n is in fact unused, and is later shadowed.
use name[len] in switch directly, instead of creating a shadowed variable.
builtin-grep.c: remove unused debugging piece.
remove ugly shadowing of loop indexes in subloops.
missing 'static' keywords
git_dir holds pointers to local strings, hence MUST be const.
avoid to use error that shadows the function name, use err instead.
...
Diffstat (limited to 'diff-lib.c')
-rw-r--r-- | diff-lib.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/diff-lib.c b/diff-lib.c index 116b5a9d68..9edfa92626 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -48,7 +48,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed) memcpy(dpath->path, ce->name, path_len); dpath->path[path_len] = '\0'; dpath->mode = 0; - memset(dpath->sha1, 0, 20); + hashclr(dpath->sha1); memset(&(dpath->parent[0]), 0, sizeof(struct combine_diff_parent)*5); @@ -66,8 +66,7 @@ int run_diff_files(struct rev_info *revs, int silent_on_removed) if (2 <= stage) { int mode = ntohl(nce->ce_mode); num_compare_stages++; - memcpy(dpath->parent[stage-2].sha1, - nce->sha1, 20); + hashcpy(dpath->parent[stage-2].sha1, nce->sha1); dpath->parent[stage-2].mode = canon_mode(mode); dpath->parent[stage-2].status = @@ -215,7 +214,7 @@ static int show_modified(struct rev_info *revs, } oldmode = old->ce_mode; - if (mode == oldmode && !memcmp(sha1, old->sha1, 20) && + if (mode == oldmode && !hashcmp(sha1, old->sha1) && !revs->diffopt.find_copies_harder) return 0; |