git-commit-vandalism/builtin
Matthieu Moy b55e677522 push: introduce new push.default mode "simple"
When calling "git push" without argument, we want to allow Git to do
something simple to explain and safe. push.default=matching is unsafe
when used to push to shared repositories, and hard to explain to
beginners in some contexts. It is debatable whether 'upstream' or
'current' is the safest or the easiest to explain, so introduce a new
mode called 'simple' that is the intersection of them: push to the
upstream branch, but only if it has the same name remotely. If not, give
an error that suggests the right command to push explicitely to
'upstream' or 'current'.

A question is whether to allow pushing when no upstream is configured. An
argument in favor of allowing the push is that it makes the new mode work
in more cases. On the other hand, refusing to push when no upstream is
configured encourages the user to set the upstream, which will be
beneficial on the next pull. Lacking better argument, we chose to deny
the push, because it will be easier to change in the future if someone
shows us wrong.

Original-patch-by: Jeff King <peff@peff.net>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-04-24 15:22:16 -07:00
..
add.c Merge branch 'js/add-e-submodule-fix' into maint 2012-02-13 11:42:18 -08:00
annotate.c
apply.c Use correct grammar in diffstat summary line 2012-02-03 23:19:42 -08:00
archive.c
bisect--helper.c
blame.c Merge branch 'zj/decimal-width' 2012-02-20 00:15:11 -08:00
branch.c teach "git branch" a --quiet option 2012-03-26 21:32:43 -07:00
bundle.c
cat-file.c cat-file: use streaming API to print blobs 2012-03-07 09:07:38 -08:00
check-attr.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'jk/branch-quiet' 2012-04-16 12:42:22 -07:00
clean.c
clone.c Merge branch 'cb/transfer-no-progress' into maint 2012-02-21 15:14:37 -08:00
commit-tree.c Merge branch 'jc/show-sig' 2012-01-06 12:44:07 -08:00
commit.c Merge branch 'jc/commit-unedited-template' 2012-04-16 12:43:07 -07:00
config.c config: remove useless assignment 2012-03-28 15:19:17 -07:00
count-objects.c
describe.c describe: Refresh the index when run with --dirty 2011-08-11 13:03:35 -07:00
diff-files.c Convert struct diff_options to use struct pathspec 2011-02-03 12:28:15 -08:00
diff-index.c Submodules: Use "ignore" settings from .gitmodules too for diff and status 2010-08-09 09:11:44 -07:00
diff-tree.c
diff.c drop casts from users EMPTY_TREE_SHA1_BIN 2012-03-23 13:52:05 -07:00
fast-export.c Merge branch 'rs/no-no-no-parseopt' 2012-03-01 20:59:31 -08:00
fetch-pack.c Merge branch 'cb/transfer-no-progress' 2012-02-20 00:14:55 -08:00
fetch.c Merge branch 'cb/transfer-no-progress' 2012-02-20 00:14:55 -08:00
fmt-merge-msg.c fmt-merge-msg: show those involved in a merged series 2012-03-13 20:44:29 -07:00
for-each-ref.c
fsck.c fsck: use streaming API for writing lost-found blobs 2012-03-07 09:07:39 -08:00
gc.c
grep.c Merge branch 'rs/no-no-no-parseopt' 2012-03-01 20:59:31 -08:00
hash-object.c index_fd(): turn write_object and format_check arguments into one flag 2011-05-09 11:58:19 -07:00
help.c Cast execl*() NULL sentinels to (char *) 2010-07-25 23:14:18 -07:00
index-pack.c index-pack: eliminate unlimited recursion in get_base_data() 2012-01-16 14:34:33 -08:00
init-db.c builtin/init-db.c: eliminate -Wformat warning on Solaris 2011-12-20 16:02:08 -08:00
log.c Merge branch 'nd/stream-more' 2012-04-15 22:50:39 -07:00
ls-files.c Merge branch 'cb/common-prefix-unification' 2011-10-10 15:56:17 -07:00
ls-remote.c Merge branch 'jc/ls-remote-short-help' 2011-10-05 12:36:26 -07:00
ls-tree.c Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails. 2011-07-25 10:50:11 -07:00
mailinfo.c mailinfo: with -b, keep space after [foo] 2012-01-16 16:06:57 -08:00
mailsplit.c
merge-base.c Documentation: update to git-merge-base --octopus 2011-04-15 10:13:52 -07:00
merge-file.c
merge-index.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
merge-ours.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
merge-recursive.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
merge-tree.c sparse: Fix an "symbol 'merge_file' not decared" warning 2011-04-11 10:35:25 -07:00
merge.c Sync with 1.7.9.6 2012-04-02 13:11:49 -07:00
mktag.c
mktree.c
mv.c Merge branch 'jk/maint-mv' 2011-12-19 16:05:34 -08:00
name-rev.c Sync with 1.7.7.4 2011-11-18 11:30:02 -08:00
notes.c Merge branch 'nd/war-on-nul-in-commit' 2011-12-22 11:27:26 -08:00
pack-objects.c pack-objects: Fix compilation with NO_PTHREDS 2012-02-26 17:46:00 -08:00
pack-redundant.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
pack-refs.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
patch-id.c
prune-packed.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
prune.c fix deletion of .git/objects sub-directories in git-prune/repack 2012-03-07 10:24:33 -08:00
push.c push: introduce new push.default mode "simple" 2012-04-24 15:22:16 -07:00
read-tree.c
receive-pack.c Merge branch 'cb/receive-pack-keep-errors' into maint 2012-02-21 15:14:41 -08:00
reflog.c
remote-ext.c Remove unused variables 2011-03-22 11:43:27 -07:00
remote-fd.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
remote.c Merge branch 'pj/remote-set-branches-usage-fix' into maint 2012-02-27 15:33:33 -08:00
replace.c
rerere.c
reset.c
rev-list.c rev-list: fix --verify-objects --quiet becoming --objects 2012-02-28 10:47:30 -08:00
rev-parse.c
revert.c Merge branch 'maint-1.7.8' into maint 2012-03-20 15:53:30 -07:00
rm.c i18n: git-rm basic messages 2011-03-09 23:52:56 -08:00
send-pack.c push/fetch/clone --no-progress suppresses progress output 2012-02-13 13:06:53 -08:00
shortlog.c
show-branch.c
show-ref.c Convert many resolve_ref() calls to read_ref*() and ref_exists() 2011-11-13 12:21:06 -08:00
stripspace.c Update documentation for stripspace 2011-12-12 16:48:54 -08:00
symbolic-ref.c symbolic-ref --short: abbreviate the output unambiguously 2012-02-27 15:58:36 -08:00
tag.c Merge branch 'tg/tag-points-at' 2012-02-20 00:15:28 -08:00
tar-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00
unpack-file.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
unpack-objects.c
update-index.c
update-ref.c update-ref: whitespace fix 2011-08-25 14:42:11 -07:00
update-server-info.c update-server-info: respect core.bigfilethreshold 2012-03-07 09:07:39 -08:00
upload-archive.c
var.c Fix sparse warnings 2011-03-22 10:16:54 -07:00
verify-pack.c
verify-tag.c verify-tag: Parse GPG configuration options. 2012-03-08 14:03:07 -08:00
write-tree.c Move 'builtin-*' into a 'builtin/' subdirectory 2010-02-22 14:29:41 -08:00