From: Ronnie Sahlberg Date: Wed, 30 Apr 2014 19:41:04 +0000 (-0700) Subject: rename_ref: don't ask read_ref_full where the ref came from X-Git-Tag: v2.2.0-rc0~32^2~18 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/7522e3dbcc3946d481e6b6ac59037b884cc0a2a6 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 Reviewed-by: Michael Haggerty Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/refs.c b/refs.c index f5d7bd79f2..3c45615c22 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))) {