Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
repack_without_ref(): use function get_packed_ref()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 22 Apr 2013 19:52:17 +0000
(21:52 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 1 May 2013 22:33:09 +0000
(15:33 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
f361bae
)
diff --git
a/refs.c
b/refs.c
index d2458275a9eabdb0a5d52e508b4f52041ea7e621..03c19be2c1326a10ff40c5a7e183ae78ed06f18e 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-1821,9
+1821,11
@@
static int repack_without_ref(const char *refname)
{
struct repack_without_ref_sb data;
struct ref_cache *refs = get_ref_cache(NULL);
- struct ref_dir *packed = get_packed_refs(refs);
- if (find_ref(packed, refname) == NULL)
- return 0;
+ struct ref_dir *packed;
+
+ if (!get_packed_ref(refname))
+ return 0; /* refname does not exist in packed refs */
+
data.refname = refname;
data.fd = hold_lock_file_for_update(&packlock, git_path("packed-refs"), 0);
if (data.fd < 0) {