git-commit-vandalism/builtin
Junio C Hamano e5435ff1fc branch: fix "copy" to never touch HEAD
When creating a new branch B by copying the branch A that happens to
be the current branch, it also updates HEAD to point at the new
branch.  It probably was made this way because "git branch -c A B"
piggybacked its implementation on "git branch -m A B",

This does not match the usual expectation.  If I were sitting on a
blue chair, and somebody comes and repaints it to red, I would
accept ending up sitting on a chair that is now red (I am also OK to
stand, instead, as there no longer is my favourite blue chair).  But
if somebody creates a new red chair, modelling it after the blue
chair I am sitting on, I do not expect to be booted off of the blue
chair and ending up on sitting on the new red one.

Let's fix this before it hits 'next'.  Those who want to create a
new branch and switch to it can do "git checkout B" after doing a
"git branch -c B", and if that operation is so useful and deserves a
short-hand way to do so, perhaps extend "git checkout -b B" to copy
configurations while creating the new branch B.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-24 08:42:12 +09:00
..
add.c Merge branch 'bw/pathspec-sans-the-index' 2017-05-30 11:16:40 +09:00
am.c Merge branch 'jk/unbreak-am-h' 2017-06-04 09:55:44 +09:00
annotate.c
apply.c
archive.c
bisect--helper.c
blame.c Merge branch 'js/blame-lib' 2017-06-05 09:18:12 +09:00
branch.c branch: fix "copy" to never touch HEAD 2017-09-24 08:42:12 +09:00
bundle.c bundle: use prefix_filename with bundle path 2017-03-21 11:18:41 -07:00
cat-file.c Merge branch 'js/blame-lib' 2017-06-05 09:18:12 +09:00
check-attr.c
check-ignore.c Merge branch 'bw/pathspec-sans-the-index' 2017-05-30 11:16:40 +09:00
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c Merge branch 'ja/do-not-ask-needless-questions' 2017-05-29 12:34:48 +09:00
clean.c Merge branch 'sl/clean-d-ignored-fix' 2017-06-02 15:06:05 +09:00
clone.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
column.c
commit-tree.c Convert lookup_commit* to struct object_id 2017-05-08 15:12:57 +09:00
commit.c Merge branch 'bm/interpret-trailers-cut-line-is-eom' 2017-05-29 12:34:53 +09:00
config.c config: complain about --local outside of a git repo 2017-05-15 11:30:51 +09:00
count-objects.c
credential.c
describe.c Convert lookup_tag to struct object_id 2017-05-08 15:12:57 +09:00
diff-files.c diff: have the diff-* builtins configure diff before initializing revisions 2017-05-09 12:24:35 +09:00
diff-index.c diff: have the diff-* builtins configure diff before initializing revisions 2017-05-09 12:24:35 +09:00
diff-tree.c Merge branch 'mb/diff-default-to-indent-heuristics' 2017-06-05 09:18:10 +09:00
diff.c Merge branch 'jk/diff-blob' 2017-06-02 15:06:05 +09:00
difftool.c difftool: address a couple of resource/memory leaks 2017-05-08 12:18:19 +09:00
fast-export.c Merge branch 'js/plug-leaks' 2017-05-29 12:34:44 +09:00
fetch-pack.c Rename sha1_array to oid_array 2017-03-31 08:33:56 -07:00
fetch.c ref_store: take a msg parameter when deleting references 2017-05-23 14:29:53 +09:00
fmt-merge-msg.c object: convert parse_object* to take struct object_id 2017-05-08 15:12:58 +09:00
for-each-ref.c ref-filter: add --no-contains option to tag/branch/for-each-ref 2017-03-24 12:15:26 -07:00
fsck.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
gc.c Merge branch 'js/larger-timestamps' 2017-05-16 11:51:59 +09:00
get-tar-commit-id.c
grep.c Merge branch 'ab/grep-preparatory-cleanup' 2017-06-02 15:06:06 +09:00
hash-object.c prefix_filename: return newly allocated string 2017-03-21 11:18:41 -07:00
help.c
index-pack.c object: convert parse_object* to take struct object_id 2017-05-08 15:12:58 +09:00
init-db.c real_pathdup(): fix callsites that wanted it to die on error 2017-03-08 14:38:41 -08:00
interpret-trailers.c
log.c Merge branch 'jk/diff-blob' 2017-06-02 15:06:05 +09:00
ls-files.c Merge branch 'bw/pathspec-sans-the-index' 2017-05-30 11:16:40 +09:00
ls-remote.c avoid using fixed PATH_MAX buffers for refs 2017-03-30 14:59:50 -07:00
ls-tree.c tree: convert parse_tree_indirect to struct object_id 2017-05-08 15:12:58 +09:00
mailinfo.c prefix_filename: return newly allocated string 2017-03-21 11:18:41 -07:00
mailsplit.c mailinfo & mailsplit: check for EOF while parsing 2017-05-08 12:18:19 +09:00
merge-base.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
merge-file.c prefix_filename: return newly allocated string 2017-03-21 11:18:41 -07:00
merge-index.c Convert GIT_SHA1_HEXSZ used for allocation to GIT_MAX_HEXSZ 2017-03-26 22:08:21 -07:00
merge-ours.c
merge-recursive.c
merge-tree.c Convert lookup_blob to struct object_id 2017-05-08 15:12:57 +09:00
merge.c tree: convert parse_tree_indirect to struct object_id 2017-05-08 15:12:58 +09:00
mktag.c
mktree.c mktree: plug memory leaks reported by Coverity 2017-05-08 12:18:19 +09:00
mv.c
name-rev.c Merge branch 'js/larger-timestamps' 2017-05-30 11:16:45 +09:00
notes.c Merge branch 'ab/c-translators-comment-style' 2017-06-04 09:55:44 +09:00
pack-objects.c Merge branch 'ab/grep-preparatory-cleanup' 2017-06-02 15:06:06 +09:00
pack-redundant.c pack-redundant: plug memory leak 2017-05-08 12:18:19 +09:00
pack-refs.c refs: delete pack_refs() in favor of refs_pack_refs() 2017-04-14 03:53:25 -07:00
patch-id.c Convert GIT_SHA1_RAWSZ used for allocation to GIT_MAX_RAWSZ 2017-03-26 22:08:21 -07:00
prune-packed.c
prune.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
pull.c Merge branch 'tb/pull-ff-rebase-autostash' 2017-06-05 09:18:13 +09:00
push.c push: unmark a local variable as static 2017-04-02 09:49:24 -07:00
read-tree.c Merge branch 'ja/do-not-ask-needless-questions' 2017-05-29 12:34:48 +09:00
rebase--helper.c
receive-pack.c Merge branch 'js/plug-leaks' 2017-05-29 12:34:44 +09:00
reflog.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
remote-ext.c
remote-fd.c
remote.c Merge branch 'mh/packed-ref-store-prep' 2017-06-05 09:18:11 +09:00
repack.c repack: accept --threads=<n> and pass it down to pack-objects 2017-04-27 08:09:25 +09:00
replace.c Convert lookup_tag to struct object_id 2017-05-08 15:12:57 +09:00
rerere.c
reset.c Merge branch 'bw/pathspec-sans-the-index' 2017-05-30 11:16:40 +09:00
rev-list.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
rev-parse.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
revert.c Merge branch 'jk/cherry-pick-0-mainline' 2017-03-17 13:50:28 -07:00
rm.c pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP 2017-05-12 14:23:46 +09:00
send-pack.c Merge branch 'bc/object-id' 2017-04-19 21:37:13 -07:00
shortlog.c Merge branch 'rs/shortlog-cleanup' 2017-03-24 13:07:37 -07:00
show-branch.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
show-ref.c
stripspace.c
submodule--helper.c pathspec: remove PATHSPEC_STRIP_SUBMODULE_SLASH_CHEAP 2017-05-12 14:23:46 +09:00
symbolic-ref.c
tag.c Merge branch 'bc/object-id' 2017-05-29 12:34:43 +09:00
unpack-file.c
unpack-objects.c object: convert parse_object* to take struct object_id 2017-05-08 15:12:58 +09:00
update-index.c Merge branch 'cc/untracked' 2017-04-11 00:21:51 -07:00
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-commit.c Convert lookup_commit* to struct object_id 2017-05-08 15:12:57 +09:00
verify-pack.c
verify-tag.c
worktree.c Merge branch 'js/plug-leaks' 2017-05-29 12:34:44 +09:00
write-tree.c