Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-04-25 10:41:14 +0300
committerJunio C Hamano <gitster@pobox.com>2019-04-25 10:41:14 +0300
commit4a3ed2bec6031545aea38db10e443a979951346f (patch)
treedbb5ba4597bdd046ac9ed9dc0e57a7de9250a636 /t
parentb72e90712eb0e802b232ad4c88460d04279c7111 (diff)
parent6eff409e8a760645ae5357d1e95e7e7ff3c04456 (diff)
Merge branch 'nd/checkout-m'
"git checkout -m <other>" was about carrying the differences between HEAD and the working-tree files forward while checking out another branch, and ignored the differences between HEAD and the index. The command has been taught to abort when the index and the HEAD are different. * nd/checkout-m: checkout: prevent losing staged changes with --merge read-tree: add --quiet unpack-trees: rename "gently" flag to "quiet" unpack-trees: keep gently check inside add_rejected_path
Diffstat (limited to 't')
-rwxr-xr-xt/t7201-co.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 72b9b375ba..5990299fc9 100755
--- a/t/t7201-co.sh
+++ b/t/t7201-co.sh
@@ -223,13 +223,8 @@ test_expect_success 'switch to another branch while carrying a deletion' '
test_must_fail git checkout simple 2>errs &&
test_i18ngrep overwritten errs &&
- git checkout --merge simple 2>errs &&
- test_i18ngrep ! overwritten errs &&
- git ls-files -u &&
- test_must_fail git cat-file -t :0:two &&
- test "$(git cat-file -t :1:two)" = blob &&
- test "$(git cat-file -t :2:two)" = blob &&
- test_must_fail git cat-file -t :3:two
+ test_must_fail git read-tree --quiet -m -u HEAD simple 2>errs &&
+ test_must_be_empty errs
'
test_expect_success 'checkout to detach HEAD (with advice declined)' '