-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cb/assume-unchanged-fix' into maint
* cb/assume-unchanged-fix: Documentation: git-add does not update files marked "assume unchanged" do not overwrite files marked "assume unchanged"
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
test_description='git update-index --assume-unchanged test. | ||
' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success 'setup' \ | ||
': >file && | ||
git add file && | ||
git commit -m initial && | ||
git branch other && | ||
echo upstream >file && | ||
git add file && | ||
git commit -m upstream' | ||
|
||
test_expect_success 'do not switch branches with dirty file' \ | ||
'git reset --hard && | ||
git checkout other && | ||
echo dirt >file && | ||
git update-index --assume-unchanged file && | ||
test_must_fail git checkout master' | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters