]> git.ipfire.org Git - thirdparty/git.git/blame_incremental - t/t2106-update-index-assume-unchanged.sh
Merge branch 'en/fetch-negotiation-default-fix'
[thirdparty/git.git] / t / t2106-update-index-assume-unchanged.sh
... / ...
CommitLineData
1#!/bin/sh
2
3test_description='git update-index --assume-unchanged test.
4'
5
6TEST_PASSES_SANITIZE_LEAK=true
7. ./test-lib.sh
8
9test_expect_success 'setup' '
10 : >file &&
11 git add file &&
12 git commit -m initial &&
13 git branch other &&
14 echo upstream >file &&
15 git add file &&
16 git commit -m upstream
17'
18
19test_expect_success 'do not switch branches with dirty file' '
20 git reset --hard &&
21 git checkout other &&
22 echo dirt >file &&
23 git update-index --assume-unchanged file &&
24 test_must_fail git checkout - 2>err &&
25 test_i18ngrep overwritten err
26'
27
28test_done