Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fetch: make own copies of refnames
author
Michael Haggerty
<mhagger@alum.mit.edu>
Sat, 25 May 2013 09:08:01 +0000
(11:08 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 28 May 2013 16:25:00 +0000
(09:25 -0700)
Do not retain references to refnames passed to the each_ref_fn
callback add_existing(), because their lifetime is not guaranteed.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
219a0f3
)
diff --git
a/builtin/fetch.c
b/builtin/fetch.c
index 4b6b1dfe66952a7e3fb1516e7e14473febde3d2d..f9491154ee44c7adbe6ca2c05b54f70da5f1fc17 100644
(file)
--- a/
builtin/fetch.c
+++ b/
builtin/fetch.c
@@
-590,7
+590,7
@@
static void find_non_local_tags(struct transport *transport,
struct ref **head,
struct ref ***tail)
{
struct ref **head,
struct ref ***tail)
{
- struct string_list existing_refs = STRING_LIST_INIT_
NO
DUP;
+ struct string_list existing_refs = STRING_LIST_INIT_DUP;
struct string_list remote_refs = STRING_LIST_INIT_NODUP;
const struct ref *ref;
struct string_list_item *item = NULL;
struct string_list remote_refs = STRING_LIST_INIT_NODUP;
const struct ref *ref;
struct string_list_item *item = NULL;
@@
-693,7
+693,7
@@
static int truncate_fetch_head(void)
static int do_fetch(struct transport *transport,
struct refspec *refs, int ref_count)
{
static int do_fetch(struct transport *transport,
struct refspec *refs, int ref_count)
{
- struct string_list existing_refs = STRING_LIST_INIT_
NO
DUP;
+ struct string_list existing_refs = STRING_LIST_INIT_DUP;
struct string_list_item *peer_item = NULL;
struct ref *ref_map;
struct ref *rm;
struct string_list_item *peer_item = NULL;
struct ref *ref_map;
struct ref *rm;