Re: [PATCH] git-blame: Use the same tests for git-blame as for git-annotate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fredrik Kuivinen wrote:

>Signed-off-by: Fredrik Kuivinen <freku045@xxxxxxxxxxxxxx>
>
>
>---
>
> t/annotate-tests.sh |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++
> t/t8001-annotate.sh |   85 +-------------------------------------------------
> t/t8002-blame.sh    |    9 +++++
> 3 files changed, 97 insertions(+), 83 deletions(-)
> create mode 100644 t/annotate-tests.sh
> create mode 100755 t/t8002-blame.sh
>
>06b0e500a5202899dcfd037cf78ee4a982da46b4
>diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
>new file mode 100644
>index 0000000..54a4dfb
>--- /dev/null
>+++ b/t/annotate-tests.sh
>@@ -0,0 +1,86 @@
>+# This file isn't used as a test script directly, instead it is
>+# sourced from t8001-annotate.sh and t8001-blame.sh.
>+
>+test_expect_success \
>+    'prepare reference tree' \
>+    'echo "1A quick brown fox jumps over the" >file &&
>+     echo "lazy dog" >>file &&
>+     git add file
>+     GIT_AUTHOR_NAME="A" git commit -a -m "Initial."'
>+
>+test_expect_success \
>+    'check all lines blamed on A' \
>+    '[ $(git annotate file | awk "{print \$3}" | grep -c "A") == 2 ]'
>  
>
This should be $PROG as well, I suspect.

Also, we need to agree on a syntax for working on non-HEAD revisions.

"git annotate $file $commitish" is what I had been using, but it's
really not something I feel strongly about.


-- 

Ryan Anderson
  sometimes Pug Majere

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]