summaryrefslogtreecommitdiff
path: root/src/refspec.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-10-28 23:30:45 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2013-11-01 22:48:09 +0100
commitaf613ecd445bf0abfda81769e7a2d763413dfd04 (patch)
tree47ef22398099818d12bf435bc540453a458b2ad2 /src/refspec.h
parent968c7d072ae61852564a831706ca5e969a2eb62c (diff)
downloadlibgit2-af613ecd445bf0abfda81769e7a2d763413dfd04.tar.gz
remote: store dwimed refspecs separately
This allows us to add e.g. "HEAD" as a refspec when none are given without overwriting the user's data.
Diffstat (limited to 'src/refspec.h')
-rw-r--r--src/refspec.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/refspec.h b/src/refspec.h
index 44d484c7b..51b7bfee9 100644
--- a/src/refspec.h
+++ b/src/refspec.h
@@ -9,6 +9,7 @@
#include "git2/refspec.h"
#include "buffer.h"
+#include "vector.h"
struct git_refspec {
char *string;
@@ -17,7 +18,6 @@ struct git_refspec {
unsigned int force :1,
push : 1,
pattern :1,
- dwim :1,
matching :1;
};
@@ -63,4 +63,10 @@ int git_refspec__serialize(git_buf *out, const git_refspec *refspec);
*/
int git_refspec_is_wildcard(const git_refspec *spec);
+/**
+ * DWIM `spec` with `refs` existing on the remote, append the dwim'ed
+ * result in `out`.
+ */
+int git_refspec__dwim_one(git_vector *out, git_refspec *spec, git_vector *refs);
+
#endif