Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-04-28 16:16:45 +0400
committerCarlos Martín Nieto <cmn@dwim.me>2013-04-28 16:21:10 +0400
commit528a4e24c6671d621847cf8e3121e3c56fe20d3b (patch)
tree254aebe6ad284ebb3d2403ac258850c8382c72c2 /src/refs.c
parent78bf2944ed0512f38dfcb56f590373a904ca29c0 (diff)
Parse shorthand refspecs as valid
Relax the ONELEVEL ref naming rules so the refspec parsing code can ask for 'master' to be considered valid.
Diffstat (limited to 'src/refs.c')
-rw-r--r--src/refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c
index 9c6684a5a..2faa4cb83 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -752,6 +752,7 @@ int git_reference__normalize_name(
goto cleanup;
if ((segments_count == 1 ) &&
+ !(flags & GIT_REF_FORMAT_REFSPEC_SHORTHAND) &&
!(is_all_caps_and_underscore(name, (size_t)segment_len) ||
((flags & GIT_REF_FORMAT_REFSPEC_PATTERN) && !strcmp("*", name))))
goto cleanup;