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

[PATCH v3 16/23] refs.c: move prettify_refname 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 | 9 ---------
 refs.c          | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/refs-be-files.c b/refs-be-files.c
index 6542969..fb9c614 100644
--- a/refs-be-files.c
+++ b/refs-be-files.c
@@ -1747,15 +1747,6 @@ int for_each_rawref(each_ref_fn fn, void *cb_data)
 			       DO_FOR_EACH_INCLUDE_BROKEN, cb_data);
 }
 
-const char *prettify_refname(const char *name)
-{
-	return name + (
-		starts_with(name, "refs/heads/") ? 11 :
-		starts_with(name, "refs/tags/") ? 10 :
-		starts_with(name, "refs/remotes/") ? 13 :
-		0);
-}
-
 static void unlock_ref(struct ref_lock *lock)
 {
 	/* Do not free lock->lk -- atexit() still looks at them */
diff --git a/refs.c b/refs.c
index 177bed6..d163e61 100644
--- a/refs.c
+++ b/refs.c
@@ -696,3 +696,12 @@ int names_conflict(const char *refname1, const char *refname2)
 	return (*refname1 == '\0' && *refname2 == '/')
 		|| (*refname1 == '/' && *refname2 == '\0');
 }
+
+const char *prettify_refname(const char *name)
+{
+	return name + (
+		starts_with(name, "refs/heads/") ? 11 :
+		starts_with(name, "refs/tags/") ? 10 :
+		starts_with(name, "refs/remotes/") ? 13 :
+		0);
+}
-- 
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