summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/fsck.c5
-rw-r--r--refs.c2
-rw-r--r--refs.h2
3 files changed, 3 insertions, 6 deletions
diff --git a/builtin/fsck.c b/builtin/fsck.c
index 8aadca1..d42a27d 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -481,11 +481,6 @@ static int fsck_handle_reflog(const char *logname, const unsigned char *sha1, in
return 0;
}
-static int is_branch(const char *refname)
-{
- return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
-}
-
static int fsck_handle_ref(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
{
struct object *obj;
diff --git a/refs.c b/refs.c
index 59fb700..d0ddf56 100644
--- a/refs.c
+++ b/refs.c
@@ -2810,7 +2810,7 @@ static int log_ref_write(const char *refname, const unsigned char *old_sha1,
return 0;
}
-static int is_branch(const char *refname)
+int is_branch(const char *refname)
{
return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
}
diff --git a/refs.h b/refs.h
index 1440acc..1b223e5 100644
--- a/refs.h
+++ b/refs.h
@@ -137,6 +137,8 @@ extern int repack_without_refs(const char **refnames, int n);
extern int ref_exists(const char *);
+extern int is_branch(const char *refname);
+
/*
* If refname is a non-symbolic reference that refers to a tag object,
* and the tag can be (recursively) dereferenced to a non-tag object,