3 # Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
5 # Permission to use, copy, modify, and distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 function test_commit_basic {
20 local testroot=`test_init commit_basic`
22 got checkout $testroot/repo $testroot/wt > /dev/null
24 if [ "$ret" != "0" ]; then
25 test_done "$testroot" "$ret"
29 echo "modified alpha" > $testroot/wt/alpha
30 (cd $testroot/wt && got rm beta >/dev/null)
31 echo "new file" > $testroot/wt/new
32 (cd $testroot/wt && got add new >/dev/null)
34 (cd $testroot/wt && got commit -m 'test commit_basic' > $testroot/stdout)
36 local head_rev=`git_show_head $testroot/repo`
37 echo "A new" > $testroot/stdout.expected
38 echo "M alpha" >> $testroot/stdout.expected
39 echo "D beta" >> $testroot/stdout.expected
40 echo "Created commit $head_rev" >> $testroot/stdout.expected
42 cmp -s $testroot/stdout.expected $testroot/stdout
44 if [ "$ret" != "0" ]; then
45 diff -u $testroot/stdout.expected $testroot/stdout
47 test_done "$testroot" "$ret"
50 function test_commit_new_subdir {
51 local testroot=`test_init commit_new_subdir`
53 got checkout $testroot/repo $testroot/wt > /dev/null
55 if [ "$ret" != "0" ]; then
56 test_done "$testroot" "$ret"
60 mkdir -p $testroot/wt/d
61 echo "new file" > $testroot/wt/d/new
62 echo "another new file" > $testroot/wt/d/new2
63 (cd $testroot/wt && got add d/new >/dev/null)
64 (cd $testroot/wt && got add d/new2 >/dev/null)
67 got commit -m 'test commit_new_subdir' > $testroot/stdout)
69 local head_rev=`git_show_head $testroot/repo`
70 echo "A d/new" > $testroot/stdout.expected
71 echo "A d/new2" >> $testroot/stdout.expected
72 echo "Created commit $head_rev" >> $testroot/stdout.expected
74 cmp -s $testroot/stdout.expected $testroot/stdout
76 if [ "$ret" != "0" ]; then
77 diff -u $testroot/stdout.expected $testroot/stdout
79 test_done "$testroot" "$ret"
82 function test_commit_subdir {
83 local testroot=`test_init commit_subdir`
85 got checkout $testroot/repo $testroot/wt > /dev/null
87 if [ "$ret" != "0" ]; then
88 test_done "$testroot" "$ret"
92 echo "modified alpha" > $testroot/wt/alpha
93 echo "modified zeta" > $testroot/wt/epsilon/zeta
96 got commit -m 'test commit_subdir' epsilon > $testroot/stdout)
98 local head_rev=`git_show_head $testroot/repo`
99 echo "M epsilon/zeta" >> $testroot/stdout.expected
100 echo "Created commit $head_rev" >> $testroot/stdout.expected
102 cmp -s $testroot/stdout.expected $testroot/stdout
104 if [ "$ret" != "0" ]; then
105 diff -u $testroot/stdout.expected $testroot/stdout
107 test_done "$testroot" "$ret"
110 function test_commit_single_file {
111 local testroot=`test_init commit_single_file`
113 got checkout $testroot/repo $testroot/wt > /dev/null
115 if [ "$ret" != "0" ]; then
116 test_done "$testroot" "$ret"
120 echo "modified alpha" > $testroot/wt/alpha
121 echo "modified zeta" > $testroot/wt/epsilon/zeta
123 (cd $testroot/wt && got commit -m 'changed zeta' epsilon/zeta \
126 local head_rev=`git_show_head $testroot/repo`
127 echo "M epsilon/zeta" >> $testroot/stdout.expected
128 echo "Created commit $head_rev" >> $testroot/stdout.expected
130 cmp -s $testroot/stdout.expected $testroot/stdout
132 if [ "$ret" != "0" ]; then
133 diff -u $testroot/stdout.expected $testroot/stdout
135 test_done "$testroot" "$ret"
138 function test_commit_out_of_date {
139 local testroot=`test_init commit_out_of_date`
140 local first_commit=`git_show_head $testroot/repo`
142 got checkout $testroot/repo $testroot/wt > /dev/null
144 if [ "$ret" != "0" ]; then
145 test_done "$testroot" "$ret"
149 echo "modified alpha" > $testroot/repo/alpha
150 git_commit $testroot/repo -m "modified alpha"
152 echo "modified alpha" > $testroot/wt/alpha
154 (cd $testroot/wt && got commit -m 'test commit_out_of_date' \
155 > $testroot/stdout 2> $testroot/stderr)
157 echo -n > $testroot/stdout.expected
158 echo "got: work tree must be updated before these" \
159 "changes can be committed" > $testroot/stderr.expected
161 cmp -s $testroot/stdout.expected $testroot/stdout
163 if [ "$ret" != "0" ]; then
164 diff -u $testroot/stdout.expected $testroot/stdout
165 test_done "$testroot" "$ret"
169 cmp -s $testroot/stderr.expected $testroot/stderr
171 if [ "$ret" != "0" ]; then
172 diff -u $testroot/stderr.expected $testroot/stderr
173 test_done "$testroot" "$ret"
177 echo "alpha" > $testroot/repo/alpha
178 git_commit $testroot/repo -m "reset alpha contents"
179 (cd $testroot/wt && got update -c $first_commit > /dev/null)
181 echo "modified alpha" > $testroot/wt/alpha
183 (cd $testroot/wt && got commit -m 'changed alpha ' > $testroot/stdout)
185 if [ "$ret" != "0" ]; then
186 echo "commit failed unexpectedly" >&2
187 test_done "$testroot" "1"
191 local head_rev=`git_show_head $testroot/repo`
192 echo "M alpha" > $testroot/stdout.expected
193 echo "Created commit $head_rev" >> $testroot/stdout.expected
194 cmp -s $testroot/stdout.expected $testroot/stdout
196 if [ "$ret" != "0" ]; then
197 diff -u $testroot/stdout.expected $testroot/stdout
199 test_done "$testroot" "$ret"
202 function test_commit_added_subdirs {
203 local testroot=`test_init commit_added_subdirs`
205 got checkout $testroot/repo $testroot/wt > /dev/null
207 if [ "$ret" != "0" ]; then
208 test_done "$testroot" "$ret"
212 mkdir -p $testroot/wt/d
213 echo "new file" > $testroot/wt/d/new
214 echo "new file 2" > $testroot/wt/d/new2
215 mkdir -p $testroot/wt/d/f
216 echo "new file 3" > $testroot/wt/d/f/new3
217 mkdir -p $testroot/wt/d/f/g
218 echo "new file 4" > $testroot/wt/d/f/g/new4
220 (cd $testroot/wt && got add $testroot/wt/*/new* \
221 $testroot/wt/*/*/new* $testroot/wt/*/*/*/new* > /dev/null)
223 (cd $testroot/wt && got commit -m 'test commit_added_subdirs' \
224 > $testroot/stdout 2> $testroot/stderr)
226 local head_rev=`git_show_head $testroot/repo`
227 echo "A d/f/g/new4" > $testroot/stdout.expected
228 echo "A d/f/new3" >> $testroot/stdout.expected
229 echo "A d/new" >> $testroot/stdout.expected
230 echo "A d/new2" >> $testroot/stdout.expected
231 echo "Created commit $head_rev" >> $testroot/stdout.expected
233 cmp -s $testroot/stdout.expected $testroot/stdout
235 if [ "$ret" != "0" ]; then
236 diff -u $testroot/stdout.expected $testroot/stdout
238 test_done "$testroot" "$ret"
241 function test_commit_rejects_conflicted_file {
242 local testroot=`test_init commit_rejects_conflicted_file`
244 local initial_rev=`git_show_head $testroot/repo`
246 got checkout $testroot/repo $testroot/wt > /dev/null
248 if [ "$ret" != "0" ]; then
249 test_done "$testroot" "$ret"
253 echo "modified alpha" > $testroot/wt/alpha
254 (cd $testroot/wt && got commit -m "modified alpha" >/dev/null)
256 (cd $testroot/wt && got update -c $initial_rev > /dev/null)
258 echo "modified alpha, too" > $testroot/wt/alpha
260 echo "C alpha" > $testroot/stdout.expected
261 echo -n "Updated to commit " >> $testroot/stdout.expected
262 git_show_head $testroot/repo >> $testroot/stdout.expected
263 echo >> $testroot/stdout.expected
265 (cd $testroot/wt && got update > $testroot/stdout)
267 cmp -s $testroot/stdout.expected $testroot/stdout
269 if [ "$ret" != "0" ]; then
270 diff -u $testroot/stdout.expected $testroot/stdout
271 test_done "$testroot" "$ret"
275 (cd $testroot/wt && got commit -m 'commit it' > $testroot/stdout \
278 echo -n > $testroot/stdout.expected
279 echo "got: cannot commit file in conflicted status" \
280 > $testroot/stderr.expected
282 cmp -s $testroot/stdout.expected $testroot/stdout
284 if [ "$ret" != "0" ]; then
285 diff -u $testroot/stdout.expected $testroot/stdout
286 test_done "$testroot" "$ret"
289 cmp -s $testroot/stderr.expected $testroot/stderr
291 if [ "$ret" != "0" ]; then
292 diff -u $testroot/stderr.expected $testroot/stderr
294 test_done "$testroot" "$ret"
297 function test_commit_single_file_multiple {
298 local testroot=`test_init commit_single_file_multiple`
300 got checkout $testroot/repo $testroot/wt > /dev/null
302 if [ "$ret" != "0" ]; then
303 test_done "$testroot" "$ret"
308 echo "modified alpha" >> $testroot/wt/alpha
310 (cd $testroot/wt && \
311 got commit -m "changed alpha" > $testroot/stdout)
313 local head_rev=`git_show_head $testroot/repo`
314 echo "M alpha" > $testroot/stdout.expected
315 echo "Created commit $head_rev" >> $testroot/stdout.expected
317 cmp -s $testroot/stdout.expected $testroot/stdout
319 if [ "$ret" != "0" ]; then
320 diff -u $testroot/stdout.expected $testroot/stdout
321 test_done "$testroot" "$ret"
326 test_done "$testroot" "0"
329 function test_commit_added_and_modified_in_same_dir {
330 local testroot=`test_init commit_added_and_modified_in_same_dir`
332 got checkout $testroot/repo $testroot/wt > /dev/null
334 if [ "$ret" != "0" ]; then
335 test_done "$testroot" "$ret"
339 echo "modified zeta" > $testroot/wt/epsilon/zeta
340 echo "new file" > $testroot/wt/epsilon/new
341 (cd $testroot/wt && got add epsilon/new >/dev/null)
343 (cd $testroot/wt && got commit \
344 -m 'added and modified in same dir' > $testroot/stdout \
347 local head_rev=`git_show_head $testroot/repo`
348 echo "A epsilon/new" > $testroot/stdout.expected
349 echo "M epsilon/zeta" >> $testroot/stdout.expected
350 echo "Created commit $head_rev" >> $testroot/stdout.expected
352 cmp -s $testroot/stdout.expected $testroot/stdout
354 if [ "$ret" != "0" ]; then
355 diff -u $testroot/stdout.expected $testroot/stdout
357 test_done "$testroot" "$ret"
360 function test_commit_path_prefix {
361 local testroot=`test_init commit_path_prefix`
362 local commit1=`git_show_head $testroot/repo`
364 got checkout -p gamma $testroot/repo $testroot/wt > /dev/null
366 if [ "$ret" != "0" ]; then
367 test_done "$testroot" "$ret"
371 echo "modified delta" > $testroot/wt/delta
373 (cd $testroot/wt && got commit -m 'changed gamma/delta' > $testroot/stdout)
375 local commit2=`git_show_head $testroot/repo`
376 echo "M delta" > $testroot/stdout.expected
377 echo "Created commit $commit2" >> $testroot/stdout.expected
379 cmp -s $testroot/stdout.expected $testroot/stdout
381 if [ "$ret" != "0" ]; then
382 diff -u $testroot/stdout.expected $testroot/stdout
383 test_done "$testroot" "$ret"
387 echo "diff $commit1 $commit2" > $testroot/stdout.expected
388 echo -n 'blob - ' >> $testroot/stdout.expected
389 got tree -r $testroot/repo -c $commit1 -i gamma | grep 'delta$' \
390 | cut -d' ' -f 1 >> $testroot/stdout.expected
391 echo -n 'blob + ' >> $testroot/stdout.expected
392 got tree -r $testroot/repo -c $commit2 -i gamma | grep 'delta$' | \
393 cut -d' ' -f 1 >> $testroot/stdout.expected
394 echo '--- gamma/delta' >> $testroot/stdout.expected
395 echo '+++ gamma/delta' >> $testroot/stdout.expected
396 echo '@@ -1 +1 @@' >> $testroot/stdout.expected
397 echo '-delta' >> $testroot/stdout.expected
398 echo '+modified delta' >> $testroot/stdout.expected
400 got diff -r $testroot/repo $commit1 $commit2 > $testroot/stdout
401 cmp -s $testroot/stdout.expected $testroot/stdout
403 if [ "$ret" != "0" ]; then
404 diff -u $testroot/stdout.expected $testroot/stdout
406 test_done "$testroot" "$ret"
409 function test_commit_dir_path {
410 local testroot=`test_init commit_dir_path`
412 got checkout $testroot/repo $testroot/wt > /dev/null
414 if [ "$ret" != "0" ]; then
415 test_done "$testroot" "$ret"
419 echo "modified alpha" > $testroot/wt/alpha
420 echo "modified zeta" > $testroot/wt/epsilon/zeta
422 (cd $testroot/wt && got commit -m 'changed zeta' epsilon \
425 local head_rev=`git_show_head $testroot/repo`
426 echo "M epsilon/zeta" >> $testroot/stdout.expected
427 echo "Created commit $head_rev" >> $testroot/stdout.expected
429 cmp -s $testroot/stdout.expected $testroot/stdout
431 if [ "$ret" != "0" ]; then
432 diff -u $testroot/stdout.expected $testroot/stdout
433 test_done "$testroot" "$ret"
437 echo "M alpha" > $testroot/stdout.expected
438 (cd $testroot/wt && got status > $testroot/stdout)
439 cmp -s $testroot/stdout.expected $testroot/stdout
441 if [ "$ret" != "0" ]; then
442 diff -u $testroot/stdout.expected $testroot/stdout
444 test_done "$testroot" "$ret"
447 function test_commit_selected_paths {
448 local testroot=`test_init commit_selected_paths`
450 got checkout $testroot/repo $testroot/wt > /dev/null
452 if [ "$ret" != "0" ]; then
453 test_done "$testroot" "$ret"
457 echo "modified alpha" > $testroot/wt/alpha
458 echo "modified delta" > $testroot/wt/gamma/delta
459 echo "modified zeta" > $testroot/wt/epsilon/zeta
460 (cd $testroot/wt && got rm beta >/dev/null)
461 echo "new file" > $testroot/wt/new
462 (cd $testroot/wt && got add new >/dev/null)
464 (cd $testroot/wt && got commit -m 'many paths' nonexistent alpha \
465 > $testroot/stdout 2> $testroot/stderr)
467 if [ "$ret" == "0" ]; then
468 echo "commit succeeded unexpectedly" >&2
469 test_done "$testroot" "1"
472 echo "got: nonexistent: bad path" > $testroot/stderr.expected
474 cmp -s $testroot/stderr.expected $testroot/stderr
476 if [ "$ret" != "0" ]; then
477 diff -u $testroot/stderr.expected $testroot/stderr
478 test_done "$testroot" "$ret"
482 (cd $testroot/wt && got commit -m 'many paths' \
483 beta new gamma > $testroot/stdout)
485 local head_rev=`git_show_head $testroot/repo`
486 echo "A new" > $testroot/stdout.expected
487 echo "D beta" >> $testroot/stdout.expected
488 echo "M gamma/delta" >> $testroot/stdout.expected
489 echo "Created commit $head_rev" >> $testroot/stdout.expected
491 cmp -s $testroot/stdout.expected $testroot/stdout
493 if [ "$ret" != "0" ]; then
494 diff -u $testroot/stdout.expected $testroot/stdout
496 test_done "$testroot" "$ret"
499 function test_commit_outside_refs_heads {
500 local testroot=`test_init commit_outside_refs_heads`
502 got ref -r $testroot/repo refs/remotes/origin/master master
504 got checkout -b refs/remotes/origin/master \
505 $testroot/repo $testroot/wt > /dev/null
507 if [ "$ret" != "0" ]; then
508 test_done "$testroot" "$ret"
512 echo "modified alpha" > $testroot/wt/alpha
514 (cd $testroot/wt && got commit -m 'change alpha' \
515 > $testroot/stdout 2> $testroot/stderr)
517 if [ "$ret" == "0" ]; then
518 echo "commit succeeded unexpectedly" >&2
519 test_done "$testroot" "1"
523 echo -n > $testroot/stdout.expected
524 cmp -s $testroot/stdout.expected $testroot/stdout
526 if [ "$ret" != "0" ]; then
527 diff -u $testroot/stdout.expected $testroot/stdout
528 test_done "$testroot" "$ret"
532 echo -n "got: will not commit to a branch outside the " \
533 > $testroot/stderr.expected
534 echo '"refs/heads/" reference namespace' \
535 >> $testroot/stderr.expected
536 cmp -s $testroot/stderr.expected $testroot/stderr
538 if [ "$ret" != "0" ]; then
539 diff -u $testroot/stderr.expected $testroot/stderr
541 test_done "$testroot" "$ret"
544 function test_commit_no_email {
545 local testroot=`test_init commit_no_email`
547 got checkout $testroot/repo $testroot/wt > /dev/null
549 if [ "$ret" != "0" ]; then
550 test_done "$testroot" "$ret"
554 echo "modified alpha" > $testroot/wt/alpha
555 (cd $testroot/wt && env GOT_AUTHOR=":flan_hacker:" \
556 got commit -m 'test no email' > $testroot/stdout \
559 echo -n "got: GOT_AUTHOR environment variable contains no email " \
560 > $testroot/stderr.expected
561 echo -n "address; an email address is required for compatibility "\
562 >> $testroot/stderr.expected
563 echo "with Git" >> $testroot/stderr.expected
564 cmp -s $testroot/stderr.expected $testroot/stderr
566 if [ "$ret" != "0" ]; then
567 diff -u $testroot/stderr.expected $testroot/stderr
568 test_done "$testroot" "$ret"
572 echo -n > $testroot/stdout.expected
573 cmp -s $testroot/stdout.expected $testroot/stdout
575 if [ "$ret" != "0" ]; then
576 diff -u $testroot/stdout.expected $testroot/stdout
578 test_done "$testroot" "$ret"
581 function test_commit_tree_entry_sorting {
582 local testroot=`test_init commit_tree_entry_sorting`
584 got checkout $testroot/repo $testroot/wt > /dev/null
586 if [ "$ret" != "0" ]; then
587 test_done "$testroot" "$ret"
591 # Git's index gets corrupted when tree entries are written in the
592 # order defined by got_path_cmp() rather than Git's own ordering.
593 # Create a new tree where a directory "got" and a file "got-version"
594 # would sort in the wrong order according to Git's opinion.
595 mkdir $testroot/wt/got
596 touch $testroot/wt/got/foo
597 echo foo > $testroot/wt/got-version
598 echo zzz > $testroot/wt/zzz
599 (cd $testroot/wt && got add got-version got/foo zzz > /dev/null)
601 (cd $testroot/wt && got commit -m 'test' > /dev/null)
603 # Let git-fsck verify the newly written tree to make sure Git is happy
604 (cd $testroot/repo && git fsck --strict \
605 > $testroot/fsck.stdout 2> $testroot/fsck.stderr)
607 test_done "$testroot" "$ret"
610 function test_commit_gitconfig_author {
611 local testroot=`test_init commit_gitconfig_author`
613 got checkout $testroot/repo $testroot/wt > /dev/null
615 if [ "$ret" != "0" ]; then
616 test_done "$testroot" "$ret"
620 (cd $testroot/repo && git config user.name 'Flan Luck')
621 (cd $testroot/repo && git config user.email 'flan_luck@openbsd.org')
623 echo "modified alpha" > $testroot/wt/alpha
624 (cd $testroot/wt && got commit -m 'test gitconfig author' > /dev/null)
626 if [ "$ret" != "0" ]; then
627 test_done "$testroot" "$ret"
631 (cd $testroot/repo && got log -l1 | grep ^from: > $testroot/stdout)
633 if [ "$ret" != "0" ]; then
634 test_done "$testroot" "$ret"
638 echo "from: Flan Luck <flan_luck@openbsd.org>" \
639 > $testroot/stdout.expected
640 cmp -s $testroot/stdout.expected $testroot/stdout
642 if [ "$ret" != "0" ]; then
643 diff -u $testroot/stdout.expected $testroot/stdout
645 test_done "$testroot" "$ret"
648 function test_commit_xbit_change {
649 local testroot=`test_init commit_xbit_change`
651 got checkout $testroot/repo $testroot/wt > /dev/null
653 if [ "$ret" != "0" ]; then
654 test_done "$testroot" "$ret"
658 chmod +x $testroot/wt/alpha
660 echo 'm alpha' > $testroot/stdout.expected
661 (cd $testroot/wt && got status > $testroot/stdout)
663 cmp -s $testroot/stdout.expected $testroot/stdout
665 if [ "$ret" != "0" ]; then
666 diff -u $testroot/stdout.expected $testroot/stdout
667 test_done "$testroot" "$ret"
671 (cd $testroot/wt && got commit -mx > $testroot/stdout)
673 if [ "$ret" != "0" ]; then
674 echo "got commit failed unexpectedly"
675 test_done "$testroot" "$ret"
679 local commit_id=`git_show_head $testroot/repo`
680 echo 'm alpha' > $testroot/stdout.expected
681 echo "Created commit $commit_id" >> $testroot/stdout.expected
682 cmp -s $testroot/stdout.expected $testroot/stdout
684 if [ "$ret" != "0" ]; then
685 diff -u $testroot/stdout.expected $testroot/stdout
686 test_done "$testroot" "$ret"
690 (cd $testroot/wt && got status > $testroot/stdout)
692 echo -n > $testroot/stdout.expected
693 cmp -s $testroot/stdout.expected $testroot/stdout
695 if [ "$ret" != "0" ]; then
696 diff -u $testroot/stdout.expected $testroot/stdout
697 test_done "$testroot" "$ret"
701 chmod -x $testroot/wt/alpha
703 echo 'm alpha' > $testroot/stdout.expected
704 (cd $testroot/wt && got status > $testroot/stdout)
706 cmp -s $testroot/stdout.expected $testroot/stdout
708 if [ "$ret" != "0" ]; then
709 diff -u $testroot/stdout.expected $testroot/stdout
710 test_done "$testroot" "$ret"
714 (cd $testroot/wt && got commit -mx > $testroot/stdout)
716 if [ "$ret" != "0" ]; then
717 echo "got commit failed unexpectedly"
718 test_done "$testroot" "$ret"
722 local commit_id=`git_show_head $testroot/repo`
723 echo 'm alpha' > $testroot/stdout.expected
724 echo "Created commit $commit_id" >> $testroot/stdout.expected
725 cmp -s $testroot/stdout.expected $testroot/stdout
727 if [ "$ret" != "0" ]; then
728 diff -u $testroot/stdout.expected $testroot/stdout
729 test_done "$testroot" "$ret"
733 chmod +x $testroot/wt/alpha
735 echo 'm alpha' > $testroot/stdout.expected
736 (cd $testroot/wt && got status > $testroot/stdout)
738 cmp -s $testroot/stdout.expected $testroot/stdout
740 if [ "$ret" != "0" ]; then
741 diff -u $testroot/stdout.expected $testroot/stdout
743 test_done "$testroot" "$ret"
746 run_test test_commit_basic
747 run_test test_commit_new_subdir
748 run_test test_commit_subdir
749 run_test test_commit_single_file
750 run_test test_commit_out_of_date
751 run_test test_commit_added_subdirs
752 run_test test_commit_rejects_conflicted_file
753 run_test test_commit_single_file_multiple
754 run_test test_commit_added_and_modified_in_same_dir
755 run_test test_commit_path_prefix
756 run_test test_commit_dir_path
757 run_test test_commit_selected_paths
758 run_test test_commit_outside_refs_heads
759 run_test test_commit_no_email
760 run_test test_commit_tree_entry_sorting
761 run_test test_commit_gitconfig_author
762 run_test test_commit_xbit_change