summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2017-06-15 02:43:56 +0200
committerJunio C Hamano <gitster@pobox.com>2017-06-21 15:44:37 -0700
commit145a7449789e259b81f9a8c61ba9e9ef7b062f9b (patch)
tree3e7b2ae39c24d37ca75a9ca0be315195db388fd9 /remote.h
parenteb0c621d1ec952048bc0b2222e2dd81f1fe58dbd (diff)
downloadgit-sg/remote-no-string-refspecs.tar.gz
remote.c: eliminate remote->push_refspecsg/remote-no-string-refspecs
Do the same as in the previous patch, but for push refspecs, i.e. with remote->push_refspec, remote->push and add_push_refspec(). Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/remote.h b/remote.h
index 416a085014..eba06bacb1 100644
--- a/remote.h
+++ b/remote.h
@@ -32,14 +32,10 @@ struct remote {
int pushurl_nr;
int pushurl_alloc;
- const char **push_refspec;
- struct refspec *push;
- int push_refspec_nr;
- int push_refspec_alloc;
-
+ struct refspec_array push;
struct refspec_array fetch;
- /* Copy of the first bogus fetch refspec we couldn't parse */
+ /* Copy of the first bogus refspec we couldn't parse */
const char *bogus_refspec;
/*
@@ -184,6 +180,8 @@ struct refspec *parse_fetch_refspec(int nr_refspec, const char **refspec);
*/
int add_fetch_refspec(struct remote *remote, const char *refspec, int gently);
extern struct refspec *parse_push_refspec(int nr_refspec, const char **refspec);
+/* The same as add_fetch_refspec() above, but for push refspecs. */
+int add_push_refspec(struct remote *remote, const char *refspec, int gently);
void free_refspec(int nr_refspec, struct refspec *refspec);