summaryrefslogtreecommitdiff
path: root/t/t7511-status-index.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/t7511-status-index.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/t7511-status-index.sh')
-rwxr-xr-xt/t7511-status-index.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/t/t7511-status-index.sh b/t/t7511-status-index.sh
new file mode 100755
index 0000000000..b5fdc048a5
--- /dev/null
+++ b/t/t7511-status-index.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+test_description='git status with certain file name lengths'
+
+. ./test-lib.sh
+
+files="0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z"
+
+check() {
+ len=$1
+ prefix=$2
+
+ for i in $files
+ do
+ : >$prefix$i
+ done
+
+ test_expect_success "status, filename length $len" "
+ git add $prefix* &&
+ git status
+ "
+ rm $prefix* .git/index
+}
+
+check 1
+check 2 p
+check 3 px
+check 4 pre
+check 5 pref
+check 6 prefi
+check 7 prefix
+check 8 prefix-
+check 9 prefix-p
+check 10 prefix-pr
+check 11 prefix-pre
+check 12 prefix-pref
+check 13 prefix-prefi
+check 14 prefix-prefix
+check 15 prefix-prefix-
+check 16 prefix-prefix-p
+check 17 prefix-prefix-pr
+check 18 prefix-prefix-pre
+check 19 prefix-prefix-pref
+check 20 prefix-prefix-prefi
+check 21 prefix-prefix-prefix
+check 22 prefix-prefix-prefix-
+check 23 prefix-prefix-prefix-p
+check 24 prefix-prefix-prefix-pr
+
+test_done