diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-28 14:16:45 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-04-28 14:21:10 +0200 |
commit | 528a4e24c6671d621847cf8e3121e3c56fe20d3b (patch) | |
tree | 254aebe6ad284ebb3d2403ac258850c8382c72c2 /include/git2/refs.h | |
parent | 78bf2944ed0512f38dfcb56f590373a904ca29c0 (diff) | |
download | libgit2-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.h | 7 |
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; /** |