Thread (23 messages) 23 messages, 1 author, 2016-06-15

[PATCH v3 14/23] refs.c: move is_branch to the common code

flat view
DORMANTno replies

From: Ronnie Sahlberg <hidden>
Date: 2016-06-15 23:02:18
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v3 (3 revisions archived).

Revisions (3)
  1. v1
  2. v2 [diff against previous]
  3. v3 current [diff against previous]
Signed-off-by: Ronnie Sahlberg <redacted>
---
 refs-be-files.c | 5 -----
 refs.c          | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs-be-files.c b/refs-be-files.c
index 55bced9..70c034c 100644
--- a/refs-be-files.c
+++ b/refs-be-files.c
@@ -2483,11 +2483,6 @@ static int log_ref_write(const char *refname, const unsigned char *old_sha1,
 	return 0;
 }
 
-int is_branch(const char *refname)
-{
-	return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
-}
-
 static int write_sha1_update_reflog(struct ref_lock *lock,
 	const unsigned char *sha1, const char *logmsg)
 {
diff --git a/refs.c b/refs.c
index ea5f276..9bc0a31 100644
--- a/refs.c
+++ b/refs.c
@@ -683,3 +683,8 @@ int check_refname_format(const char *refname, int flags)
 		return -1; /* Refname has only one component. */
 	return 0;
 }
+
+int is_branch(const char *refname)
+{
+	return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
+}
-- 
2.0.1.552.g1af257a
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help