summaryrefslogtreecommitdiff
path: root/src/push.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-11-07 15:00:11 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-09 16:07:43 +0100
commitaad638f3a1e4d98296c2ec9c4ed08f217a652c5c (patch)
tree4276b661b94c788f5aca4c5757846af758bf89d3 /src/push.h
parentb4e5432ff032c7d05c82ad2871e27f990493d6b7 (diff)
downloadlibgit2-aad638f3a1e4d98296c2ec9c4ed08f217a652c5c.tar.gz
push: use the common refspec parsercmn/push-refspec-refactor
There is one well-known and well-tested parser which we should use, instead of implementing parsing a second time. The common parser is also augmented to copy the LHS into the RHS if the latter is empty. The expressions test had to change a bit, as we now catch a bad RHS of a refspec locally.
Diffstat (limited to 'src/push.h')
-rw-r--r--src/push.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/push.h b/src/push.h
index 6c8bf7229..68fa868dd 100644
--- a/src/push.h
+++ b/src/push.h
@@ -8,15 +8,13 @@
#define INCLUDE_push_h__
#include "git2.h"
+#include "refspec.h"
typedef struct push_spec {
- char *lref;
- char *rref;
+ struct git_refspec refspec;
git_oid loid;
git_oid roid;
-
- bool force;
} push_spec;
typedef struct push_status {