aboutsummaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-07-15 16:02:38 -0700
committerJunio C Hamano <gitster@pobox.com>2014-07-16 13:06:41 -0700
commite7e0f26eb64de205acaac63da89f47aab78ba229 (patch)
tree2f31e5198ae6e3b1d6a13f093ba8fe314b359114 /refs.c
parentebc5da3208824e25a89672a3b91bd13629b215fe (diff)
downloadgit-e7e0f26eb64de205acaac63da89f47aab78ba229.tar.gz
git-e7e0f26eb64de205acaac63da89f47aab78ba229.tar.xz
refs.c: add a public is_branch function
Both refs.c and fsck.c have their own private copies of the is_branch function. Delete the is_branch function from fsck.c and make the version in refs.c public. Signed-off-by: Ronnie Sahlberg <sahlberg@google.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/refs.c b/refs.c
index 59fb70087..d0ddf5608 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/");
}