summaryrefslogtreecommitdiff
path: root/include/git2/refs.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-04-28 14:16:45 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-04-28 14:21:10 +0200
commit528a4e24c6671d621847cf8e3121e3c56fe20d3b (patch)
tree254aebe6ad284ebb3d2403ac258850c8382c72c2 /include/git2/refs.h
parent78bf2944ed0512f38dfcb56f590373a904ca29c0 (diff)
downloadlibgit2-528a4e24c6671d621847cf8e3121e3c56fe20d3b.tar.gz
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 'include/git2/refs.h')
-rw-r--r--include/git2/refs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/git2/refs.h b/include/git2/refs.h
index 1ff0d4544..e1d425352 100644
--- a/include/git2/refs.h
+++ b/include/git2/refs.h
@@ -422,6 +422,13 @@ typedef enum {
* (e.g., foo/<star>/bar but not foo/bar<star>).
*/
GIT_REF_FORMAT_REFSPEC_PATTERN = (1 << 1),
+
+ /**
+ * Interpret the name as part of a refspec in shorthand form
+ * so the `ONELEVEL` naming rules aren't enforced and 'master'
+ * becomes a valid name.
+ */
+ GIT_REF_FORMAT_REFSPEC_SHORTHAND = (1 << 2),
} git_reference_normalize_t;
/**