Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fetch: use free_refs()
author
Jeff King
<peff@peff.net>
Sat, 13 Apr 2019 05:54:09 +0000
(
01:54
-0400)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 15 Apr 2019 05:00:51 +0000
(14:00 +0900)
There's no need for us to write this loop manually when a helper
function can already do it.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch-pack.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
533ddba
)
diff --git
a/fetch-pack.c
b/fetch-pack.c
index e69993b2eb56885253af21b6de33fd487725e313..a181d3401d1e46e641a0212e09b6b1f056019bf0 100644
(file)
--- a/
fetch-pack.c
+++ b/
fetch-pack.c
@@
-630,10
+630,7
@@
static void filter_refs(struct fetch_pack_args *args,
}
oidset_clear(&tip_oids);
- for (ref = unmatched; ref; ref = next) {
- next = ref->next;
- free(ref);
- }
+ free_refs(unmatched);
*refs = newlist;
}