summaryrefslogtreecommitdiff
path: root/init-db.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-06 17:12:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-06 17:19:38 (GMT)
commit15e02b372ddebd2aac829707786462798f91d509 (patch)
tree0db4c8de5fb87908ec324a498d6fdf31546d5307 /init-db.c
parentdb27ee63929fa4a161c321daf52df5635fd4828c (diff)
downloadgit-15e02b372ddebd2aac829707786462798f91d509.zip
git-15e02b372ddebd2aac829707786462798f91d509.tar.gz
git-15e02b372ddebd2aac829707786462798f91d509.tar.bz2
send-pack: allow generic sha1 expression on the source side.
This extends the source side semantics to match what Linus suggested. An example: $ git-send-pack kernel.org:/pub/scm/git/git.git pu^^:master pu would allow me to push the current pu into pu, and the commit two commits before it into master, on my public repository. The revised rule for updating remote heads is as follows. $ git-send-pack [--all] <remote> [<ref>...] - When no <ref> is specified: - with '--all', it is the same as specifying the full refs/* path for all local refs; - without '--all', it is the same as specifying the full refs/* path for refs that exist on both ends; - When one or more <ref>s are specified: - a single token <ref> (i.e. no colon) must be a pattern that tail-matches refs/* path for an existing local ref. It is an error for the pattern to match no local ref, or more than one local refs. The matching ref is pushed to the remote end under the same name. - <src>:<dst> can have different cases. <src> is first tried as the tail-matching pattern for refs/* path. - If more than one matches are found, it is an error. - If one match is found, <dst> must either match no remote ref and start with "refs/", or match exactly one remote ref. That remote ref is updated with the sha1 value obtained from the <src> sha1. - If no match is found, it is given to get_extended_sha1(); it is an error if get_extended_sha1() does not find an object name. If it succeeds, <dst> must either match no remote ref and start with "refs/" or match exactly one remote ref. That remote ref is updated with the sha1 value. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'init-db.c')
0 files changed, 0 insertions, 0 deletions