diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-11-23 13:28:53 -0800 |
| commit | 3686aa1caf907d22fe318c28efe93f0e7870ba50 (patch) | |
| tree | f99a303bd14c7343be7ccc5b9df5382f1bf79246 /t/t2011-checkout-invalid-head.sh | |
| parent | aa2577a9c3bd5559bd580feca6edec4d70254adc (diff) | |
| parent | 1e501a7c47ad5ada53d3b1acfb9f131f76e969ec (diff) | |
| download | git-tj/maint-imap-send-remove-unused.tar.gz | |
Merge branch 'maint' into tj/imap-send-remove-unusedtj/maint-imap-send-remove-unused
* maint: (18123 commits)
documentation fix: git difftool uses diff tools, not merge tools.
Git 1.7.7.4
Makefile: add missing header file dependencies
notes merge: eliminate OUTPUT macro
mailmap: xcalloc mailmap_info
name-rev --all: do not even attempt to describe non-commit object
Git 1.7.7.3
docs: Update install-doc-quick
docs: don't mention --quiet or --exit-code in git-log(1)
Git 1.7.7.2
t7511: avoid use of reserved filename on Windows.
clone: Quote user supplied path in a single quote pair
read-cache.c: fix index memory allocation
make the sample pre-commit hook script reject names with newlines, too
Reindent closing bracket using tab instead of spaces
Git 1.7.7.1
RelNotes/1.7.7.1: setgid bit patch is about fixing "git init" via Makefile setting
gitweb: fix regression when filtering out forks
Almost ready for 1.7.7.1
pack-objects: don't traverse objects unnecessarily
...
Conflicts:
imap-send.c
Diffstat (limited to 't/t2011-checkout-invalid-head.sh')
| -rwxr-xr-x | t/t2011-checkout-invalid-head.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/t/t2011-checkout-invalid-head.sh b/t/t2011-checkout-invalid-head.sh new file mode 100755 index 0000000000..300f8bf25c --- /dev/null +++ b/t/t2011-checkout-invalid-head.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +test_description='checkout switching away from an invalid branch' + +. ./test-lib.sh + +test_expect_success 'setup' ' + echo hello >world && + git add world && + git commit -m initial +' + +test_expect_success 'checkout should not start branch from a tree' ' + test_must_fail git checkout -b newbranch master^{tree} +' + +test_expect_success 'checkout master from invalid HEAD' ' + echo $_z40 >.git/HEAD && + git checkout master -- +' + +test_done |
