[PATCH 4/7] Autocreate reflogs for namespaced refs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since refs are classified based on their prefix
but namespaces have their own prefix,
it's necessary to skip that prefix to classify their remaining prefix.
---
 refs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/refs.c b/refs.c
index ba22f4a..2e8bace 100644
--- a/refs.c
+++ b/refs.c
@@ -699,6 +699,7 @@ int should_autocreate_reflog(const char *refname)
 	case LOG_REFS_ALWAYS:
 		return 1;
 	case LOG_REFS_NORMAL:
+		(void) skip_namespace(refname, &refname);
 		return starts_with(refname, "refs/heads/") ||
 			starts_with(refname, "refs/remotes/") ||
 			starts_with(refname, "refs/notes/") ||
-- 
2.9.0




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux