aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-04-30 12:41:04 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-15 10:47:22 -0700
commit7522e3dbcc3946d481e6b6ac59037b884cc0a2a6 (patch)
treec1cb1915a221c4cde96195b0e5ec16ab231b3e96
parentdb7516ab9f435e3ce86b257c6631fb4d2dfb12ae (diff)
downloadgit-7522e3dbcc3946d481e6b6ac59037b884cc0a2a6.tar.gz
git-7522e3dbcc3946d481e6b6ac59037b884cc0a2a6.tar.xz
rename_ref: don't ask read_ref_full where the ref came from
We call read_ref_full with a pointer to flags from rename_ref but since we never actually use the returned flags we can just pass NULL here instead. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Reviewed-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index f5d7bd79f..3c45615c2 100644
--- a/refs.c
+++ b/refs.c
@@ -2721,7 +2721,7 @@ int rename_ref(const char *oldrefname, const char *newrefname, const char *logms
goto rollback;
}
- if (!read_ref_full(newrefname, sha1, 1, &flag) &&
+ if (!read_ref_full(newrefname, sha1, 1, NULL) &&
delete_ref(newrefname, sha1, REF_NODEREF)) {
if (errno==EISDIR) {
if (remove_empty_directories(git_path("%s", newrefname))) {