1. 07 5月, 2011 1 次提交
    • J
      tests: eliminate unnecessary setup test assertions · 73151df0
      Jonathan Nieder 提交于
      Most of git's tests write files and define shell functions and
      variables that will last throughout a test script at the top of
      the script, before all test assertions:
      
      	. ./test-lib.sh
      
      	VAR='some value'
      	export VAR
      
      	>empty
      
      	fn () {
      		do something
      	}
      
      	test_expect_success 'setup' '
      		... nontrivial commands go here ...
      	'
      
      Two scripts use a different style with this kind of trivial code
      enclosed by a test assertion; fix them.  The usual style is easier to
      read since there is less indentation to keep track of and no need to
      worry about nested quotes; and on the other hand, because the commands
      in question are trivial, it should not make the test suite any worse
      at catching future bugs in git.
      
      While at it, make some other small tweaks:
      
       - spell function definitions with a space before () for consistency
         with other scripts;
      
       - use the self-contained command "git mktree </dev/null" in
         preference to "git write-tree" which looks at the index when
         writing an empty tree.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      73151df0
  2. 24 4月, 2011 1 次提交
  3. 20 4月, 2011 4 次提交
  4. 19 4月, 2011 1 次提交
  5. 15 4月, 2011 4 次提交
  6. 14 4月, 2011 6 次提交
  7. 12 4月, 2011 8 次提交
  8. 10 4月, 2011 2 次提交
  9. 09 4月, 2011 1 次提交
  10. 07 4月, 2011 8 次提交
  11. 05 4月, 2011 4 次提交