-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* tr/gcov: Test git-patch-id Test rev-list --parents/--children Test log --decorate Test fsck a bit harder Test log --graph Test diff --dirstat functionality Test that diff can read from stdin Support coverage testing with GCC/gcov
- Loading branch information
Showing
10 changed files
with
341 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
$ git diff --dirstat master~1 master~2 | ||
40.0% dir/ | ||
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
$ git log --decorate --all | ||
commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master) | ||
Merge: 9a6d494 c7a2ab9 | ||
Author: A U Thor <author@example.com> | ||
Date: Mon Jun 26 00:04:00 2006 +0000 | ||
|
||
Merge branch 'side' | ||
|
||
commit c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a (refs/heads/side) | ||
Author: A U Thor <author@example.com> | ||
Date: Mon Jun 26 00:03:00 2006 +0000 | ||
|
||
Side | ||
|
||
commit 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 | ||
Author: A U Thor <author@example.com> | ||
Date: Mon Jun 26 00:02:00 2006 +0000 | ||
|
||
Third | ||
|
||
commit 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 | ||
Author: A U Thor <author@example.com> | ||
Date: Mon Jun 26 00:01:00 2006 +0000 | ||
|
||
Second | ||
|
||
This is the second commit. | ||
|
||
commit 444ac553ac7612cc88969031b02b3767fb8a353a (refs/heads/initial) | ||
Author: A U Thor <author@example.com> | ||
Date: Mon Jun 26 00:00:00 2006 +0000 | ||
|
||
Initial | ||
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$ git rev-list --children HEAD | ||
59d314ad6f356dd08601a4cd5e530381da3e3c64 | ||
c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a 59d314ad6f356dd08601a4cd5e530381da3e3c64 | ||
9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 59d314ad6f356dd08601a4cd5e530381da3e3c64 | ||
1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 | ||
444ac553ac7612cc88969031b02b3767fb8a353a 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a | ||
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$ git rev-list --parents HEAD | ||
59d314ad6f356dd08601a4cd5e530381da3e3c64 9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a | ||
c7a2ab9e8eac7b117442a607d5a9b3950ae34d5a 444ac553ac7612cc88969031b02b3767fb8a353a | ||
9a6d4949b6b76956d9d5e26f2791ec2ceff5fdc0 1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 | ||
1bde4ae5f36c8d9abe3a0fce0c6aab3c4a12fe44 444ac553ac7612cc88969031b02b3767fb8a353a | ||
444ac553ac7612cc88969031b02b3767fb8a353a | ||
$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
test_description='git patch-id' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success 'setup' ' | ||
test_commit initial foo a && | ||
test_commit first foo b && | ||
git checkout -b same HEAD^ && | ||
test_commit same-msg foo b && | ||
git checkout -b notsame HEAD^ && | ||
test_commit notsame-msg foo c | ||
' | ||
|
||
test_expect_success 'patch-id output is well-formed' ' | ||
git log -p -1 | git patch-id > output && | ||
grep "^[a-f0-9]\{40\} $(git rev-parse HEAD)$" output | ||
' | ||
|
||
get_patch_id () { | ||
git log -p -1 "$1" | git patch-id | | ||
sed "s# .*##" > patch-id_"$1" | ||
} | ||
|
||
test_expect_success 'patch-id detects equality' ' | ||
get_patch_id master && | ||
get_patch_id same && | ||
test_cmp patch-id_master patch-id_same | ||
' | ||
|
||
test_expect_success 'patch-id detects inequality' ' | ||
get_patch_id master && | ||
get_patch_id notsame && | ||
! test_cmp patch-id_master patch-id_notsame | ||
' | ||
|
||
test_done |