diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-16 17:10:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-16 17:10:28 -0700 |
commit | 88bbda08d7b9503862a8fb8846d78c67825e5e3d (patch) | |
tree | 1eb8c68123ee29f1eb1ade9065041d8009ab95dc /diff.c | |
parent | dd33927ccdb92205988ba98bb2bb7df47529cd6d (diff) | |
parent | 473a189b92b70295157d20fe229d44824061c79f (diff) | |
download | git-88bbda08d7b9503862a8fb8846d78c67825e5e3d.tar.gz git-88bbda08d7b9503862a8fb8846d78c67825e5e3d.tar.xz |
Merge branch 'maint'
* maint:
Start preparing 1.5.6.4 release notes
git fetch-pack: do not complain about "no common commits" in an empty repo
rebase-i: keep old parents when preserving merges
t7600-merge: Use test_expect_failure to test option parsing
Fix buffer overflow in prepare_attr_stack
Fix buffer overflow in git diff
Fix buffer overflow in git-grep
git-cvsserver: fix call to nonexistant cleanupWorkDir()
Documentation/git-cherry-pick.txt et al.: Fix misleading -n description
Conflicts:
RelNotes
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -3412,9 +3412,8 @@ int diff_result_code(struct diff_options *opt, int status) void diff_addremove(struct diff_options *options, int addremove, unsigned mode, const unsigned char *sha1, - const char *base, const char *path) + const char *concatpath) { - char concatpath[PATH_MAX]; struct diff_filespec *one, *two; if (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(mode)) @@ -3436,9 +3435,6 @@ void diff_addremove(struct diff_options *options, addremove = (addremove == '+' ? '-' : addremove == '-' ? '+' : addremove); - if (!path) path = ""; - sprintf(concatpath, "%s%s", base, path); - if (options->prefix && strncmp(concatpath, options->prefix, options->prefix_length)) return; @@ -3459,9 +3455,8 @@ void diff_change(struct diff_options *options, unsigned old_mode, unsigned new_mode, const unsigned char *old_sha1, const unsigned char *new_sha1, - const char *base, const char *path) + const char *concatpath) { - char concatpath[PATH_MAX]; struct diff_filespec *one, *two; if (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK(old_mode) @@ -3474,8 +3469,6 @@ void diff_change(struct diff_options *options, tmp = old_mode; old_mode = new_mode; new_mode = tmp; tmp_c = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_c; } - if (!path) path = ""; - sprintf(concatpath, "%s%s", base, path); if (options->prefix && strncmp(concatpath, options->prefix, options->prefix_length)) |