Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
peel_ref(): use function get_packed_ref()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Mon, 22 Apr 2013 19:52:16 +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:
6333158
)
diff --git
a/refs.c
b/refs.c
index fbcc044eecb163d44f445b2d48b9752a2b6140d7..d2458275a9eabdb0a5d52e508b4f52041ea7e621 100644
(file)
--- a/
refs.c
+++ b/
refs.c
@@
-1283,10
+1283,9
@@
int peel_ref(const char *refname, unsigned char *sha1)
return -1;
if ((flag & REF_ISPACKED)) {
- struct ref_dir *dir = get_packed_refs(get_ref_cache(NULL));
- struct ref_entry *r = find_ref(dir, refname);
+ struct ref_entry *r = get_packed_ref(refname);
- if (r
!= NULL && r->flag & REF_KNOWS_PEELED
) {
+ if (r
&& (r->flag & REF_KNOWS_PEELED)
) {
hashcpy(sha1, r->u.value.peeled);
return 0;
}