Signed-off-by: David Turner <dturner@xxxxxxxxxxxxxxxx> --- refs-be-files.c | 10 ---------- refs.c | 10 ++++++++++ refs.h | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 657b58f..3138624 100644 --- a/refs-be-files.c +++ b/refs-be-files.c @@ -2616,16 +2616,6 @@ static int commit_ref(struct ref_lock *lock) return 0; } -static int should_autocreate_reflog(const char *refname) -{ - if (!log_all_ref_updates) - return 0; - return starts_with(refname, "refs/heads/") || - starts_with(refname, "refs/remotes/") || - starts_with(refname, "refs/notes/") || - !strcmp(refname, "HEAD"); -} - static int files_verify_refname_available(const char *newname, struct string_list *extra, struct string_list *skip, diff --git a/refs.c b/refs.c index 77aa51d..a9e6ca1 100644 --- a/refs.c +++ b/refs.c @@ -685,6 +685,16 @@ char *resolve_refdup(const char *refname, int resolve_flags, sha1, flags)); } +int should_autocreate_reflog(const char *refname) +{ + if (!log_all_ref_updates) + return 0; + return starts_with(refname, "refs/heads/") || + starts_with(refname, "refs/remotes/") || + starts_with(refname, "refs/notes/") || + !strcmp(refname, "HEAD"); +} + /* * How to handle various characters in refnames: * 0: An acceptable character for refs diff --git a/refs.h b/refs.h index 0eab5e2..7204a56 100644 --- a/refs.h +++ b/refs.h @@ -58,6 +58,8 @@ extern const char *resolve_ref_unsafe(const char *refname, int resolve_flags, extern char *resolve_refdup(const char *refname, int resolve_flags, unsigned char *sha1, int *flags); +extern int should_autocreate_reflog(const char *refname); + extern int read_ref_full(const char *refname, int resolve_flags, unsigned char *sha1, int *flags); extern int read_ref(const char *refname, unsigned char *sha1); -- 2.0.4.315.gad8727a-twtrsrc -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html