git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RARyan Anderson <ryan@michonline.com>
Date
Mar 6, 2006, 02:56 UTC
Message-ID
<440BA4DA.9060101@michonline.com>
In-Reply-To
<20060305111334.GB23448@c165.ib.student.liu.se>
Fredrik Kuivinen wrote:
Show 34 quoted lines
>Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
>
>
>---
>
> 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
Previous: Ryan AndersonNext: Junio C Hamano
Message 18 of 19 in “git-blame: Use the same tests for git-blame as for git-annotate”
  1. git-blame: Use the same tests for git-blame as for git-annotateFredrik Kuivinen, Mar 5, 2006
  2. Ryan AndersonMar 5, 2006
  3. Junio C HamanoMar 6, 2006
  4. Martin LanghoffMar 6, 2006
  5. annotate: Support annotation of files on other revisions.Ryan Anderson, Mar 6, 2006
  6. Martin LanghoffMar 6, 2006
  7. Fredrik KuivinenMar 6, 2006
  8. A Large Angry SCMMar 6, 2006
  9. Ryan AndersonMar 6, 2006
  10. Shawn PearceMar 6, 2006
  11. Junio C HamanoMar 6, 2006
  12. Shawn PearceMar 6, 2006
  13. A Large Angry SCMMar 6, 2006
  14. Junio C HamanoMar 6, 2006
  15. Johannes SchindelinMar 6, 2006
  16. Johannes SchindelinMar 6, 2006
  17. Ryan AndersonMar 6, 2006
  18. Ryan AndersonMar 6, 2006
  19. annotate/blame tests updates.Junio C Hamano, Mar 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.