Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas_Sandström <lukass@etek.chalmers.se>2005-11-09 04:22:40 +0300
committerJunio C Hamano <junkio@cox.net>2005-11-12 08:19:10 +0300
commitc283ab21c1b8198fe2297cca678aa2fa3dd76e75 (patch)
tree940de2458a13656e88d70fee664e0575fcda516c /sha1_file.c
parentfd66dbf5297a4badec8c2accf8a0f9bd72e3f693 (diff)
Add git-pack-intersect
This patch adds the program git-pack-intersect. It is used to find redundant packs in git repositories. Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 946a35346b..cd814d7233 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -424,6 +424,7 @@ struct packed_git *add_packed_git(char *path, int path_len, int local)
struct packed_git *p;
unsigned long idx_size;
void *idx_map;
+ char sha1[20];
if (check_packed_git_idx(path, &idx_size, &idx_map))
return NULL;
@@ -447,6 +448,8 @@ struct packed_git *add_packed_git(char *path, int path_len, int local)
p->pack_last_used = 0;
p->pack_use_cnt = 0;
p->pack_local = local;
+ if (!get_sha1_hex(path + path_len - 40 - 4, sha1))
+ memcpy(p->sha1, sha1, 20);
return p;
}