Skip to content

Commit

Permalink
Merge branch 'jc/diff-test-updates' into maint
Browse files Browse the repository at this point in the history
Test clean-up.

* jc/diff-test-updates:
  test_ln_s_add: refresh stat info of fake symbolic links
  t4008: modernise style
  t/diff-lib: check exact object names in compare_diff_raw
  tests: do not borrow from COPYING and README from the real source
  t4010: correct expected object names
  t9300: correct expected object names
  t4008: correct stale comments
  • Loading branch information
Junio C Hamano committed Mar 14, 2015
2 parents 3aab60b + 817d03e commit bb8f6de
Show file tree
Hide file tree
Showing 11 changed files with 550 additions and 175 deletions.
2 changes: 1 addition & 1 deletion t/diff-lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:

sanitize_diff_raw='/^:/s/ '"$_x40"' '"$_x40"' \([A-Z]\)[0-9]* / X X \1# /'
sanitize_diff_raw='/^:/s/ '"\($_x40\)"' '"\($_x40\)"' \([A-Z]\)[0-9]* / \1 \2 \3# /'
compare_diff_raw () {
# When heuristics are improved, the score numbers would change.
# Ignore them while comparing.
Expand Down
361 changes: 361 additions & 0 deletions t/diff-lib/COPYING

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions t/diff-lib/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
////////////////////////////////////////////////////////////////

GIT - the stupid content tracker

////////////////////////////////////////////////////////////////

"git" can mean anything, depending on your mood.

- random three-letter combination that is pronounceable, and not
actually used by any common UNIX command. The fact that it is a
mispronunciation of "get" may or may not be relevant.
- stupid. contemptible and despicable. simple. Take your pick from the
dictionary of slang.
- "global information tracker": you're in a good mood, and it actually
works for you. Angels sing, and a light suddenly fills the room.
- "goddamn idiotic truckload of sh*t": when it breaks

Git is a fast, scalable, distributed revision control system with an
unusually rich command set that provides both high-level operations
and full access to internals.

Git is an Open Source project covered by the GNU General Public License.
It was originally written by Linus Torvalds with help of a group of
hackers around the net. It is currently maintained by Junio C Hamano.

Please read the file INSTALL for installation instructions.
See Documentation/tutorial.txt to get started, then see
Documentation/everyday.txt for a useful minimum set of commands,
and "man git-commandname" for documentation of each command.
CVS users may also want to read Documentation/cvs-migration.txt.

Many Git online resources are accessible from http://git.or.cz/
including full documentation and Git related tools.

The user discussion and development of Git take place on the Git
mailing list -- everyone is welcome to post bug reports, feature
requests, comments and patches to git@vger.kernel.org. To subscribe
to the list, send an email with just "subscribe git" in the body to
majordomo@vger.kernel.org. The mailing list archives are available at
http://marc.theaimsgroup.com/?l=git and other archival sites.

The messages titled "A note from the maintainer", "What's in
git.git (stable)" and "What's cooking in git.git (topics)" and
the discussion following them on the mailing list give a good
reference for project status, development direction and
remaining tasks.
4 changes: 2 additions & 2 deletions t/t4003-diff-rename-1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_description='More rename detection

test_expect_success \
'prepare reference tree' \
'cat "$TEST_DIRECTORY"/../COPYING >COPYING &&
'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
echo frotz >rezrov &&
git update-index --add COPYING rezrov &&
tree=$(git write-tree) &&
Expand Down Expand Up @@ -99,7 +99,7 @@ test_expect_success \

test_expect_success \
'prepare work tree once again' \
'cat "$TEST_DIRECTORY"/../COPYING >COPYING &&
'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
git update-index --add --remove COPYING COPYING.1'

# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
Expand Down
4 changes: 2 additions & 2 deletions t/t4005-diff-rename-2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_description='Same rename detection as t4003 but testing diff-raw.

test_expect_success \
'prepare reference tree' \
'cat "$TEST_DIRECTORY"/../COPYING >COPYING &&
'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
echo frotz >rezrov &&
git update-index --add COPYING rezrov &&
tree=$(git write-tree) &&
Expand Down Expand Up @@ -71,7 +71,7 @@ test_expect_success \

test_expect_success \
'prepare work tree once again' \
'cat "$TEST_DIRECTORY"/../COPYING >COPYING &&
'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
git update-index --add --remove COPYING COPYING.1'

git diff-index -C --find-copies-harder $tree >current
Expand Down
2 changes: 1 addition & 1 deletion t/t4007-rename-3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test_description='Rename interaction with pathspec.

test_expect_success 'prepare reference tree' '
mkdir path0 path1 &&
cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
cp "$TEST_DIRECTORY"/diff-lib/COPYING path0/COPYING &&
git update-index --add path0/COPYING &&
tree=$(git write-tree) &&
echo $tree
Expand Down
Loading

0 comments on commit bb8f6de

Please sign in to comment.