* Re: Errors building git-1.5.6 from source on Mac OS X 10.4.11
From: Ifejinelo Onyiah @ 2008-06-26 8:48 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
In-Reply-To: <20080625175311.GB4039@steel.home>
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
2008/6/25 Alex Riesen <raa.lkml@gmail.com>:
> Ifejinelo Onyiah, Wed, Jun 25, 2008 15:20:39 +0200:
>>
>> They all run fine but when I issue the make test command, it dies at
>> the following:
>>
>> % make test
>>
>> ... TRUNCATED OUTPUT ...
>>
>> *** t2004-checkout-cache-temp.sh ***
>> * FAIL 1: preparation
>>
>
> If you don't mind helping the investigation a bit, could you please go
> into the t/ directory and run
>
> bash -x t2004-checkout-cache-temp.sh -d -v -i
>
> and post the output here?
I ran that command and it seemed to run with no problems. I have
provided the output in 2 attached text files. I hope that is ok.
> This diagnostics are much more useful (well, essential, in this case). Are running the tests on HFS+, BTW?
>
I am not sure of that. This is my first time I've heard of HFS+.
[-- Attachment #2: stderr.txt --]
[-- Type: text/plain, Size: 53156 bytes --]
+ test_description=git checkout-index --temp test.
With --temp flag, git checkout-index writes to temporary merge files
rather than the tracked path.
+ . ./test-lib.sh
++ ORIGINAL_TERM=xterm-color
++ LANG=C
++ LC_ALL=C
++ PAGER=cat
++ TZ=UTC
++ TERM=dumb
++ export LANG LC_ALL PAGER TERM TZ
++ EDITOR=:
++ VISUAL=:
++ unset GIT_EDITOR
++ unset AUTHOR_DATE
++ unset AUTHOR_EMAIL
++ unset AUTHOR_NAME
++ unset COMMIT_AUTHOR_EMAIL
++ unset COMMIT_AUTHOR_NAME
++ unset EMAIL
++ unset GIT_ALTERNATE_OBJECT_DIRECTORIES
++ unset GIT_AUTHOR_DATE
++ GIT_AUTHOR_EMAIL=author@example.com
++ GIT_AUTHOR_NAME=A U Thor
++ unset GIT_COMMITTER_DATE
++ GIT_COMMITTER_EMAIL=committer@example.com
++ GIT_COMMITTER_NAME=C O Mitter
++ unset GIT_DIFF_OPTS
++ unset GIT_DIR
++ unset GIT_WORK_TREE
++ unset GIT_EXTERNAL_DIFF
++ unset GIT_INDEX_FILE
++ unset GIT_OBJECT_DIRECTORY
++ unset SHA1_FILE_DIRECTORIES
++ unset SHA1_FILE_DIRECTORY
++ GIT_MERGE_VERBOSITY=5
++ export GIT_MERGE_VERBOSITY
++ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
++ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
++ export EDITOR VISUAL
++ GIT_TEST_CMP=diff -u
++ unset CDPATH
+++ echo
+++ tr '[A-Z]' '[a-z]'
++ '[' xxterm-color '!=' xdumb ']'
++ TERM=xterm-color
++ export TERM
++ '[' -t 1 ']'
++ test 3 -ne 0
++ debug=t
++ shift
++ test 2 -ne 0
++ verbose=t
++ shift
++ test 1 -ne 0
++ immediate=t
++ shift
++ test 0 -ne 0
++ test -n ''
++ test 'git checkout-index --temp test.
With --temp flag, git checkout-index writes to temporary merge files
rather than the tracked path.' '!=' ''
++ test '' = t
++ exec
++ test t = t
++ exec
++ test_failure=0
++ test_count=0
++ test_fixed=0
++ test_broken=0
++ trap die exit
+++ pwd
++ PATH=/Users/io1/Desktop/git-1.5.6/t/..:/usr/local/bin:/usr/local/mysql/bin:/Users/io1/Applications/Ruby/bin:/Users/io1/Applications/Perl/bin:/bin:/sbin:/usr/bin:/usr/sbin
+++ pwd
++ GIT_EXEC_PATH=/Users/io1/Desktop/git-1.5.6/t/..
+++ pwd
++ GIT_TEMPLATE_DIR=/Users/io1/Desktop/git-1.5.6/t/../templates/blt
++ unset GIT_CONFIG
++ unset GIT_CONFIG_LOCAL
++ GIT_CONFIG_NOSYSTEM=1
++ GIT_CONFIG_NOGLOBAL=1
++ export PATH GIT_EXEC_PATH GIT_TEMPLATE_DIR GIT_CONFIG_NOSYSTEM GIT_CONFIG_NOGLOBAL
+++ pwd
+++ pwd
++ GITPERLLIB=/Users/io1/Desktop/git-1.5.6/t/../perl/blib/lib:/Users/io1/Desktop/git-1.5.6/t/../perl/blib/arch/auto/Git
++ export GITPERLLIB
++ test -d ../templates/blt
++ test -x ../test-chmtime
++ . ../GIT-BUILD-OPTIONS
+++ SHELL_PATH=/bin/sh
++ test=trash directory
++ rm -fr 'trash directory'
++ test_create_repo 'trash directory'
++ test 1 = 1
+++ pwd
++ owd=/Users/io1/Desktop/git-1.5.6/t
++ repo=trash directory
++ mkdir 'trash directory'
++ cd 'trash directory'
++ /Users/io1/Desktop/git-1.5.6/t/../git init --template=/Users/io1/Desktop/git-1.5.6/t/../templates/blt/
++ mv .git/hooks .git/hooks-disabled
++ cd /Users/io1/Desktop/git-1.5.6/t
++ cd -P 'trash directory'
+++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
++ this_test=t2004
+ test_expect_success preparation '
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
+ test 2 = 2
+ test_skip preparation '
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 0 + 1
+ this_test=t2004.1
+ to_skip=
+ false
+ say 'expecting success:
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
+ say_color info 'expecting success:
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
+ test -z info
+ shift
+ echo '* expecting success:
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
+ test_run_ '
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
+ eval '
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)'
++ mkdir asubdir
++ echo tree1path0
++ echo tree1path1
++ echo tree1path3
++ echo tree1path4
++ echo tree1asubdir/path5
++ git update-index --add path0 path1 path3 path4 asubdir/path5
+++ git write-tree
++ t1=55e7ce41e13ffba28c4b9d7b40c5b338786c48b5
++ rm -f path0 path1 path3 path4 '.merge_*' out .git/index
++ echo tree2path0
++ echo tree2path1
++ echo tree2path2
++ echo tree2path4
++ git update-index --add path0 path1 path2 path4
+++ git write-tree
++ t2=9ad8b17bf35b3a2e8f34dc723dd036870eaf5ecf
++ rm -f path0 path1 path2 path4 '.merge_*' out .git/index
++ echo tree2path0
++ echo tree3path1
++ echo tree3path2
++ echo tree3path3
++ git update-index --add path0 path1 path2 path3
+++ git write-tree
++ t3=869c54176b16104872b38d0471bc4fcc35f46beb
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ preparation
++ expr 0 + 1
+ test_count=1
+ say_color '' ' ok 1: preparation'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 1: preparation'
+ echo ''
+ test_expect_success 'checkout one stage 0 to temporary file' '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
+ test 2 = 2
+ test_skip 'checkout one stage 0 to temporary file' '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 1 + 1
+ this_test=t2004.2
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
+ say_color info 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
+ test_run_ '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
+ eval '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1'
++ rm -f path0 path1 path2 path3 '.merge_*' out .git/index
++ git read-tree 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5
++ git checkout-index --temp -- path1
+++ wc -l
++ test 1 = 1
+++ cut '-d ' -f2 out
++ test path1 = path1
+++ cut '-d ' -f1 out
++ p=.merge_file_SkWrTm
++ test -f .merge_file_SkWrTm
+++ cat .merge_file_SkWrTm
++ test tree1path1 = tree1path1
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout one stage 0 to temporary file'
++ expr 1 + 1
+ test_count=2
+ say_color '' ' ok 2: checkout one stage 0 to temporary file'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 2: checkout one stage 0 to temporary file'
+ echo ''
+ test_expect_success 'checkout all stage 0 to temporary files' '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
+ test 2 = 2
+ test_skip 'checkout all stage 0 to temporary files' '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 2 + 1
+ this_test=t2004.3
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
+ say_color info 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
+ test_run_ '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
+ eval '
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done'
++ rm -f 'path*' .merge_file_SkWrTm out .git/index
++ git read-tree 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5
++ git checkout-index -a --temp
+++ wc -l
++ test 5 = 5
+++ cut '-d ' -f2
+++ grep path0 out
++ test path0 = path0
+++ grep path0 out
+++ cut '-d ' -f1
++ p=.merge_file_umMWZK
++ test -f .merge_file_umMWZK
+++ cat .merge_file_umMWZK
++ test tree1path0 = tree1path0
+++ grep path1 out
+++ cut '-d ' -f2
++ test path1 = path1
+++ cut '-d ' -f1
+++ grep path1 out
++ p=.merge_file_pqCP9Q
++ test -f .merge_file_pqCP9Q
+++ cat .merge_file_pqCP9Q
++ test tree1path1 = tree1path1
+++ grep path3 out
+++ cut '-d ' -f2
++ test path3 = path3
+++ grep path3 out
+++ cut '-d ' -f1
++ p=.merge_file_htNBuR
++ test -f .merge_file_htNBuR
+++ cat .merge_file_htNBuR
++ test tree1path3 = tree1path3
+++ cut '-d ' -f2
+++ grep path4 out
++ test path4 = path4
+++ grep path4 out
+++ cut '-d ' -f1
++ p=.merge_file_wK37Ga
++ test -f .merge_file_wK37Ga
+++ cat .merge_file_wK37Ga
++ test tree1path4 = tree1path4
+++ grep asubdir/path5 out
+++ cut '-d ' -f2
++ test asubdir/path5 = asubdir/path5
+++ grep asubdir/path5 out
+++ cut '-d ' -f1
++ p=.merge_file_HHTltB
++ test -f .merge_file_HHTltB
+++ cat .merge_file_HHTltB
++ test tree1asubdir/path5 = tree1asubdir/path5
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout all stage 0 to temporary files'
++ expr 2 + 1
+ test_count=3
+ say_color '' ' ok 3: checkout all stage 0 to temporary files'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 3: checkout all stage 0 to temporary files'
+ echo ''
+ test_expect_success 'prepare 3-way merge' '
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
+ test 2 = 2
+ test_skip 'prepare 3-way merge' '
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 3 + 1
+ this_test=t2004.4
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
+ say_color info 'expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
+ test_run_ '
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
+ eval '
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3'
++ rm -f 'path*' .merge_file_HHTltB .merge_file_htNBuR .merge_file_pqCP9Q .merge_file_umMWZK .merge_file_wK37Ga out .git/index
++ git read-tree -m 55e7ce41e13ffba28c4b9d7b40c5b338786c48b5 9ad8b17bf35b3a2e8f34dc723dd036870eaf5ecf 869c54176b16104872b38d0471bc4fcc35f46beb
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'prepare 3-way merge'
++ expr 3 + 1
+ test_count=4
+ say_color '' ' ok 4: prepare 3-way merge'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 4: prepare 3-way merge'
+ echo ''
+ test_expect_success 'checkout one stage 2 to temporary file' '
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
+ test 2 = 2
+ test_skip 'checkout one stage 2 to temporary file' '
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 4 + 1
+ this_test=t2004.5
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
+ eval '
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1'
++ rm -f 'path*' '.merge_*' out
++ git checkout-index --stage=2 --temp -- path1
+++ wc -l
++ test 1 = 1
+++ cut '-d ' -f2 out
++ test path1 = path1
+++ cut '-d ' -f1 out
++ p=.merge_file_Pq7U41
++ test -f .merge_file_Pq7U41
+++ cat .merge_file_Pq7U41
++ test tree2path1 = tree2path1
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout one stage 2 to temporary file'
++ expr 4 + 1
+ test_count=5
+ say_color '' ' ok 5: checkout one stage 2 to temporary file'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 5: checkout one stage 2 to temporary file'
+ echo ''
+ test_expect_success 'checkout all stage 2 to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
+ test 2 = 2
+ test_skip 'checkout all stage 2 to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 5 + 1
+ this_test=t2004.6
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
+ eval '
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done'
++ rm -f 'path*' .merge_file_Pq7U41 out
++ git checkout-index --all --stage=2 --temp
+++ wc -l
++ test 3 = 3
+++ grep path1 out
+++ cut '-d ' -f2
++ test path1 = path1
+++ grep path1 out
+++ cut '-d ' -f1
++ p=.merge_file_bE0Spf
++ test -f .merge_file_bE0Spf
+++ cat .merge_file_bE0Spf
++ test tree2path1 = tree2path1
+++ grep path2 out
+++ cut '-d ' -f2
++ test path2 = path2
+++ grep path2 out
+++ cut '-d ' -f1
++ p=.merge_file_tAZ3x2
++ test -f .merge_file_tAZ3x2
+++ cat .merge_file_tAZ3x2
++ test tree2path2 = tree2path2
+++ cut '-d ' -f2
+++ grep path4 out
++ test path4 = path4
+++ grep path4 out
+++ cut '-d ' -f1
++ p=.merge_file_5R9M2N
++ test -f .merge_file_5R9M2N
+++ cat .merge_file_5R9M2N
++ test tree2path4 = tree2path4
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout all stage 2 to temporary files'
++ expr 5 + 1
+ test_count=6
+ say_color '' ' ok 6: checkout all stage 2 to temporary files'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 6: checkout all stage 2 to temporary files'
+ echo ''
+ test_expect_success 'checkout all stages/one file to nothing' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
+ test 2 = 2
+ test_skip 'checkout all stages/one file to nothing' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 6 + 1
+ this_test=t2004.7
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
+ eval '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0'
++ rm -f 'path*' .merge_file_5R9M2N .merge_file_bE0Spf .merge_file_tAZ3x2 out
++ git checkout-index --stage=all --temp -- path0
git-checkout-index: path0 does not exist at stage 4
+++ wc -l
++ test 0 = 0
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout all stages/one file to nothing'
++ expr 6 + 1
+ test_count=7
+ say_color '' ' ok 7: checkout all stages/one file to nothing'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 7: checkout all stages/one file to nothing'
+ echo ''
+ test_expect_success 'checkout all stages/one file to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test 2 = 2
+ test_skip 'checkout all stages/one file to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 7 + 1
+ this_test=t2004.8
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ eval '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
++ rm -f 'path*' '.merge_*' out
++ git checkout-index --stage=all --temp -- path1
+++ wc -l
++ test 1 = 1
+++ cut '-d ' -f2 out
++ test path1 = path1
++ cut '-d ' -f1 out
++ read s1 s2 s3
++ test -f .merge_file_JSK1BD
++ test -f .merge_file_zH0Aoa
++ test -f .merge_file_8ToCkP
+++ cat .merge_file_JSK1BD
++ test tree1path1 = tree1path1
+++ cat .merge_file_zH0Aoa
++ test tree2path1 = tree2path1
+++ cat .merge_file_8ToCkP
++ test tree3path1 = tree3path1
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout all stages/one file to temporary files'
++ expr 7 + 1
+ test_count=8
+ say_color '' ' ok 8: checkout all stages/one file to temporary files'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 8: checkout all stages/one file to temporary files'
+ echo ''
+ test_expect_success 'checkout some stages/one file to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test 2 = 2
+ test_skip 'checkout some stages/one file to temporary files' '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 8 + 1
+ this_test=t2004.9
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ eval '
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
++ rm -f 'path*' .merge_file_8ToCkP .merge_file_JSK1BD .merge_file_zH0Aoa out
++ git checkout-index --stage=all --temp -- path2
+++ wc -l
++ test 1 = 1
+++ cut '-d ' -f2 out
++ test path2 = path2
++ cut '-d ' -f1 out
++ read s1 s2 s3
++ test . = .
++ test -f .merge_file_0O9Rze
++ test -f .merge_file_4ya4xG
+++ cat .merge_file_0O9Rze
++ test tree2path2 = tree2path2
+++ cat .merge_file_4ya4xG
++ test tree3path2 = tree3path2
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout some stages/one file to temporary files'
++ expr 8 + 1
+ test_count=9
+ say_color '' ' ok 9: checkout some stages/one file to temporary files'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 9: checkout some stages/one file to temporary files'
+ echo ''
+ test_expect_success 'checkout all stages/all files to temporary files' '
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
+ test 2 = 2
+ test_skip 'checkout all stages/all files to temporary files' '
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 9 + 1
+ this_test=t2004.10
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
+ say_color info 'expecting success:
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
+ test_run_ '
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
+ eval '
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5'
++ rm -f 'path*' .merge_file_0O9Rze .merge_file_4ya4xG out
++ git checkout-index -a --stage=all --temp
+++ wc -l
++ test 5 = 5
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout all stages/all files to temporary files'
++ expr 9 + 1
+ test_count=10
+ say_color '' ' ok 10: checkout all stages/all files to temporary files'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 10: checkout all stages/all files to temporary files'
+ echo ''
+ test_expect_success '-- path0: no entry' '
test x$(grep path0 out | cut "-d " -f2) = x'
+ test 2 = 2
+ test_skip '-- path0: no entry' '
test x$(grep path0 out | cut "-d " -f2) = x'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 10 + 1
+ this_test=t2004.11
+ to_skip=
+ false
+ say 'expecting success:
test x$(grep path0 out | cut "-d " -f2) = x'
+ say_color info 'expecting success:
test x$(grep path0 out | cut "-d " -f2) = x'
+ test -z info
+ shift
+ echo '* expecting success:
test x$(grep path0 out | cut "-d " -f2) = x'
+ test_run_ '
test x$(grep path0 out | cut "-d " -f2) = x'
+ eval '
test x$(grep path0 out | cut "-d " -f2) = x'
+++ grep path0 out
+++ cut '-d ' -f2
++ test x = x
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- path0: no entry'
++ expr 10 + 1
+ test_count=11
+ say_color '' ' ok 11: -- path0: no entry'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 11: -- path0: no entry'
+ echo ''
+ test_expect_success '-- path1: all 3 stages' '
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test 2 = 2
+ test_skip '-- path1: all 3 stages' '
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 11 + 1
+ this_test=t2004.12
+ to_skip=
+ false
+ say 'expecting success:
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ say_color info 'expecting success:
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test -z info
+ shift
+ echo '* expecting success:
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ test_run_ '
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+ eval '
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)'
+++ grep path1 out
+++ cut '-d ' -f2
++ test path1 = path1
++ grep path1 out
++ cut '-d ' -f1
++ read s1 s2 s3
++ test -f .merge_file_h8tXrD
++ test -f .merge_file_rN8rTd
++ test -f .merge_file_dmW8IZ
+++ cat .merge_file_h8tXrD
++ test tree1path1 = tree1path1
+++ cat .merge_file_rN8rTd
++ test tree2path1 = tree2path1
+++ cat .merge_file_dmW8IZ
++ test tree3path1 = tree3path1
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- path1: all 3 stages'
++ expr 11 + 1
+ test_count=12
+ say_color '' ' ok 12: -- path1: all 3 stages'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 12: -- path1: all 3 stages'
+ echo ''
+ test_expect_success '-- path2: no stage 1, have stage 2 and 3' '
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test 2 = 2
+ test_skip '-- path2: no stage 1, have stage 2 and 3' '
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 12 + 1
+ this_test=t2004.13
+ to_skip=
+ false
+ say 'expecting success:
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ say_color info 'expecting success:
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test -z info
+ shift
+ echo '* expecting success:
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ test_run_ '
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+ eval '
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)'
+++ grep path2 out
+++ cut '-d ' -f2
++ test path2 = path2
++ grep path2 out
++ cut '-d ' -f1
++ read s1 s2 s3
++ test . = .
++ test -f .merge_file_jmbxjv
++ test -f .merge_file_8cWHrQ
+++ cat .merge_file_jmbxjv
++ test tree2path2 = tree2path2
+++ cat .merge_file_8cWHrQ
++ test tree3path2 = tree3path2
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- path2: no stage 1, have stage 2 and 3'
++ expr 12 + 1
+ test_count=13
+ say_color '' ' ok 13: -- path2: no stage 1, have stage 2 and 3'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 13: -- path2: no stage 1, have stage 2 and 3'
+ echo ''
+ test_expect_success '-- path3: no stage 2, have stage 1 and 3' '
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+ test 2 = 2
+ test_skip '-- path3: no stage 2, have stage 1 and 3' '
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 13 + 1
+ this_test=t2004.14
+ to_skip=
+ false
+ say 'expecting success:
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+ say_color info 'expecting success:
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+ test -z info
+ shift
+ echo '* expecting success:
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+ test_run_ '
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+ eval '
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)'
+++ grep path3 out
+++ cut '-d ' -f2
++ test path3 = path3
++ grep path3 out
++ cut '-d ' -f1
++ read s1 s2 s3
++ test -f .merge_file_6iyvpx
++ test . = .
++ test -f .merge_file_bFIigi
+++ cat .merge_file_6iyvpx
++ test tree1path3 = tree1path3
+++ cat .merge_file_bFIigi
++ test tree3path3 = tree3path3
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- path3: no stage 2, have stage 1 and 3'
++ expr 13 + 1
+ test_count=14
+ say_color '' ' ok 14: -- path3: no stage 2, have stage 1 and 3'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 14: -- path3: no stage 2, have stage 1 and 3'
+ echo ''
+ test_expect_success '-- path4: no stage 3, have stage 1 and 3' '
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+ test 2 = 2
+ test_skip '-- path4: no stage 3, have stage 1 and 3' '
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 14 + 1
+ this_test=t2004.15
+ to_skip=
+ false
+ say 'expecting success:
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+ say_color info 'expecting success:
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+ test -z info
+ shift
+ echo '* expecting success:
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+ test_run_ '
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+ eval '
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)'
+++ grep path4 out
+++ cut '-d ' -f2
++ test path4 = path4
++ grep path4 out
++ cut '-d ' -f1
++ read s1 s2 s3
++ test -f .merge_file_f0hTvT
++ test -f .merge_file_sYiYst
++ test . = .
+++ cat .merge_file_f0hTvT
++ test tree1path4 = tree1path4
+++ cat .merge_file_sYiYst
++ test tree2path4 = tree2path4
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- path4: no stage 3, have stage 1 and 3'
++ expr 14 + 1
+ test_count=15
+ say_color '' ' ok 15: -- path4: no stage 3, have stage 1 and 3'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 15: -- path4: no stage 3, have stage 1 and 3'
+ echo ''
+ test_expect_success '-- asubdir/path5: no stage 2 and 3 have stage 1' '
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+ test 2 = 2
+ test_skip '-- asubdir/path5: no stage 2 and 3 have stage 1' '
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 15 + 1
+ this_test=t2004.16
+ to_skip=
+ false
+ say 'expecting success:
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+ say_color info 'expecting success:
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+ test -z info
+ shift
+ echo '* expecting success:
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+ test_run_ '
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+ eval '
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)'
+++ grep asubdir/path5 out
+++ cut '-d ' -f2
++ test asubdir/path5 = asubdir/path5
++ grep asubdir/path5 out
++ cut '-d ' -f1
++ read s1 s2 s3
++ test -f .merge_file_lcEv2j
++ test . = .
++ test . = .
+++ cat .merge_file_lcEv2j
++ test tree1asubdir/path5 = tree1asubdir/path5
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ '-- asubdir/path5: no stage 2 and 3 have stage 1'
++ expr 15 + 1
+ test_count=16
+ say_color '' ' ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1'
+ echo ''
+ test_expect_success 'checkout --temp within subdir' '
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
+ test 2 = 2
+ test_skip 'checkout --temp within subdir' '
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 16 + 1
+ this_test=t2004.17
+ to_skip=
+ false
+ say 'expecting success:
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
+ say_color info 'expecting success:
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
+ test -z info
+ shift
+ echo '* expecting success:
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
+ test_run_ '
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
+ eval '
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)'
++ cd asubdir
++ git checkout-index -a --stage=all
+++ wc -l
++ test 1 = 1
+++ grep path5 out
+++ cut '-d ' -f2
++ test path5 = path5
++ grep path5 out
++ read s1 s2 s3
++ cut '-d ' -f1
++ test -f ../.merge_file_PGoCjL
++ test . = .
++ test . = .
+++ cat ../.merge_file_PGoCjL
++ test tree1asubdir/path5 = tree1asubdir/path5
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout --temp within subdir'
++ expr 16 + 1
+ test_count=17
+ say_color '' ' ok 17: checkout --temp within subdir'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 17: checkout --temp within subdir'
+ echo ''
+ test_expect_success 'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
+ test 2 = 2
+ test_skip 'checkout --temp symlink' '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
++ expr ./t2004-checkout-cache-temp.sh : '.*/\(t[0-9]*\)-[^/]*$'
+ this_test=t2004
++ expr 17 + 1
+ this_test=t2004.18
+ to_skip=
+ false
+ say 'expecting success:
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
+ say_color info 'expecting success:
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
+ test -z info
+ shift
+ echo '* expecting success:
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
+ test_run_ '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
+ eval '
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b'
++ rm -f 'path*' .merge_file_6iyvpx .merge_file_8cWHrQ .merge_file_PGoCjL .merge_file_bFIigi .merge_file_dmW8IZ .merge_file_f0hTvT .merge_file_h8tXrD .merge_file_jmbxjv .merge_file_lcEv2j .merge_file_rN8rTd .merge_file_sYiYst out .git/index
++ ln -s b a
++ git update-index --add a
+++ git write-tree
++ t4=79c8f43fc2b6210c5badb2c13595654b6c40b974
++ rm -f .git/index
++ git read-tree 79c8f43fc2b6210c5badb2c13595654b6c40b974
++ git checkout-index --temp -a
+++ wc -l
++ test 1 = 1
+++ cut '-d ' -f2 out
++ test a = a
+++ cut '-d ' -f1 out
++ p=.merge_link_RykTWo
++ test -f .merge_link_RykTWo
+++ cat .merge_link_RykTWo
++ test b = b
+ eval_ret=0
+ return 0
+ '[' 0 = 0 -a 0 = 0 ']'
+ test_ok_ 'checkout --temp symlink'
++ expr 17 + 1
+ test_count=18
+ say_color '' ' ok 18: checkout --temp symlink'
+ test -z ''
+ test -n ''
+ shift
+ echo '* ok 18: checkout --temp symlink'
+ echo ''
+ test_done
+ trap - exit
+ test 0 '!=' 0
+ test 0 '!=' 0
+ msg=18 test(s)
+ say_color pass 'passed all 18 test(s)'
+ test -z pass
+ shift
+ echo '* passed all 18 test(s)'
+ exit 0
[-- Attachment #3: stdout.txt --]
[-- Type: text/plain, Size: 5556 bytes --]
* expecting success:
mkdir asubdir &&
echo tree1path0 >path0 &&
echo tree1path1 >path1 &&
echo tree1path3 >path3 &&
echo tree1path4 >path4 &&
echo tree1asubdir/path5 >asubdir/path5 &&
git update-index --add path0 path1 path3 path4 asubdir/path5 &&
t1=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree2path1 >path1 &&
echo tree2path2 >path2 &&
echo tree2path4 >path4 &&
git update-index --add path0 path1 path2 path4 &&
t2=$(git write-tree) &&
rm -f path* .merge_* out .git/index &&
echo tree2path0 >path0 &&
echo tree3path1 >path1 &&
echo tree3path2 >path2 &&
echo tree3path3 >path3 &&
git update-index --add path0 path1 path2 path3 &&
t3=$(git write-tree)
* ok 1: preparation
* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree1path1
* ok 2: checkout one stage 0 to temporary file
* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree $t1 &&
git checkout-index -a --temp >out &&
test $(wc -l <out) = 5 &&
for f in path0 path1 path3 path4 asubdir/path5
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree1$f
done
* ok 3: checkout all stage 0 to temporary files
* expecting success:
rm -f path* .merge_* out .git/index &&
git read-tree -m $t1 $t2 $t3
* ok 4: prepare 3-way merge
* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=2 --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = tree2path1
* ok 5: checkout one stage 2 to temporary file
* expecting success:
rm -f path* .merge_* out &&
git checkout-index --all --stage=2 --temp >out &&
test $(wc -l <out) = 3 &&
for f in path1 path2 path4
do
test $(grep $f out | cut "-d " -f2) = $f &&
p=$(grep $f out | cut "-d " -f1) &&
test -f $p &&
test $(cat $p) = tree2$f
done
* ok 6: checkout all stage 2 to temporary files
* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path0 >out &&
test $(wc -l <out) = 0
* ok 7: checkout all stages/one file to nothing
* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path1 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path1 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)
* ok 8: checkout all stages/one file to temporary files
* expecting success:
rm -f path* .merge_* out &&
git checkout-index --stage=all --temp -- path2 >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = path2 &&
cut "-d " -f1 out | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)
* ok 9: checkout some stages/one file to temporary files
* expecting success:
rm -f path* .merge_* out &&
git checkout-index -a --stage=all --temp >out &&
test $(wc -l <out) = 5
* ok 10: checkout all stages/all files to temporary files
* expecting success:
test x$(grep path0 out | cut "-d " -f2) = x
* ok 11: -- path0: no entry
* expecting success:
test $(grep path1 out | cut "-d " -f2) = path1 &&
grep path1 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s1) = tree1path1 &&
test $(cat $s2) = tree2path1 &&
test $(cat $s3) = tree3path1)
* ok 12: -- path1: all 3 stages
* expecting success:
test $(grep path2 out | cut "-d " -f2) = path2 &&
grep path2 out | cut "-d " -f1 | (read s1 s2 s3 &&
test $s1 = . &&
test -f $s2 &&
test -f $s3 &&
test $(cat $s2) = tree2path2 &&
test $(cat $s3) = tree3path2)
* ok 13: -- path2: no stage 1, have stage 2 and 3
* expecting success:
test $(grep path3 out | cut "-d " -f2) = path3 &&
grep path3 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test -f $s3 &&
test $(cat $s1) = tree1path3 &&
test $(cat $s3) = tree3path3)
* ok 14: -- path3: no stage 2, have stage 1 and 3
* expecting success:
test $(grep path4 out | cut "-d " -f2) = path4 &&
grep path4 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test -f $s2 &&
test $s3 = . &&
test $(cat $s1) = tree1path4 &&
test $(cat $s2) = tree2path4)
* ok 15: -- path4: no stage 3, have stage 1 and 3
* expecting success:
test $(grep asubdir/path5 out | cut "-d " -f2) = asubdir/path5 &&
grep asubdir/path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f $s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat $s1) = tree1asubdir/path5)
* ok 16: -- asubdir/path5: no stage 2 and 3 have stage 1
* expecting success:
(cd asubdir &&
git checkout-index -a --stage=all >out &&
test $(wc -l <out) = 1 &&
test $(grep path5 out | cut "-d " -f2) = path5 &&
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
test -f ../$s1 &&
test $s2 = . &&
test $s3 = . &&
test $(cat ../$s1) = tree1asubdir/path5)
)
* ok 17: checkout --temp within subdir
* expecting success:
rm -f path* .merge_* out .git/index &&
ln -s b a &&
git update-index --add a &&
t4=$(git write-tree) &&
rm -f .git/index &&
git read-tree $t4 &&
git checkout-index --temp -a >out &&
test $(wc -l <out) = 1 &&
test $(cut "-d " -f2 out) = a &&
p=$(cut "-d " -f1 out) &&
test -f $p &&
test $(cat $p) = b
* ok 18: checkout --temp symlink
* passed all 18 test(s)
^ permalink raw reply
* Re: update-index --assume-unchanged doesn't make things go fast
From: Michael J Gruber @ 2008-06-26 8:47 UTC (permalink / raw)
To: git
In-Reply-To: <32541b130806251102l6e71a050o82fbd4f272d1d23f@mail.gmail.com>
Avery Pennarun venit, vidit, dixit 25.06.2008 20:02:
> On 6/25/08, Michael J Gruber <michaeljgruber+gmane@fastmail.fm> wrote:
>>> 4) My idea is to eventually --assume-unchanged my whole repository,
>>> then write a cheesy daemon that uses the Win32 dnotify-equivalent to
>>> watch for files that get updated and then selectively
>>> --no-assume-unchanged files that it gets notified about. That would
>>> avoid the need to ever synchronously scan the whole repo for changes,
>>> thus making my git-Win32 experience much faster and more enjoyable.
>>> (This daemon ought to be possible to run on Linux as well, for similar
>>> improvements on gigantic repositories. Also note that TortoiseSVN for
>>> Windows does something similar to track file status updates, so this
>>> isn't *just* me being crazy.)
>> Looks like users on slow NFS would profit, too. Hate to say it, but hg
>> feels faster on (slow) NFS than git. Yet I use git, for other reasons ;)
>
> Hmm, can you do dnotify over NFS?
>
> I'd like to know how hg goes any faster. As far as I can see, git is
> going as fast as can be without some kind of daemon or other magic.
> (Except for my point #3, which seems relatively minor.)
I haven't done any measurements, maybe I should; getting consistent
results would require setting up an isolated NFS environment, though.
The thing is that hg is very careful about serializing and minimizing
disk I/O, whereas git is very clever about delegating stuff to the
kernel and processing data efficiently. In my work environment I have to
keep my repos on NFS. For heavy history rewriting I resort to /tmp or
/dev/shm temporarily. But git status is kinda slow on NFS. I don't know
about [di]?notify over NFS.
Michael
^ permalink raw reply
* Re: [Bug?] git submodule add doesn't respect core.autocrlf
From: Lars Hjemli @ 2008-06-26 8:40 UTC (permalink / raw)
To: Edward Z. Yang; +Cc: git
In-Reply-To: <g3vaaq$pm1$1@ger.gmane.org>
On Thu, Jun 26, 2008 at 7:43 AM, Edward Z. Yang
<edwardzyang@thewritingpot.com> wrote:
> mkdir test
> cd test
> git init
> git config core.safecrlf true
> git config core.autocrlf true
You can work around the problem by issuing the following commands at this point:
echo ".gitattributes -crlf" >> .gitattributes
echo ".gitmodules -crlf" >> .gitattributes
git add .gitattributes
> git submodule add http://repo.or.cz/w/htmlpurifier.git htmlpurifier
>
> You get: "fatal: LF would be replaced by CRLF in .gitmodules" and inspecting .gitmodules reveals that it uses LF, instead of CRLF.
>
> Can anyone reproduce? Thanks.
Yes, this also fails on linux (without the workaround).
To fix it "properly", git-config needs to choose between lf and crlf
(git-submodule uses git-config to write .gitmodules). But this depends
on
* whether the 'configfile' is (or will be!) tracked by git (e.g. .gitmodules)
* whether a crlf-attribute is specified for the 'configfile'
* the setting of core.autocrlf
A simpler solution might be to treat .gitmodules specially in
check_safe_crlf(), maybe something like this (possibly wrapped by
gmail...):
diff --git a/convert.c b/convert.c
index 1c66844..254a99b 100644
--- a/convert.c
+++ b/convert.c
@@ -91,6 +91,15 @@ static void check_safe_crlf(const char *path, int action,
if (!checksafe)
return;
+ /* Dirty hack: git-submodule uses git-config to update .gitmodules, and
+ * there's no reasonable way for git-config to know if the user prefers
+ * crlf or lf line endings for this file. And since it really doesn't
+ * matter, lets just ignore that the line endings might be modified by
+ * a later checkout.
+ */
+ if (!strcmp(path, ".gitmodules"))
+ return;
+
if (action == CRLF_INPUT || auto_crlf <= 0) {
/*
* CRLFs would not be restored by checkout:
--
larsh
^ permalink raw reply related
* Re: [REPLACEMENT PATCH] parse-opt: fake short strings for callers to believe in.
From: Junio C Hamano @ 2008-06-26 8:40 UTC (permalink / raw)
To: Pierre Habouzit; +Cc: git
In-Reply-To: <20080626083506.GA7237@artemis.madism.org>
Pierre Habouzit <madcoder@debian.org> writes:
> I saw that you merged this series into pu, for which I'm really glad,
Heh, you shouldn't be glad to have "landed" on 'pu', as being in 'pu' is
just a sign of "undecided" ;-)
And thanks for a reminder. Every bit of help to make integration smoother
really helps. I've been swamped and I still have your "revisions:
refactor init_revisions and setup_revisions" sitting in my inbox.
^ permalink raw reply
* Re: [REPLACEMENT PATCH] parse-opt: fake short strings for callers to believe in.
From: Pierre Habouzit @ 2008-06-26 8:35 UTC (permalink / raw)
To: gitster; +Cc: git
In-Reply-To: <20080624205801.GG9189@artemis.madism.org>
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
Hi Junio,
I saw that you merged this series into pu, for which I'm really glad,
though I believe that the version that works on top of the "leaky()"
series is better, since everyone agrees that the small leaks in the
option parser are better than the limitations the one you merged has.
I won't flood the list again with the patches, but you can find them
in git://git.madism.org/~madcoder/git.git#ph/parseopt (based on current
next). This includes the two leaky() patches (with the remarks that have
been made to me incorporated), the current state of the parse-options
improvements, and the current builtin-blame.c proof of concept (without
the ugly strdup).
I really don't like the strbuf thingy, and I'd be glad to never see it
merged in next, it will cause more harm than it helps.
TIA.
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH] daemon: accept "git program" as well
From: Tommi Virtanen @ 2008-06-26 8:20 UTC (permalink / raw)
To: Junio C Hamano
Cc: Shawn O. Pearce,
しらいしななこ,
Miklos Vajna, pclouds, Johannes Schindelin, Pieter de Bie, git
In-Reply-To: <7vmyl9w0y1.fsf@gitster.siamese.dyndns.org>
On Wed, Jun 25, 2008 at 04:26:46PM -0700, Junio C Hamano wrote:
> By the way I looked at gitosis (Tommi CC'ed).
>
> http://repo.or.cz/w/gitosis.git?a=blob;f=gitosis/serve.py;h=c0b7135bf45305ee1079b0dcab3b4ed1ce988aab;hb=38561aa6a51a2ef6cc04aa119481df62d213ffa4
>
> In gitosis/serve.py, there are COMMANDS_READONLY and COMMANDS_WRITE array
> that holds 'git-upload-pack' and 'git-receive-pack' commands, and they are
> compared with user commands after doing:
Yeah, that's pretty much a trivial change, doing it now to future-proof
gitosis.
--
:(){ :|:&};:
^ permalink raw reply
* Re: [Bug] for-each-ref: %(object) and %(type) unimplemented
From: Junio C Hamano @ 2008-06-26 8:21 UTC (permalink / raw)
To: Jeff King; +Cc: Lea Wiemann, Git Mailing List
In-Reply-To: <20080626080841.GA27935@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Hmm, looks like I just missed you applying the original fix to maint.
> Ignore 2/2, then, as you already have it. I think it is still worth
> doing the test script cleanup, though.
Absolutely. And thanks.
^ permalink raw reply
* Re: [PATCH] git-send-pack: don't consider branch lagging behind as errors.
From: Junio C Hamano @ 2008-06-26 8:19 UTC (permalink / raw)
To: Jeff King; +Cc: Pierre Habouzit, git
In-Reply-To: <20080626075036.GA25770@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> Does this seem like a good approach overall? Existing behavior should be
> identical unless the config option is set, and with it set, I think it
> should satisfy Pierre and posters from the original thread. If that is
> sensible, which of the solutions for "no, I really want to force this
> strict rewind" is the most palatable?
That "strict rewind" workaround alone made me so disgusted beyond words.
And then made me step back and think again.
If it is stale, it is stale. A revert is just a different history that
did not have some things that already happened, while a fork has some
other things that did not happen in the original history on top of that.
They are the same thing -- alternate history that drops some things that
already happened. It does not matter if you are strictly stale or if you
built a few (or hundreds of) commits on top of something that is stale.
You are losing history if you tried to push such a thing.
And if you do not want to trigger "what you are pushing is not up to
date", the solution is simple. You do not push them.
I however think what Pierre wanted to do is different, and you do not have
to solve "force this strict rewind" problem to solve it.
What we need is (with a configuration option) to change the meaning of
"matching refs" from the current definition "branches with the same name
between here and there" to "branches with the same name between here and
there, but excluding the ones that do not fast forward (or strictly
behind)". So if you have tons of stale branches you checked out but
haven't touched most of them, your "matching push" won't even try to push
what you haven't touched.
I do not think we would ever want to allow a configuration that disables
the exit status from push upon a push failure when somebody explicitly
says "git push $there $this" and $this is not non-fast-forward. If you
asked $this to be pushed, and if $this cannot be pushed, we _should_ error
out.
So...
(1) when you say "git push" to trigger the "matching refs" push, with the
new configuration, you do not error out nor even try to push out
things that do not fast forward. Pretend that you did not even
attempt to push them, and do not error out. This may result in not
pushing anything out, but that is what the people who have such a
configuration is asking for.
If you have configured which branches are pushed when you are on your
current branch, and that branch --- most likely it is that current
branch --- does not fast forward, it is your problem.
(2) even with such a configuration, you can "git push $there $this" and
"git push $there +$this" to explicitly ask refs to be pushed. Such a
push won't be interfered by the new configuration and correctly fail
(or force).
^ permalink raw reply
* [OFF TOPIC] any views about the D programming language
From: Ittay Dror @ 2008-06-26 8:16 UTC (permalink / raw)
To: git
Hello,
I've read the language war thread (C vs C++) and I'm wondering if
someone would like to share their views about using D instead of C.
Thank you,
Ittay
--
--
Ittay Dror <ittay.dror@gmail.com>
^ permalink raw reply
* Re: [Bug] for-each-ref: %(object) and %(type) unimplemented
From: Jeff King @ 2008-06-26 8:08 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Lea Wiemann, Git Mailing List
In-Reply-To: <20080626053551.GA20767@sigill.intra.peff.net>
On Thu, Jun 26, 2008 at 01:35:51AM -0400, Jeff King wrote:
> > Hmm. Actually, there is a test in t6300 that runs with each atom name.
> > Unfortunately, it doesn't bother actually checking the output for
> > sanity, so the fact that these atoms returned the empty string was
> > missed.
>
> And here is a two patch series cleaning up the test script and fixing
> the bug.
Hmm, looks like I just missed you applying the original fix to maint.
Ignore 2/2, then, as you already have it. I think it is still worth
doing the test script cleanup, though. Here it is, rebased on the
current master (the only difference is we don't have to mark the
breakage as expect_failure).
-- >8 --
improve for-each-ref test script
Previously, we did a sanity check by doing for-each-ref
using each possible format atom. However, we never checked
the actual output produced by that atom, which recently let
an obvious bug go undetected for some time.
While we're at it, also clean up a few '!' into
test_must_fail.
---
t/t6300-for-each-ref.sh | 87 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 70 insertions(+), 17 deletions(-)
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 91ea85d..a3c8941 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -26,25 +26,78 @@ test_expect_success 'Create sample commit with known timestamp' '
git tag -a -m "Tagging at $datestamp" testtag
'
-test_expect_success 'Check atom names are valid' '
- bad=
- for token in \
- refname objecttype objectsize objectname tree parent \
- numparent object type author authorname authoremail \
- authordate committer committername committeremail \
- committerdate tag tagger taggername taggeremail \
- taggerdate creator creatordate subject body contents
- do
- git for-each-ref --format="$token=%($token)" refs/heads || {
- bad=$token
- break
- }
- done
- test -z "$bad"
+test_atom() {
+ case "$1" in
+ head) ref=refs/heads/master ;;
+ tag) ref=refs/tags/testtag ;;
+ esac
+ printf '%s\n' "$3" >expected
+ test_expect_${4:-success} "basic atom: $1 $2" "
+ git for-each-ref --format='%($2)' $ref >actual &&
+ test_cmp expected actual
+ "
+}
+
+test_atom head refname refs/heads/master
+test_atom head objecttype commit
+test_atom head objectsize 171
+test_atom head objectname 67a36f10722846e891fbada1ba48ed035de75581
+test_atom head tree 0e51c00fcb93dffc755546f27593d511e1bdb46f
+test_atom head parent ''
+test_atom head numparent 0
+test_atom head object ''
+test_atom head type ''
+test_atom head author 'A U Thor <author@example.com> 1151939924 +0200'
+test_atom head authorname 'A U Thor'
+test_atom head authoremail '<author@example.com>'
+test_atom head authordate 'Mon Jul 3 17:18:44 2006 +0200'
+test_atom head committer 'C O Mitter <committer@example.com> 1151939923 +0200'
+test_atom head committername 'C O Mitter'
+test_atom head committeremail '<committer@example.com>'
+test_atom head committerdate 'Mon Jul 3 17:18:43 2006 +0200'
+test_atom head tag ''
+test_atom head tagger ''
+test_atom head taggername ''
+test_atom head taggeremail ''
+test_atom head taggerdate ''
+test_atom head creator 'C O Mitter <committer@example.com> 1151939923 +0200'
+test_atom head creatordate 'Mon Jul 3 17:18:43 2006 +0200'
+test_atom head subject 'Initial'
+test_atom head body ''
+test_atom head contents 'Initial
+'
+
+test_atom tag refname refs/tags/testtag
+test_atom tag objecttype tag
+test_atom tag objectsize 154
+test_atom tag objectname 98b46b1d36e5b07909de1b3886224e3e81e87322
+test_atom tag tree ''
+test_atom tag parent ''
+test_atom tag numparent ''
+test_atom tag object '67a36f10722846e891fbada1ba48ed035de75581'
+test_atom tag type 'commit'
+test_atom tag author ''
+test_atom tag authorname ''
+test_atom tag authoremail ''
+test_atom tag authordate ''
+test_atom tag committer ''
+test_atom tag committername ''
+test_atom tag committeremail ''
+test_atom tag committerdate ''
+test_atom tag tag 'testtag'
+test_atom tag tagger 'C O Mitter <committer@example.com> 1151939925 +0200'
+test_atom tag taggername 'C O Mitter'
+test_atom tag taggeremail '<committer@example.com>'
+test_atom tag taggerdate 'Mon Jul 3 17:18:45 2006 +0200'
+test_atom tag creator 'C O Mitter <committer@example.com> 1151939925 +0200'
+test_atom tag creatordate 'Mon Jul 3 17:18:45 2006 +0200'
+test_atom tag subject 'Tagging at 1151939927'
+test_atom tag body ''
+test_atom tag contents 'Tagging at 1151939927
'
test_expect_success 'Check invalid atoms names are errors' '
- ! git-for-each-ref --format="%(INVALID)" refs/heads
+ test_must_fail git-for-each-ref --format="%(INVALID)" refs/heads
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
@@ -64,7 +117,7 @@ test_expect_success 'Check valid format specifiers for date fields' '
'
test_expect_success 'Check invalid format specifiers are errors' '
- ! git-for-each-ref --format="%(authordate:INVALID)" refs/heads
+ test_must_fail git-for-each-ref --format="%(authordate:INVALID)" refs/heads
'
cat >expected <<\EOF
--
1.5.6.129.g8dea5.dirty
^ permalink raw reply related
* Re: [PATCH] git-send-pack: don't consider branch lagging behind as errors.
From: Jeff King @ 2008-06-26 7:50 UTC (permalink / raw)
To: Pierre Habouzit; +Cc: git, gitster
In-Reply-To: <20080619151110.GA31654@sigill.intra.peff.net>
On Thu, Jun 19, 2008 at 11:11:10AM -0400, Jeff King wrote:
> > Please please please do :)
> > The exit 1 of git-push is really annoying me these days.
>
> OK, I will try to take a look in the next few days.
I finally got a chance to look at this [distinguishing stale refs from
other non-ff refs]. I was originally planning on doing a multi-patch
series:
1/4 distinguish visually between stale / non-ff refs
2/4 config option to let stale refs not count towards exit code of 1
3/4 disallow "push -f" without explicit refspec or option (like --all)
4/4 config option not to show stale refs unless "-v" is given (which
is now reasonably safe, since invisible refs won't get pushed when
you just repeat your "git push" with a "-f")
But I didn't like how it was turning out. Specifically:
- two config options doesn't really make sense. Either you care about
stale refs, or you don't. If you do, you should see them and have
them impact your exit code.
- I thought 3/4 would introduce a generally useful safety valve. But I
realized I really _like_ the current behavior. Most of the time I
force a push, it is something like "git push", "oops, that is a
non-ff, but I know it is OK", "git push -f". It makes sense to me
that I can repeat my last command and simply say "OK, force this."
But with such a safety valve, I have to realize the shortcut that
"git push" was performing (i.e., "git push --matching"), and then
explicitly retype it. Which is not hard mentally, but it makes the
interface seem very clunky.
Instead of that, I am considering something more like this:
- we always visually distinguish stale and other non-ff refs
- if a config option is set, we treat stale refs as "up to date". That
is, we don't show them (unless -v is set), and they don't affect the
exit code. The option is unset by default, giving the same as
current behavior.
- If the config option is not set, then forcing works as before.
- If the config option is set, then we _do not_ force stale refs, but
only other non-ff. Meaning we are truly treating them like our "up
to date" refs and saying "there is nothing of interest to push".
This leaves one open issue. If you have the "treat stale as up to date"
config option set, how do you force a strict rewind (if the occasion
comes up that in some instance, you do want to treat it differently)?
One solution is for the user to unset the config, do the forced push,
and then reset it. It makes some sense; the user has said, via the
config, that they consider stale refs uninteresting. So to actually
perform such a push, they need to "unsay" that temporarily.
Another solution would be an additional flag for forcing strict rewinds
(or even "-f -f", though I'm not sure that makes sense). This seems a
little hack-ish, since it would _only_ be used if this other config flag
is set.
Yet another solution would be to allow "-f" to force a strict rewind,
but only if the refspec is mentioned explicitly on the command line, and
not part of an automatic match. Reasonably DWIM, but I think it kills
the consistency we have now (that "--all" or "--matching" are really
just shorthands for spelling out all of the respective refspecs).
Does this seem like a good approach overall? Existing behavior should be
identical unless the config option is set, and with it set, I think it
should satisfy Pierre and posters from the original thread. If that is
sensible, which of the solutions for "no, I really want to force this
strict rewind" is the most palatable?
-Peff
^ permalink raw reply
* Re: [PATCH] Ship sample hooks with .sample suffix
From: Junio C Hamano @ 2008-06-26 7:28 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
In-Reply-To: <486342F8.2060406@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
> Junio C Hamano schrieb:
>> I'll queue the patch to 'master' and I suspect that this will make 31d6632
>> (Windows: Change the name of hook scripts to make them not executable.,
>> 2007-11-30) unnecessary.
>
> I've updated
>
> git://repo.or.cz/git/mingw/j6t.git for-junio
>
> and the interdiff to the previous version is merely the reverse of
> 31d6632. For your convenience I've merged it into current next:
>
> git://repo.or.cz/git/mingw/j6t.git merge-mingw-into-next
Thanks. This round I am looking forward to very much being able to merge
this to 'next' for real, not just parking in 'pu', but it is getting late
so it may have to wait til tomorrow.
^ permalink raw reply
* Re: [PATCH] Ship sample hooks with .sample suffix
From: Johannes Sixt @ 2008-06-26 7:19 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vod5q8c25.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
> I'll queue the patch to 'master' and I suspect that this will make 31d6632
> (Windows: Change the name of hook scripts to make them not executable.,
> 2007-11-30) unnecessary.
I've updated
git://repo.or.cz/git/mingw/j6t.git for-junio
and the interdiff to the previous version is merely the reverse of
31d6632. For your convenience I've merged it into current next:
git://repo.or.cz/git/mingw/j6t.git merge-mingw-into-next
-- Hannes
^ permalink raw reply
* Re: [PATCH] factorize pack structure allocation
From: Andreas Ericsson @ 2008-06-26 6:40 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Junio C Hamano, git, Teemu Likonen
In-Reply-To: <alpine.LFD.1.10.0806241851420.2979@xanadu.home>
Nicolas Pitre wrote:
> New pack structures are currently allocated in 2 different places
> and all members have to be initialized explicitly. This is prone
> to errors leading to segmentation faults as found by Teemu Likonen.
>
> Let's have a common place where this structure is allocated, and have
> all members implicitly initialized to zero.
>
> Signed-off-by: Nicolas Pitre <nico@cam.org>
> ---
> diff --git a/sha1_file.c b/sha1_file.c
> index a92f023..c56f674 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -792,18 +792,28 @@ unsigned char* use_pack(struct packed_git *p,
> return win->base + offset;
> }
>
> +static struct packed_git *alloc_packed_git(int extra)
> +{
> + struct packed_git *p = xmalloc(sizeof(*p) + extra);
> + memset(p, 0, sizeof(*p));
> + p->pack_fd = -1;
> + return p;
> +}
> +
Minor nit; Use xcalloc() instead. It initializes the allocated area
to zero by default, either by the glibc allocator when it re-uses old
memory, or by the kernel when it's handed to userspace. It's a
micro-optimization, but a worthwhile one imo, especially for repos
with lots and lots of packs (git gc --auto runs galore).
The "calloc() returns nulified memory" dogma conforms to C89 and is
thus about as portable as it gets.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* Re: [PATCH] gitk: Add basic French translation
From: Christian Couder @ 2008-06-26 6:39 UTC (permalink / raw)
To: Cyril Brulebois; +Cc: paulus, git
In-Reply-To: <1213852083-31418-2-git-send-email-kibi@debian.org>
Le jeudi 19 juin 2008, Cyril Brulebois a écrit :
> Signed-off-by: Cyril Brulebois <kibi@debian.org>
> ---
> po/fr.po | 904
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files
> changed, 904 insertions(+), 0 deletions(-)
> create mode 100644 po/fr.po
>
> diff --git a/po/fr.po b/po/fr.po
> new file mode 100644
> index 0000000..d37b2eb
> --- /dev/null
> +++ b/po/fr.po
> @@ -0,0 +1,904 @@
> +# Translation of gitk
> +# This file is distributed under the same license as the gitk package.
> +# Copyright © 2008 Cyril Brulebois <kibi@debian.org>
> +#
[...]
> +
> +#: gitk:2121 gitk:2136 gitk:7211
> +msgid "Diff this -> selected"
> +msgstr ""
msgstr "Diff ceci -> selection"
> +
> +#: gitk:2123 gitk:2138 gitk:7212
> +msgid "Diff selected -> this"
> +msgstr ""
msgstr "Diff selection -> ceci"
> +
> +#: gitk:2125 gitk:2140 gitk:7213
> +msgid "Make patch"
> +msgstr "Créer patch"
> +
> +#: gitk:2126 gitk:7351
> +msgid "Create tag"
> +msgstr "Créer tag"
> +
> +#: gitk:2127 gitk:7450
> +msgid "Write commit to file"
> +msgstr ""
msgstr "Enregistrer le commit dans un fichier"
> +
> +#: gitk:2128 gitk:7504
> +msgid "Create new branch"
> +msgstr "Créer une nouvelle branch"
msgstr "Créer une nouvelle branche"
> +#: gitk:2129
> +msgid "Cherry-pick this commit"
> +msgstr "Cueillir ce commit"
> +
> +#: gitk:2131
> +msgid "Reset HEAD branch to here"
> +msgstr "Réinitialiser la branche HEAD ici"
> +
> +#: gitk:2147
> +msgid "Check out this branch"
> +msgstr ""
msgstr "Emprunter cette branche"
[...]
> +#: gitk:2438
> +msgid "<PageUp>\tMove up one page in commit list"
> +msgstr ""
msgstr "<PageUp>\tRemonter d'une page dans la liste des commits"
> +
> +#: gitk:2439
> +msgid "<PageDown>\tMove down one page in commit list"
> +msgstr ""
msgstr "<PageDown>\tRedescendre d'une page dans la liste des commits"
> +#: gitk:2440
> +#, tcl-format
> +msgid "<%s-Home>\tScroll to top of commit list"
> +msgstr ""
msgstr "<%s-Home>\tAller en haut de la liste des commits"
> +#: gitk:2441
> +#, tcl-format
> +msgid "<%s-End>\tScroll to bottom of commit list"
> +msgstr ""
msgstr "<%s-End>\tAller en bas de la liste des commits"
> +#: gitk:2442
> +#, tcl-format
> +msgid "<%s-Up>\tScroll commit list up one line"
> +msgstr ""
msgstr "<%s-Up>\tMonter d'une ligne dans la liste des commits"
> +#: gitk:2443
> +#, tcl-format
> +msgid "<%s-Down>\tScroll commit list down one line"
> +msgstr ""
msgstr "<%s-Down>\tDescendre d'une ligne dans la liste des commits"
> +#: gitk:2444
> +#, tcl-format
> +msgid "<%s-PageUp>\tScroll commit list up one page"
> +msgstr ""
msgstr "<%s-PageUp>\tMonter d'une page dans la liste des commits"
> +#: gitk:2445
> +#, tcl-format
> +msgid "<%s-PageDown>\tScroll commit list down one page"
> +msgstr ""
msgstr "<%s-PageDown>\tDescendre d'une page dans la liste des commits"
> +#: gitk:2446
> +msgid "<Shift-Up>\tFind backwards (upwards, later commits)"
> +msgstr ""
msgstr "<Shift-Up>\tRechercher en arrière (plus haut, commits plus récents)"
> +#: gitk:2447
> +msgid "<Shift-Down>\tFind forwards (downwards, earlier commits)"
> +msgstr ""
msgstr "<Shift-Down>\tRechercher en avant (plus bas, commits plus anciens)"
> +#: gitk:2448
> +msgid "<Delete>, b\tScroll diff view up one page"
> +msgstr ""
msgstr "<Delete>, b\tMonter d'une page dans la vue du diff"
> +#: gitk:2449
> +msgid "<Backspace>\tScroll diff view up one page"
> +msgstr ""
msgstr "<Backspace>\tMonter d'une page dans la vue du diff"
> +#: gitk:2450
> +msgid "<Space>\t\tScroll diff view down one page"
> +msgstr ""
msgstr "<Space>\t\tDescendre d'une page dans la vue du diff"
> +#: gitk:2451
> +msgid "u\t\tScroll diff view up 18 lines"
> +msgstr ""
msgstr "u\t\tMonter de 18 lignes dans la vue du diff"
> +#: gitk:2452
> +msgid "d\t\tScroll diff view down 18 lines"
> +msgstr ""
msgstr "d\t\tDescendre de 18 lignes dans la vue du diff"
> +#: gitk:2453
> +#, tcl-format
> +msgid "<%s-F>\t\tFind"
> +msgstr ""
msgstr "<%s-F>\t\tChercher"
> +#: gitk:2454
> +#, tcl-format
> +msgid "<%s-G>\t\tMove to next find hit"
> +msgstr ""
msgstr "<%s-G>\t\tAller à la prochaine occurence"
> +#: gitk:2455
> +msgid "<Return>\tMove to next find hit"
> +msgstr ""
msgstr "<Return>\tAller à la prochaine occurence"
> +#: gitk:2456
> +msgid "/\t\tMove to next find hit, or redo find"
> +msgstr ""
msgstr "/\t\tAller à la prochaine occurence ou recommencer la recherche"
> +#: gitk:2457
> +msgid "?\t\tMove to previous find hit"
> +msgstr ""
msgstr "?\t\tAller à l'occurence précédente"
Ok, I stopped reviewing/completing here because I am short on time right now
and anyway I think I should have answered before.
By the way for these po file where there are lots of encoding problem,
sending the attached file is ok I think.
Thanks for starting this,
Christian.
^ permalink raw reply
* Re: Windows symlinks
From: Andreas Ericsson @ 2008-06-26 6:33 UTC (permalink / raw)
To: Patrick.Higgins; +Cc: apenwarr, jnareb, git
In-Reply-To: <911589C97062424796D53B625CEC0025E46196@USCOBRMFA-SE-70.northamerica.cexp.com>
Patrick.Higgins@cexp.com wrote:
>> From: Avery Pennarun [mailto:apenwarr@gmail.com]
>>
>>> Agreed. The first thing we started working on was getting
>> symlinks out of our repositories.
>>> Unfortunately, we chose to use them because we are using
>> broken development tools that
>>> don't support proper modularity. We found the best way to
>> Perhaps git-submodule would do what you're looking for.
>
> We might be able to get by with them, but submodules appear to be
> significantly more complex than symlinks, and we sometimes symlink
> just a file or two if that's all we need. Splitting up submodules to
> that level of granularity would be hard to manage.
>
> My understanding of the submodule workflow is:
>
> Projects A, B, and C (we actually have about 17 of these) all share
> common code in project Common. Then, each of A, B, and C adds Common
> as a submodule. While working on project A, the need arises to modify
> Common, so the developer changes it there, commits, pushes the change
> to Common, then commits and pushes the change to A. To update B and
> C, they would have to change to each of those projects, run a git
> pull, then git submodule update, and compile and test.
>
> Is that correct? If so, it's a lot more work than letting a symlink
> propagate the change to all the other projects. Of course, since
> Windows doesn't have symlinks...
That is correct, but you only need to do the change if the projects
B, C, D, n... actually requires the new feature/bugfix introduced in
Common. Otherwise you can just leave it as-is.
Besides, when an important bugfix is added to Common, you probably
want to cut new releases from B, C, D, n... anyway, so it still
means doing stuff to those repositories.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply
* [ANNOUNCE] GIT 1.5.6.1
From: Junio C Hamano @ 2008-06-26 6:21 UTC (permalink / raw)
To: git; +Cc: linux-kernel
In-Reply-To: <7vmylixr6h.fsf@gitster.siamese.dyndns.org>
The latest maintenance release GIT 1.5.6.1 is available at the
usual places:
http://www.kernel.org/pub/software/scm/git/
git-1.5.6.1.tar.{gz,bz2} (tarball)
git-htmldocs-1.5.6.1.tar.{gz,bz2} (preformatted docs)
git-manpages-1.5.6.1.tar.{gz,bz2} (preformatted docs)
RPMS/$arch/git-*-1.5.6.1-1.$arch.rpm (RPM)
GIT v1.5.6.1 Release Notes
==========================
Fixes since v1.5.6
------------------
* Last minute change broke loose object creation on AIX.
* (performance fix) We used to make $GIT_DIR absolute path early in the
programs but keeping it relative to the current directory internally
gives 1-3 per-cent performance boost.
* bash completion knows the new --graph option to git-log family.
* git-diff -c/--cc showed unnecessary "deletion" lines at the context
boundary.
* git-for-each-ref ignored %(object) and %(type) requests for tag
objects.
* git-merge usage had a typo.
* Rebuilding of git-svn metainfo database did not take rewriteRoot
option into account.
* Running "git-rebase --continue/--skip/--abort" before starting a
rebase gave nonsense error messages.
----------------------------------------------------------------
Changes since v1.5.6 are as follows:
Brandon Casey (2):
git-merge.sh: fix typo in usage message: sucesses --> succeeds
t7502-commit.sh: test_must_fail doesn't work with inline environment variables
Dan McGee (1):
completion: add --graph to log command completion
Dmitry Potapov (1):
fix update-hook-example to work with packed tag references
Jan Krüger (2):
Documentation: fix formatting in git-svn
git-svn: make rebuild respect rewriteRoot option
Jeff King (2):
for-each-ref: implement missing tag values
clone: create intermediate directories of destination repo
Junio C Hamano (2):
diff -c/--cc: do not include uninteresting deletion before leading context
GIT 1.5.6.1
Linus Torvalds (1):
Make git_dir a path relative to work_tree in setup_work_tree()
Michele Ballabio (1):
parse-options.c: fix documentation syntax of optional arguments
Patrick Higgins (1):
Workaround for AIX mkstemp()
Stephan Beyer (4):
git-rebase.sh: Add check if rebase is in progress
api-builtin.txt: update and fix typo
api-parse-options.txt: Introduce documentation for parse options API
Extend parse-options test suite
^ permalink raw reply
* Re: policy and mechanism for less-connected clients
From: David Jeske @ 2008-06-26 6:08 UTC (permalink / raw)
To: Theodore Tso; +Cc: Junio C Hamano, git
In-Reply-To: <20080626052310.GC8610@mit.edu>
-- Theodore Tso wrote:
> If you are going to preserve the workflow of CVS, then you're
> also going to preserve all of the downsides of CVS.
I don't agree with this, and I don't see you proposing any logic that proves it
to be true. Of course I plan to make small changes. However, in my previous
message I proposed 3 same-workflow improvements, and 2 small-workflow-extension
improvements. I have more in mind..
http://marc.info/?l=git&m=121442660332114&w=2
Maybe it was too confusing or too long to read. Just consider the first simple
example.
Currently "cvs up" in a dirty tree is a destructive operation. If you merge
badly, you can't get back to your local working files before the "up". I've
been burned by this in cvs/perforce enough that now when there are complicated
update-conflicts I tar up the tree before trying to fix them. I still can't
really get back to the pre-up state.
I can be better than cvs with the EXACT same workflow, by checking in their
local changes (git checkin;) and then doing the "up" (git pull;). If they
decide they botched their merge, they can get back to where they were before
the UP because I'm using a richer underlying mechanism to implement their
workflow.
Do you think that's not an improvement? or not the same workflow? It sure seems
like a same-workflow improvement to me.
----
git's mechanisms are really great for making a hybrid central/distributed
system which has the simplicity of cvs/perforce and several of the benefits of
git. The git interface is just too complicated to be used for this.
Fortunately, building on git means that power users will still be able to use
git directly and people can distribute the repositories as much as they want.
> how much change are you willing to make them deviate from
> the CVS workflow, and how much smarts are you willing to assume that
> they have?
Good question. I'm working on a command-line wrapper for git that does it.
Digging into the "plumbling" is making it more obvious why I find git's
porcelain operations hard to understand. I think I can make a 2-repository
setup (personal-inaccessible, origin) work like cvs/perforce with local
checkins, and I can make a 3-repository setup (personal-inaccessible,
personal-accessible, origin) work nearly the same as cvs while allowing
distributed collaboration. I think I will need a tiny bit of custom server
support (to create the personal-accessible repositories automatically).
Right now it looks like I'll be a simple hybrid of cvs/perforce, with a couple
git concepts peppered in. (but just a couple) It seems simple so far, it's just
taking me a while to dig through git-plumbing to understand it.
Also remember, this isn't built to handle what linux-kernel folks do with git.
It's designed to provide a familiar environment for cvs/perforce style users
that is just as simple but a whole lot better. Even if it eventually gets lots
of git concepts, they won't HAVE to understand them to use it. They can learn
them as they go. This is obviously something that people want, as cogito and
easy-git show.
^ permalink raw reply
* Re: policy and mechanism for less-connected clients
From: David Jeske @ 2008-06-26 6:08 UTC (permalink / raw)
To: Theodore Tso; +Cc: Junio C Hamano, git
In-Reply-To: <20080626052310.GC8610@mit.edu>
-- Theodore Tso wrote:
> If you are going to preserve the workflow of CVS, then you're
> also going to preserve all of the downsides of CVS.
I don't agree with this, and I don't see you proposing any logic that proves it
to be true. Of course I plan to make small changes. However, in my previous
message I proposed 3 same-workflow improvements, and 2 small-workflow-extension
improvements. I have more in mind..
http://marc.info/?l=git&m=121442660332114&w=2
Maybe it was too confusing or too long to read. Just consider the first simple
example.
Currently "cvs up" in a dirty tree is a destructive operation. If you merge
badly, you can't get back to your local working files before the "up". I've
been burned by this in cvs/perforce enough that now when there are complicated
update-conflicts I tar up the tree before trying to fix them. I still can't
really get back to the pre-up state.
I can be better than cvs with the EXACT same workflow, by checking in their
local changes (git checkin;) and then doing the "up" (git pull;). If they
decide they botched their merge, they can get back to where they were before
the UP because I'm using a richer underlying mechanism to implement their
workflow.
Do you think that's not an improvement? or not the same workflow? It sure seems
like a same-workflow improvement to me.
----
git's mechanisms are really great for making a hybrid central/distributed
system which has the simplicity of cvs/perforce and several of the benefits of
git. The git interface is just too complicated to be used for this.
Fortunately, building on git means that power users will still be able to use
git directly and people can distribute the repositories as much as they want.
> how much change are you willing to make them deviate from
> the CVS workflow, and how much smarts are you willing to assume that
> they have?
Good question. I'm working on a command-line wrapper for git that does it.
Digging into the "plumbling" is making it more obvious why I find git's
porcelain operations hard to understand. I think I can make a 2-repository
setup (personal-inaccessible, origin) work like cvs/perforce with local
checkins, and I can make a 3-repository setup (personal-inaccessible,
personal-accessible, origin) work nearly the same as cvs while allowing
distributed collaboration. I think I will need a tiny bit of custom server
support (to create the personal-accessible repositories automatically).
Right now it looks like I'll be a simple hybrid of cvs/perforce, with a couple
git concepts peppered in. (but just a couple) It seems simple so far, it's just
taking me a while to dig through git-plumbing to understand it.
Also remember, this isn't built to handle what linux-kernel folks do with git.
It's designed to provide a familiar environment for cvs/perforce style users
that is just as simple but a whole lot better. Even if it eventually gets lots
of git concepts, they won't HAVE to understand them to use it. They can learn
them as they go. This is obviously something that people want, as cogito and
easy-git show.
^ permalink raw reply
* Re: about c8af1de9 (git status uses pager)
From: Matthieu Moy @ 2008-06-26 6:04 UTC (permalink / raw)
To: Dan McGee; +Cc: git
In-Reply-To: <g3v3s1$bok$1@ger.gmane.org>
Dan McGee <dpmcgee@gmail.com> writes:
> That became impossible with 1.5.6 out of the box,
Actually, by default it does. It does not for you because you've set
$LESS. That said, I argee that a config option to enable/disable the
pager per-command would have been better that the change we're talking
about.
--
Matthieu
^ permalink raw reply
* Re: [NON-TOY PATCH] git bisect: introduce 'fixed' and 'unfixed'
From: Christian Couder @ 2008-06-26 6:03 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Johannes Schindelin, Michael Haggerty, Jeff King, git
In-Reply-To: <7v8wwubh3j.fsf@gitster.siamese.dyndns.org>
Le mercredi 25 juin 2008, Junio C Hamano a écrit :
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > On Tue, 24 Jun 2008, Michael Haggerty wrote:
> > ...
> >
> >> It seems to me that your problem is that git-bisect requires the
> >> "good" revision to be older than the "bad" one.
Yes, "git bisect" works if the good revisions are ancestors of the bad
revision.
Currently if you mistake good and bad revs (and if one of the rev is
an ancestor of the other) you get something like:
$ git bisect start HEAD~3 HEAD
'git rev-list --bisect-vars' failed:
maybe you mistake good and bad revs?
I also noticed that if the good and bad are siblings for example like:
A-B-C-D
\E-F
and you say:
$ git bisect start D F
(that means D is bad and F is good)
then it will kind of "work" but only C and D will be considered as possible
first bad commits. This is arguably a bug because for example E could have
fixed a bug that always existed, and then the first bad commit is B or A
depending how we define it.
> >> If this requirement
> >> were removed, would there still be a need for "fixed" vs. "unfixed"?
Well this requirement can be "removed" in different ways.
1) We could just allow anything to be called "bad" and "good" as long as
there is either:
- only one bad revision and all good revisions are its ancestor, or
- only one good revision and all bad revisions are its ancestor
2) Another way to remove the requirement is to make it work in the siblings
case above.
> > Nope.
> >
> > The thing that makes "fixed" and "bad" special is that _one_ commit
> > introduced that.
>
> That was my initial reaction, and I actually was about to phrase it more
> bluntly: you do not understand what "bisect" is.
>
> But that was a reaction without thinking things through. It may not be
> what "git bisect" currently is, but the suggestion does not go against
> what the underlying "git rev-list --bisect" is at all.
If we want to make the siblings case (case 2) work, then "git
rev-list --bisect" needs work though.
> I think what
> Michael is speculating is different, and it makes sense in its own way.
>
> Instead of having a set of bisect/good-* refs and a single bisect-bad
> ref, your "fixed and unfixed" mode could work quite differently. By
> noticing that the topology the user specified with initial good and bad
> have ancient bad and recent good --- that is, "it used to be bad but now
> it is good" --- you could instead use a set of bisect/bad-* refs and a
> single bisect-good ref, and feed good and bad swapped to "rev-list
> --bisect" in bisect_next(). That way, the labels given by visualize will
> match what the user is doing automatically.
Yes, that is the case 1 above.
> I said "it makes sense in its own way", because it is _quite_ different
> from how git-bisect currently assumes, and restructuring git-bisect to
> operate naturally in a way Michael describes would be a much larger
> surgery with costs (including risks of bugs) associated with it, which
> needs to be weighed in when judging that approach would actually make
> sense.
Yes it needs work in git-bisect.sh and I don't think the current situation
with the "maybe you mistake good and bad revs?" error message is too bad.
Regards,
Christian.
^ permalink raw reply
* [Bug?] git submodule add doesn't respect core.autocrlf
From: Edward Z. Yang @ 2008-06-26 5:43 UTC (permalink / raw)
To: git
It doesn't appear that git-submodule add respects crlf, as evidenced by
this set of commands on Windows:
mkdir test
cd test
git init
git config core.safecrlf true
git config core.autocrlf true
git submodule add http://repo.or.cz/w/htmlpurifier.git htmlpurifier
You get: "fatal: LF would be replaced by CRLF in .gitmodules" and
inspecting .gitmodules reveals that it uses LF, instead of CRLF.
Can anyone reproduce? Thanks.
^ permalink raw reply
* [PATCH 2/2] for-each-ref: implement missing tag values
From: Jeff King @ 2008-06-26 5:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Lea Wiemann, git
In-Reply-To: <20080626053551.GA20767@sigill.intra.peff.net>
The "type" and "object" fields for tags were accepted as
valid atoms, but never implemented. Consequently, they
simply returned the empty string, even for valid tags.
Signed-off-by: Jeff King <peff@peff.net>
---
builtin-for-each-ref.c | 7 +++++++
t/t6300-for-each-ref.sh | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 07d9c57..fef93d7 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -234,6 +234,13 @@ static void grab_tag_values(struct atom_value *val, int deref, struct object *ob
name++;
if (!strcmp(name, "tag"))
v->s = tag->tag;
+ else if (!strcmp(name, "type") && tag->tagged)
+ v->s = typename(tag->tagged->type);
+ else if (!strcmp(name, "object") && tag->tagged) {
+ char *s = xmalloc(41);
+ strcpy(s, sha1_to_hex(tag->tagged->sha1));
+ v->s = s;
+ }
}
}
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 415e1d1..a3c8941 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -74,8 +74,8 @@ test_atom tag objectname 98b46b1d36e5b07909de1b3886224e3e81e87322
test_atom tag tree ''
test_atom tag parent ''
test_atom tag numparent ''
-test_atom tag object '67a36f10722846e891fbada1ba48ed035de75581' failure
-test_atom tag type 'commit' failure
+test_atom tag object '67a36f10722846e891fbada1ba48ed035de75581'
+test_atom tag type 'commit'
test_atom tag author ''
test_atom tag authorname ''
test_atom tag authoremail ''
--
1.5.6
^ permalink raw reply related
* [PATCH 1/2] improve for-each-ref test script
From: Jeff King @ 2008-06-26 5:37 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Lea Wiemann, git
In-Reply-To: <20080626053551.GA20767@sigill.intra.peff.net>
Previously, we did a sanity check by doing for-each-ref
using each possible format atom. However, we never checked
the actual output produced by that atom. This patch checks
the output, and in doing so reveals breakage on a few atoms.
While we're at it, also clean up a few '!' into
test_must_fail.
Signed-off-by: Jeff King <peff@peff.net>
---
t/t6300-for-each-ref.sh | 87 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 70 insertions(+), 17 deletions(-)
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 91ea85d..415e1d1 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -26,25 +26,78 @@ test_expect_success 'Create sample commit with known timestamp' '
git tag -a -m "Tagging at $datestamp" testtag
'
-test_expect_success 'Check atom names are valid' '
- bad=
- for token in \
- refname objecttype objectsize objectname tree parent \
- numparent object type author authorname authoremail \
- authordate committer committername committeremail \
- committerdate tag tagger taggername taggeremail \
- taggerdate creator creatordate subject body contents
- do
- git for-each-ref --format="$token=%($token)" refs/heads || {
- bad=$token
- break
- }
- done
- test -z "$bad"
+test_atom() {
+ case "$1" in
+ head) ref=refs/heads/master ;;
+ tag) ref=refs/tags/testtag ;;
+ esac
+ printf '%s\n' "$3" >expected
+ test_expect_${4:-success} "basic atom: $1 $2" "
+ git for-each-ref --format='%($2)' $ref >actual &&
+ test_cmp expected actual
+ "
+}
+
+test_atom head refname refs/heads/master
+test_atom head objecttype commit
+test_atom head objectsize 171
+test_atom head objectname 67a36f10722846e891fbada1ba48ed035de75581
+test_atom head tree 0e51c00fcb93dffc755546f27593d511e1bdb46f
+test_atom head parent ''
+test_atom head numparent 0
+test_atom head object ''
+test_atom head type ''
+test_atom head author 'A U Thor <author@example.com> 1151939924 +0200'
+test_atom head authorname 'A U Thor'
+test_atom head authoremail '<author@example.com>'
+test_atom head authordate 'Mon Jul 3 17:18:44 2006 +0200'
+test_atom head committer 'C O Mitter <committer@example.com> 1151939923 +0200'
+test_atom head committername 'C O Mitter'
+test_atom head committeremail '<committer@example.com>'
+test_atom head committerdate 'Mon Jul 3 17:18:43 2006 +0200'
+test_atom head tag ''
+test_atom head tagger ''
+test_atom head taggername ''
+test_atom head taggeremail ''
+test_atom head taggerdate ''
+test_atom head creator 'C O Mitter <committer@example.com> 1151939923 +0200'
+test_atom head creatordate 'Mon Jul 3 17:18:43 2006 +0200'
+test_atom head subject 'Initial'
+test_atom head body ''
+test_atom head contents 'Initial
+'
+
+test_atom tag refname refs/tags/testtag
+test_atom tag objecttype tag
+test_atom tag objectsize 154
+test_atom tag objectname 98b46b1d36e5b07909de1b3886224e3e81e87322
+test_atom tag tree ''
+test_atom tag parent ''
+test_atom tag numparent ''
+test_atom tag object '67a36f10722846e891fbada1ba48ed035de75581' failure
+test_atom tag type 'commit' failure
+test_atom tag author ''
+test_atom tag authorname ''
+test_atom tag authoremail ''
+test_atom tag authordate ''
+test_atom tag committer ''
+test_atom tag committername ''
+test_atom tag committeremail ''
+test_atom tag committerdate ''
+test_atom tag tag 'testtag'
+test_atom tag tagger 'C O Mitter <committer@example.com> 1151939925 +0200'
+test_atom tag taggername 'C O Mitter'
+test_atom tag taggeremail '<committer@example.com>'
+test_atom tag taggerdate 'Mon Jul 3 17:18:45 2006 +0200'
+test_atom tag creator 'C O Mitter <committer@example.com> 1151939925 +0200'
+test_atom tag creatordate 'Mon Jul 3 17:18:45 2006 +0200'
+test_atom tag subject 'Tagging at 1151939927'
+test_atom tag body ''
+test_atom tag contents 'Tagging at 1151939927
'
test_expect_success 'Check invalid atoms names are errors' '
- ! git-for-each-ref --format="%(INVALID)" refs/heads
+ test_must_fail git-for-each-ref --format="%(INVALID)" refs/heads
'
test_expect_success 'Check format specifiers are ignored in naming date atoms' '
@@ -64,7 +117,7 @@ test_expect_success 'Check valid format specifiers for date fields' '
'
test_expect_success 'Check invalid format specifiers are errors' '
- ! git-for-each-ref --format="%(authordate:INVALID)" refs/heads
+ test_must_fail git-for-each-ref --format="%(authordate:INVALID)" refs/heads
'
cat >expected <<\EOF
--
1.5.6
^ permalink raw reply related
* Re: [Bug] for-each-ref: %(object) and %(type) unimplemented
From: Jeff King @ 2008-06-26 5:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Lea Wiemann, Git Mailing List
In-Reply-To: <20080625161433.GA6612@sigill.intra.peff.net>
On Wed, Jun 25, 2008 at 12:14:33PM -0400, Jeff King wrote:
> Hmm. Actually, there is a test in t6300 that runs with each atom name.
> Unfortunately, it doesn't bother actually checking the output for
> sanity, so the fact that these atoms returned the empty string was
> missed.
And here is a two patch series cleaning up the test script and fixing
the bug.
-Peff
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox