summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/lib-httpd.sh4
-rwxr-xr-xt/perf/p7300-clean.sh4
-rwxr-xr-xt/t0001-init.sh17
-rwxr-xr-xt/t0027-auto-crlf.sh121
-rwxr-xr-xt/t0060-path-utils.sh3
-rwxr-xr-xt/t0061-run-command.sh53
-rwxr-xr-xt/t1100-commit-tree-options.sh4
-rwxr-xr-xt/t1401-symbolic-ref.sh39
-rwxr-xr-xt/t1410-reflog.sh37
-rwxr-xr-xt/t1511-rev-parse-caret.sh4
-rwxr-xr-xt/t1512-rev-parse-disambiguation.sh8
-rwxr-xr-xt/t1700-split-index.sh2
-rwxr-xr-xt/t2011-checkout-invalid-head.sh39
-rwxr-xr-xt/t2025-worktree-add.sh4
-rwxr-xr-xt/t2102-update-index-symlinks.sh2
-rwxr-xr-xt/t3000-ls-files-others.sh7
-rwxr-xr-xt/t3001-ls-files-others-exclude.sh25
-rwxr-xr-xt/t3030-merge-recursive.sh2
-rwxr-xr-xt/t3100-ls-tree-restrict.sh2
-rwxr-xr-xt/t3101-ls-tree-dirname.sh2
-rwxr-xr-xt/t3203-branch-output.sh8
-rwxr-xr-xt/t3210-pack-refs.sh2
-rwxr-xr-xt/t3301-notes.sh10
-rwxr-xr-xt/t3308-notes-merge.sh22
-rwxr-xr-xt/t3403-rebase-skip.sh2
-rwxr-xr-xt/t3404-rebase-interactive.sh16
-rwxr-xr-xt/t3511-cherry-pick-x.sh14
-rwxr-xr-xt/t3600-rm.sh4
-rwxr-xr-xt/t3700-add.sh16
-rwxr-xr-xt/t4014-format-patch.sh29
-rwxr-xr-xt/t4056-diff-order.sh6
-rwxr-xr-xt/t4201-shortlog.sh22
-rwxr-xr-xt/t4202-log.sh29
-rwxr-xr-xt/t5100-mailinfo.sh12
-rwxr-xr-xt/t5300-pack-object.sh18
-rwxr-xr-xt/t5301-sliding-window.sh14
-rwxr-xr-xt/t5302-pack-index.sh34
-rwxr-xr-xt/t5303-pack-corruption-resilience.sh16
-rwxr-xr-xt/t5304-prune.sh2
-rwxr-xr-xt/t5305-include-tag.sh8
-rwxr-xr-xt/t5500-fetch-pack.sh20
-rwxr-xr-xt/t5505-remote.sh2
-rwxr-xr-xt/t5506-remote-groups.sh2
-rwxr-xr-xt/t5510-fetch.sh23
-rwxr-xr-xt/t5512-ls-remote.sh45
-rwxr-xr-xt/t5515-fetch-merge-logic.sh4
-rwxr-xr-xt/t5516-fetch-push.sh4
-rwxr-xr-xt/t5517-push-mirror.sh2
-rwxr-xr-xt/t5520-pull.sh10
-rwxr-xr-xt/t5522-pull-symlink.sh2
-rwxr-xr-xt/t5526-fetch-submodules.sh71
-rwxr-xr-xt/t5530-upload-pack-error.sh2
-rwxr-xr-xt/t5531-deep-submodule-push.sh217
-rwxr-xr-xt/t5532-fetch-proxy.sh4
-rwxr-xr-xt/t5537-fetch-shallow.sh4
-rwxr-xr-xt/t5538-push-shallow.sh4
-rwxr-xr-xt/t5550-http-fetch-dumb.sh8
-rwxr-xr-xt/t5570-git-daemon.sh8
-rwxr-xr-xt/t5601-clone.sh25
-rwxr-xr-xt/t5700-clone-reference.sh2
-rwxr-xr-xt/t5710-info-alternate.sh2
-rwxr-xr-xt/t5900-repo-selection.sh2
-rwxr-xr-xt/t6001-rev-list-graft.sh12
-rwxr-xr-xt/t6002-rev-list-bisect.sh6
-rwxr-xr-xt/t6015-rev-list-show-all-parents.sh6
-rwxr-xr-xt/t6023-merge-file.sh13
-rwxr-xr-xt/t6032-merge-large-rename.sh2
-rwxr-xr-xt/t6050-replace.sh10
-rwxr-xr-xt/t6132-pathspec-exclude.sh2
-rwxr-xr-xt/t6300-for-each-ref.sh74
-rwxr-xr-xt/t7001-mv.sh4
-rwxr-xr-xt/t7003-filter-branch.sh14
-rwxr-xr-xt/t7004-tag.sh24
-rwxr-xr-xt/t7006-pager.sh2
-rwxr-xr-xt/t7103-reset-bare.sh2
-rwxr-xr-xt/t7406-submodule-update.sh4
-rwxr-xr-xt/t7408-submodule-reference.sh2
-rwxr-xr-xt/t7504-commit-msg-hook.sh2
-rwxr-xr-xt/t7505-prepare-commit-msg-hook.sh32
-rwxr-xr-xt/t7513-interpret-trailers.sh40
-rwxr-xr-xt/t7602-merge-octopus-many.sh8
-rwxr-xr-xt/t7700-repack.sh4
-rwxr-xr-xt/t7810-grep.sh49
-rwxr-xr-xt/t8003-blame-corner-cases.sh4
-rwxr-xr-xt/t9001-send-email.sh27
-rwxr-xr-xt/t9100-git-svn-basic.sh8
-rwxr-xr-xt/t9101-git-svn-props.sh30
-rwxr-xr-xt/t9104-git-svn-follow-parent.sh68
-rwxr-xr-xt/t9105-git-svn-commit-diff.sh4
-rwxr-xr-xt/t9107-git-svn-migrate.sh28
-rwxr-xr-xt/t9108-git-svn-glob.sh20
-rwxr-xr-xt/t9109-git-svn-multi-glob.sh32
-rwxr-xr-xt/t9110-git-svn-use-svm-props.sh2
-rwxr-xr-xt/t9114-git-svn-dcommit-merge.sh12
-rwxr-xr-xt/t9118-git-svn-funky-branch-names.sh2
-rwxr-xr-xt/t9119-git-svn-info.sh2
-rwxr-xr-xt/t9129-git-svn-i18n-commitencoding.sh4
-rwxr-xr-xt/t9130-git-svn-authors-file.sh12
-rwxr-xr-xt/t9132-git-svn-broken-symlink.sh4
-rwxr-xr-xt/t9137-git-svn-dcommit-clobber-series.sh24
-rwxr-xr-xt/t9138-git-svn-authors-prog.sh2
-rwxr-xr-xt/t9145-git-svn-master-branch.sh4
-rwxr-xr-xt/t9150-svk-mergetickets.sh2
-rwxr-xr-xt/t9300-fast-import.sh68
-rwxr-xr-xt/t9350-fast-export.sh6
-rwxr-xr-xt/t9501-gitweb-standalone-http-status.sh6
-rwxr-xr-xt/t9818-git-p4-block.sh28
-rwxr-xr-xt/t9827-git-p4-change-filetype.sh66
-rwxr-xr-xt/t9901-git-web--browse.sh2
-rw-r--r--t/test-lib.sh18
110 files changed, 1382 insertions, 541 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index e9714467d0..f9f3e5fd82 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -98,8 +98,8 @@ then
test_skip_or_die $GIT_TEST_HTTPD "no web server found at '$LIB_HTTPD_PATH'"
fi
-HTTPD_VERSION=`$LIB_HTTPD_PATH -v | \
- sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q'`
+HTTPD_VERSION=$($LIB_HTTPD_PATH -v | \
+ sed -n 's/^Server version: Apache\/\([0-9]*\)\..*$/\1/p; q')
if test -n "$HTTPD_VERSION"
then
diff --git a/t/perf/p7300-clean.sh b/t/perf/p7300-clean.sh
index ec94cdd657..7c1888a27e 100755
--- a/t/perf/p7300-clean.sh
+++ b/t/perf/p7300-clean.sh
@@ -28,4 +28,8 @@ test_perf 'clean many untracked sub dirs, ignore nested git' '
git clean -n -q -f -f -d 100000_sub_dirs/
'
+test_perf 'ls-files -o' '
+ git ls-files -o
+'
+
test_done
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index f91bbcfc85..295aa5949a 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -87,6 +87,23 @@ test_expect_success 'plain nested in bare through aliased command' '
check_config bare-ancestor-aliased.git/plain-nested/.git false unset
'
+test_expect_success 'No extra GIT_* on alias scripts' '
+ (
+ env | sed -ne "/^GIT_/s/=.*//p" &&
+ echo GIT_PREFIX && # setup.c
+ echo GIT_TEXTDOMAINDIR # wrapper-for-bin.sh
+ ) | sort | uniq >expected &&
+ cat <<-\EOF >script &&
+ #!/bin/sh
+ env | sed -ne "/^GIT_/s/=.*//p" | sort >actual
+ exit 0
+ EOF
+ chmod 755 script &&
+ git config alias.script \!./script &&
+ ( mkdir sub && cd sub && git script ) &&
+ test_cmp expected actual
+'
+
test_expect_success 'plain with GIT_WORK_TREE' '
mkdir plain-wt &&
test_must_fail env GIT_WORK_TREE="$(pwd)/plain-wt" git init plain-wt
diff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh
index b343651504..504e5a02a1 100755
--- a/t/t0027-auto-crlf.sh
+++ b/t/t0027-auto-crlf.sh
@@ -56,21 +56,16 @@ create_gitattributes () {
}
create_NNO_files () {
- lfname=$1
- crlfname=$2
- lfmixcrlf=$3
- lfmixcr=$4
- crlfnul=$5
for crlf in false true input
do
for attr in "" auto text -text lf crlf
do
pfx=NNO_${crlf}_attr_${attr} &&
- cp $lfname ${pfx}_LF.txt &&
- cp $crlfname ${pfx}_CRLF.txt &&
- cp $lfmixcrlf ${pfx}_CRLF_mix_LF.txt &&
- cp $lfmixcr ${pfx}_LF_mix_CR.txt &&
- cp $crlfnul ${pfx}_CRLF_nul.txt
+ cp CRLF_mix_LF ${pfx}_LF.txt &&
+ cp CRLF_mix_LF ${pfx}_CRLF.txt &&
+ cp CRLF_mix_LF ${pfx}_CRLF_mix_LF.txt &&
+ cp CRLF_mix_LF ${pfx}_LF_mix_CR.txt &&
+ cp CRLF_mix_LF ${pfx}_CRLF_nul.txt
done
done
}
@@ -96,7 +91,7 @@ commit_check_warn () {
crlfnul=$7
pfx=crlf_${crlf}_attr_${attr}
create_gitattributes "$attr" &&
- for f in LF CRLF repoMIX LF_mix_CR CRLF_mix_LF LF_nul CRLF_nul
+ for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul CRLF_nul
do
fname=${pfx}_$f.txt &&
cp $f $fname &&
@@ -149,6 +144,27 @@ commit_chk_wrnNNO () {
'
}
+stats_ascii () {
+ case "$1" in
+ LF)
+ echo lf
+ ;;
+ CRLF)
+ echo crlf
+ ;;
+ CRLF_mix_LF)
+ echo mixed
+ ;;
+ LF_mix_CR|CRLF_nul|LF_nul|CRLF_mix_CR)
+ echo "-text"
+ ;;
+ *)
+ echo error_invalid $1
+ ;;
+ esac
+
+}
+
check_files_in_repo () {
crlf=$1
attr=$2
@@ -203,35 +219,83 @@ checkout_files () {
create_gitattributes $attr &&
git config core.autocrlf $crlf &&
pfx=eol_${eol}_crlf_${crlf}_attr_${attr}_ &&
- src=crlf_false_attr__ &&
for f in LF CRLF LF_mix_CR CRLF_mix_LF LF_nul
do
- rm $src$f.txt &&
+ rm crlf_false_attr__$f.txt &&
if test -z "$eol"; then
- git checkout $src$f.txt
+ git checkout crlf_false_attr__$f.txt
else
- git -c core.eol=$eol checkout $src$f.txt
+ git -c core.eol=$eol checkout crlf_false_attr__$f.txt
fi
done
+ test_expect_success "ls-files --eol $lfname ${pfx}LF.txt" '
+ test_when_finished "rm expect actual" &&
+ sort <<-EOF >expect &&
+ i/crlf w/$(stats_ascii $crlfname) crlf_false_attr__CRLF.txt
+ i/mixed w/$(stats_ascii $lfmixcrlf) crlf_false_attr__CRLF_mix_LF.txt
+ i/lf w/$(stats_ascii $lfname) crlf_false_attr__LF.txt
+ i/-text w/$(stats_ascii $lfmixcr) crlf_false_attr__LF_mix_CR.txt
+ i/-text w/$(stats_ascii $crlfnul) crlf_false_attr__CRLF_nul.txt
+ i/-text w/$(stats_ascii $crlfnul) crlf_false_attr__LF_nul.txt
+ EOF
+ git ls-files --eol crlf_false_attr__* |
+ sed -e "s!attr/[^ ]*!!g" -e "s/ / /g" -e "s/ */ /g" |
+ sort >actual &&
+ test_cmp expect actual
+ '
test_expect_success "checkout core.eol=$eol core.autocrlf=$crlf gitattributes=$attr file=LF" "
- compare_ws_file $pfx $lfname ${src}LF.txt
+