summaryrefslogtreecommitdiff
path: root/t/t3505-cherry-pick-empty.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2013-05-29 12:12:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-29 18:31:36 (GMT)
commit798c35fcd8a71a094ca68ac05d81e08c5ac8166d (patch)
tree6832c0926c40542a955a83b77d70ef3ccc36cfeb /t/t3505-cherry-pick-empty.sh
parent239222f587ed06f96d90dd71c66d80a2b1e3dc9f (diff)
downloadgit-798c35fcd8a71a094ca68ac05d81e08c5ac8166d.zip
git-798c35fcd8a71a094ca68ac05d81e08c5ac8166d.tar.gz
git-798c35fcd8a71a094ca68ac05d81e08c5ac8166d.tar.bz2
get_sha1: warn about full or short object names that look like refs
When we get 40 hex digits, we immediately assume it's an SHA-1. This is the right thing to do because we have no way else to specify an object. If there is a ref with the same object name, it will be ignored. Warn the user about this case because the ref with full object name is likely a mistake, for example git checkout -b $empty_var $(git rev-parse something) advice.object_name_warning is not documented because frankly people should not be aware about it until they encounter this situation. While at there, warn about ambiguation with abbreviated SHA-1 too. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3505-cherry-pick-empty.sh')
0 files changed, 0 insertions, 0 deletions