summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-02-27 23:15:53 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-02-28 01:06:06 -0800
commitcd673c1f17228d272c4b7f81fbb28bc31cf0cac6 (patch)
tree5e5537843e6b38f62a3b4f15437e4a3bf8ee89ab /diff.c
parentgit-repack: resist stray environment variable (diff)
downloadtgif-cd673c1f17228d272c4b7f81fbb28bc31cf0cac6.tar.xz
has_sha1_pack(): refactor "pretend these packs do not exist" interface
Most of the callers of this function except only one pass NULL to its last parameter, ignore_packed. Introduce has_sha1_kept_pack() function that has the function signature and the semantics of this function, and convert the sole caller that does not pass NULL to call this new function. All other callers and has_sha1_pack() lose the ignore_packed parameter. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index f91f256c56..a34d26c23f 100644
--- a/diff.c
+++ b/diff.c
@@ -1743,7 +1743,7 @@ static int reuse_worktree_file(const char *name, const unsigned char *sha1, int
* objects however would tend to be slower as they need
* to be individually opened and inflated.
*/
- if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1, NULL))
+ if (!FAST_WORKING_DIRECTORY && !want_file && has_sha1_pack(sha1))
return 0;
len = strlen(name);