diff options
author | Junio C Hamano <junkio@cox.net> | 2007-05-29 01:24:20 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-05-29 01:24:20 -0700 |
commit | 322bcd9a9a2c0081c66414bde64e0d443c9ec922 (patch) | |
tree | 035f3344d2aba30f946fb545bfc9b6a9b7ee3d37 /remote.h | |
parent | a77a33a51df9b7655d80299487ec6fbb10445496 (diff) | |
parent | 8558fd9ece4c8250a037a6d5482a8040d600ef47 (diff) | |
download | git-322bcd9a9a2c0081c66414bde64e0d443c9ec922.tar.gz git-322bcd9a9a2c0081c66414bde64e0d443c9ec922.tar.xz |
Merge branch 'db/remote'
* db/remote:
Move refspec pattern matching to match_refs().
Update local tracking refs when pushing
Add handlers for fetch-side configuration of remotes.
Move refspec parser from connect.c and cache.h to remote.{c,h}
Move remote parsing into a library file out of builtin-push.
Diffstat (limited to 'remote.h')
-rw-r--r-- | remote.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/remote.h b/remote.h new file mode 100644 index 000000000..01dbcef67 --- /dev/null +++ b/remote.h @@ -0,0 +1,41 @@ +#ifndef REMOTE_H +#define REMOTE_H + +struct remote { + const char *name; + + const char **uri; + int uri_nr; + + const char **push_refspec; + struct refspec *push; + int push_refspec_nr; + + const char **fetch_refspec; + struct refspec *fetch; + int fetch_refspec_nr; + + const char *receivepack; +}; + +struct remote *remote_get(const char *name); + +int remote_has_uri(struct remote *remote, const char *uri); + +struct refspec { + unsigned force : 1; + unsigned pattern : 1; + + const char *src; + char *dst; +}; + +int match_refs(struct ref *src, struct ref *dst, struct ref ***dst_tail, + int nr_refspec, char **refspec, int all); + +/* + * For the given remote, reads the refspec's src and sets the other fields. + */ +int remote_find_tracking(struct remote *remote, struct refspec *refspec); + +#endif |