author | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 01:07:10 +0000 (17:07 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Dec 2007 01:07:10 +0000 (17:07 -0800) |
* sp/refspec-match:
refactor fetch's ref matching to use refname_match()
push: use same rules as git-rev-parse to resolve refspecs
add refname_match()
push: support pushing HEAD to real branch name
refactor fetch's ref matching to use refname_match()
push: use same rules as git-rev-parse to resolve refspecs
add refname_match()
push: support pushing HEAD to real branch name
1 | 2 | |||
---|---|---|---|---|
builtin-push.c | patch | | diff1 | | diff2 | | blob | history |
cache.h | patch | | diff1 | | diff2 | | blob | history |
refs.c | patch | | diff1 | | diff2 | | blob | history |
remote.c | patch | | diff1 | | diff2 | | blob | history |
sha1_name.c | patch | | diff1 | | diff2 | | blob | history |
t/t5510-fetch.sh | patch | | diff1 | | diff2 | | blob | history |
t/t5516-fetch-push.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin-push.c
Simple merge
diff --cc cache.h
Simple merge
diff --cc refs.c
Simple merge
diff --cc remote.c
index 46e5f04243eb6075a91ac70350555d1aa521f802,48812a713e56bbc74418d2d484ee345b4dc5aa32..3fb0f99b29e7ffd927abf166cfa004c1937aaf60
+++ b/remote.c
{
if (!branch || i < 0 || i >= branch->merge_nr)
return 0;
- return ref_matches_abbrev(branch->merge[i]->src, refname);
+ return refname_match(branch->merge[i]->src, refname, ref_fetch_rules);
}
-static struct ref *get_expanded_map(struct ref *remote_refs,
+static struct ref *get_expanded_map(const struct ref *remote_refs,
const struct refspec *refspec)
{
- struct ref *ref;
+ const struct ref *ref;
struct ref *ret = NULL;
struct ref **tail = &ret;
return ret;
}
-static struct ref *find_ref_by_name_abbrev(struct ref *refs, const char *name)
+static const struct ref *find_ref_by_name_abbrev(const struct ref *refs, const char *name)
{
- struct ref *ref;
+ const struct ref *ref;
for (ref = refs; ref; ref = ref->next) {
- if (ref_matches_abbrev(name, ref->name))
+ if (refname_match(name, ref->name, ref_fetch_rules))
return ref;
}
return NULL;
diff --cc sha1_name.c
Simple merge
diff --cc t/t5510-fetch.sh
Simple merge
diff --cc t/t5516-fetch-push.sh
Simple merge