diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-11-02 00:15:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-02 00:15:22 -0700 |
commit | aebd173ffa7a4e67447f0157a14abde7767c54e9 (patch) | |
tree | 2c3c660e441d93120a42cfac5c909dcbd2f5b275 /builtin-send-pack.c | |
parent | Merge git://repo.or.cz/git-gui (diff) | |
parent | Start 1.6.0.4 cycle (diff) | |
download | tgif-aebd173ffa7a4e67447f0157a14abde7767c54e9.tar.xz |
Merge branch 'maint'
* maint:
Start 1.6.0.4 cycle
add instructions on how to send patches to the mailing list with Gmail
Documentation/gitattributes: Add subsection header for each attribute
git send-email: avoid leaking directory file descriptors.
send-pack: do not send out single-level refs such as refs/stash
fix overlapping memcpy in normalize_absolute_path
pack-objects: avoid reading uninitalized data
correct cache_entry allocation
Conflicts:
RelNotes
Diffstat (limited to 'builtin-send-pack.c')
-rw-r--r-- | builtin-send-pack.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin-send-pack.c b/builtin-send-pack.c index 910db92b62..d68ce2d0e3 100644 --- a/builtin-send-pack.c +++ b/builtin-send-pack.c @@ -140,7 +140,13 @@ static struct ref *remote_refs, **remote_tail; static int one_local_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data) { struct ref *ref; - int len = strlen(refname) + 1; + int len; + + /* we already know it starts with refs/ to get here */ + if (check_ref_format(refname + 5)) + return 0; + + len = strlen(refname) + 1; ref = xcalloc(1, sizeof(*ref) + len); hashcpy(ref->new_sha1, sha1); memcpy(ref->name, refname, len); |