diff options
author | Brad King <brad.king@kitware.com> | 2013-08-30 20:12:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-08-30 23:57:28 +0200 |
commit | 9bbb0fa1fdc6c413b1f35c26e090515e5d0096aa (patch) | |
tree | 45d0c317ec200f7c9e61e5a7dff1fda5a88aba42 /refs.c | |
parent | reset: rename update_refs to reset_refs (diff) | |
download | git-9bbb0fa1fdc6c413b1f35c26e090515e5d0096aa.tar.xz git-9bbb0fa1fdc6c413b1f35c26e090515e5d0096aa.zip |
refs: report ref type from lock_any_ref_for_update
Expose lock_ref_sha1_basic's type_p argument to callers of
lock_any_ref_for_update. Update all call sites to ignore it by passing
NULL for now.
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2121,11 +2121,12 @@ struct ref_lock *lock_ref_sha1(const char *refname, const unsigned char *old_sha } struct ref_lock *lock_any_ref_for_update(const char *refname, - const unsigned char *old_sha1, int flags) + const unsigned char *old_sha1, + int flags, int *type_p) { if (check_refname_format(refname, REFNAME_ALLOW_ONELEVEL)) return NULL; - return lock_ref_sha1_basic(refname, old_sha1, flags, NULL); + return lock_ref_sha1_basic(refname, old_sha1, flags, type_p); } /* @@ -3174,7 +3175,7 @@ int update_ref(const char *action, const char *refname, int flags, enum action_on_err onerr) { static struct ref_lock *lock; - lock = lock_any_ref_for_update(refname, oldval, flags); + lock = lock_any_ref_for_update(refname, oldval, flags, NULL); if (!lock) { const char *str = "Cannot lock the ref '%s'."; switch (onerr) { |