summaryrefslogtreecommitdiff
path: root/t/t2202-add-addremove.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-11-23 13:28:53 -0800
committerJunio C Hamano <gitster@pobox.com>2011-11-23 13:28:53 -0800
commit3686aa1caf907d22fe318c28efe93f0e7870ba50 (patch)
treef99a303bd14c7343be7ccc5b9df5382f1bf79246 /t/t2202-add-addremove.sh
parentaa2577a9c3bd5559bd580feca6edec4d70254adc (diff)
parent1e501a7c47ad5ada53d3b1acfb9f131f76e969ec (diff)
downloadgit-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/t2202-add-addremove.sh')
-rwxr-xr-xt/t2202-add-addremove.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/t/t2202-add-addremove.sh b/t/t2202-add-addremove.sh
new file mode 100755
index 0000000000..6a8151064c
--- /dev/null
+++ b/t/t2202-add-addremove.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+test_description='git add --all'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+ (
+ echo .gitignore
+ echo will-remove
+ ) >expect &&
+ (
+ echo actual
+ echo expect
+ echo ignored
+ ) >.gitignore &&
+ >will-remove &&
+ git add --all &&
+ test_tick &&
+ git commit -m initial &&
+ git ls-files >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'git add --all' '
+ (
+ echo .gitignore
+ echo not-ignored
+ echo "M .gitignore"
+ echo "A not-ignored"
+ echo "D will-remove"
+ ) >expect &&
+ >ignored &&
+ >not-ignored &&
+ echo modification >>.gitignore &&
+ rm -f will-remove &&
+ git add --all &&
+ git update-index --refresh &&
+ git ls-files >actual &&
+ git diff-index --name-status --cached HEAD >>actual &&
+ test_cmp expect actual
+'
+
+test_done