Thread (23 messages) flat view 23 messages, 1 author, 2016-06-15
DORMANTno replies

Revision v2 of 3 in this series.

Revisions (3)
  1. v1 [diff vs current]
  2. v2 current
  3. v3 [diff vs current]

[PATCH v2 13/23] refs-common.c: move is_branch to the common code

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

Signed-off-by: Ronnie Sahlberg <redacted>
---
 refs-common.c | 5 +++++
 refs.c        | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index f8b79e0..5f83d7e 100644
--- a/refs-common.c
+++ b/refs-common.c
@@ -3,6 +3,11 @@
 #include "refs.h"
 #include "string-list.h"
 
+int is_branch(const char *refname)
+{
+	return !strcmp(refname, "HEAD") || starts_with(refname, "refs/heads/");
+}
+
 int update_ref(const char *action, const char *refname,
 	       const unsigned char *sha1, const unsigned char *oldval,
 	       int flags, struct strbuf *e)
diff --git a/refs.c b/refs.c
index 55bced9..70c034c 100644
--- a/refs.c
+++ b/refs.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)
 {
-- 
2.0.1.556.g3edca4c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help