summaryrefslogtreecommitdiff
path: root/clone-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'clone-pack.c')
-rw-r--r--clone-pack.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/clone-pack.c b/clone-pack.c
index a99a95c5f2..b5ce5d3111 100644
--- a/clone-pack.c
+++ b/clone-pack.c
@@ -259,8 +259,17 @@ static int clone_pack(int fd[2], int nr_match, char **match)
status = clone_without_unpack(fd);
- if (!status)
- write_refs(refs);
+ if (!status) {
+ if (nr_match == 0)
+ write_refs(refs);
+ else
+ while (refs) {
+ printf("%s %s\n",
+ sha1_to_hex(refs->old_sha1),
+ refs->name);
+ refs = refs->next;
+ }
+ }
return status;
}