1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-23 07:00:31 +02:00
git/builtin
Junio C Hamano ca02465b41 push: use remote.$name.push as a refmap
Since f2690487 (fetch: opportunistically update tracking refs,
2013-05-11), we stopped taking a non-storing refspec given on the
command line of "git fetch" literally, and instead started mapping
it via remote.$name.fetch refspecs.  This allows

    $ git fetch origin master

from the 'origin' repository, which is configured with

    [remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*

to update refs/remotes/origin/master with the result, as if the
command line were

    $ git fetch origin +master:refs/remotes/origin/master

to reduce surprises and improve usability.  Before that change, a
refspec on the command line without a colon was only to fetch the
history and leave the result in FETCH_HEAD, without updating the
remote-tracking branches.

When you are simulating a fetch from you by your mothership with a
push by you into your mothership, instead of having:

    [remote "satellite"]
        fetch = +refs/heads/*:refs/remotes/satellite/*

on the mothership repository and running:

    mothership$ git fetch satellite

you would have:

    [remote "mothership"]
        push = +refs/heads/*:refs/remotes/satellite/*

on your satellite machine, and run:

    satellite$ git push mothership

Because we so far did not make the corresponding change to the push
side, this command:

    satellite$ git push mothership master

does _not_ allow you on the satellite to only push 'master' out but
still to the usual destination (i.e. refs/remotes/satellite/master).

Implement the logic to map an unqualified refspec given on the
command line via the remote.$name.push refspec.  This will bring a
bit more symmetry between "fetch" and "push".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-04 15:11:08 -08:00
..
add.c Merge branch 'fc/trivial' 2013-09-17 11:42:34 -07:00
annotate.c
apply.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
archive.c
bisect--helper.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
blame.c pathspec: stop --*-pathspecs impact on internal parse_pathspec() uses 2013-10-28 09:57:36 -07:00
branch.c Merge branch 'jx/branch-vv-always-compare-with-upstream' 2013-11-18 12:24:49 -08:00
bundle.c
cat-file.c Merge branch 'mg/more-textconv' 2013-10-23 13:21:31 -07:00
check-attr.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
check-ignore.c Merge branch 'dw/check-ignore-sans-index' 2013-09-20 12:37:32 -07:00
check-mailmap.c
check-ref-format.c
checkout-index.c Merge branch 'nd/lift-path-max' 2013-10-30 12:10:56 -07:00
checkout.c Merge branch 'mm/checkout-auto-track-fix' 2013-10-30 12:10:16 -07:00
clean.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
clone.c Merge branch 'jk/clone-progress-to-stderr' 2013-10-18 13:49:51 -07:00
column.c
commit-tree.c
commit.c Merge branch 'mm/commit-template-squelch-advice-messages' 2013-09-20 12:36:32 -07:00
config.c Merge branch 'jk/config-int-range-check' 2013-09-12 14:41:00 -07:00
count-objects.c
credential.c
describe.c describe: trivial style fixes 2013-10-31 13:47:35 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c diff: trivial style fix 2013-10-31 13:48:09 -07:00
fast-export.c Merge branch 'fc/fast-export' 2013-09-17 11:42:31 -07:00
fetch-pack.c Merge branch 'jc/push-cas' 2013-09-09 14:30:29 -07:00
fetch.c Merge branch 'bk/refs-multi-update' 2013-09-20 12:36:12 -07:00
fmt-merge-msg.c
for-each-ref.c Merge branch 'jk/for-each-ref-skip-parsing' 2013-11-01 07:38:41 -07:00
fsck.c Merge branch 'jk/free-tree-buffer' 2013-09-17 11:37:33 -07:00
gc.c Merge branch 'nd/gc-lock-against-each-other' 2013-10-30 12:10:27 -07:00
grep.c Merge branch 'mg/more-textconv' 2013-10-23 13:21:31 -07:00
hash-object.c hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP 2013-08-07 08:30:55 -07:00
help.c
index-pack.c Merge branch 'jk/free-tree-buffer' 2013-09-17 11:37:33 -07:00
init-db.c
log.c Merge branch 'mg/more-textconv' 2013-10-23 13:21:31 -07:00
ls-files.c Merge branch 'jc/ls-files-killed-optim' 2013-09-11 15:03:28 -07:00
ls-remote.c
ls-tree.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
mailinfo.c
mailsplit.c
merge-base.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
merge-file.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c merge: simplify ff-only option 2013-10-31 11:12:24 -07:00
mktag.c
mktree.c
mv.c mv: Fix spurious warning when moving a file in presence of submodules 2013-10-13 22:35:19 -07:00
name-rev.c branch, commit, name-rev: ease up boolean conditions 2013-08-07 08:30:30 -07:00
notes.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
pack-objects.c Merge branch 'jc/pack-objects' 2013-10-23 13:21:26 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
push.c push: use remote.$name.push as a refmap 2013-12-04 15:11:08 -08:00
read-tree.c C: have space around && and || operators 2013-10-16 10:26:39 -07:00
receive-pack.c Merge branch 'bk/refs-multi-update' 2013-09-20 12:36:12 -07:00
reflog.c Merge branch 'bk/refs-multi-update' 2013-09-20 12:36:12 -07:00
remote-ext.c
remote-fd.c
remote.c Merge branch 'po/remote-set-head-usage' 2013-10-14 11:07:29 -07:00
repack.c repack: improve warnings about failure of renaming and removing files 2013-09-17 13:34:57 -07:00
replace.c Merge branch 'cc/replace-with-the-same-type' 2013-09-24 23:35:24 -07:00
rerere.c
reset.c reset: pass real rev name to add--interactive 2013-10-25 14:54:18 -07:00
rev-list.c C: have space around && and || operators 2013-10-16 10:26:39 -07:00
rev-parse.c Merge branch 'sb/parseopt-boolean-removal' 2013-09-04 12:39:03 -07:00
revert.c Merge branch 'hu/cherry-pick-previous-branch' 2013-10-23 13:21:35 -07:00
rm.c rm: re-use parse_pathspec's trailing-slash removal 2013-09-13 12:37:35 -07:00
send-pack.c send-pack: fix parsing of --force-with-lease option 2013-08-02 16:07:45 -07:00
shortlog.c Merge branch 'jk/shortlog-tolerate-broken-commit' 2013-09-24 23:29:00 -07:00
show-branch.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
show-ref.c Replace deprecated OPT_BOOLEAN by OPT_BOOL 2013-08-05 11:32:19 -07:00
stripspace.c builtin/stripspace.c: fix broken indentation 2013-09-06 13:33:17 -07:00
symbolic-ref.c C: have space around && and || operators 2013-10-16 10:26:39 -07:00
tag.c Merge branch 'bk/refs-multi-update' 2013-09-20 12:36:12 -07:00
tar-tree.c tar-tree: remove dependency on sq_quote_print() 2013-07-30 08:10:35 -07:00
unpack-file.c
unpack-objects.c
update-index.c Merge branch 'jl/submodule-mv' 2013-09-09 14:36:15 -07:00
update-ref.c Merge branch 'bk/refs-multi-update' 2013-09-20 12:36:12 -07:00
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c