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

Re: git diff-tree commit detail bug in 2.0.2 and 2.0.3

From
Jeff King <peff@peff.net>
Date
Jul 28, 2014, 18:01 UTC
Message-ID
<20140728180157.GA11265@peff.net>
In-Reply-To
<20140728173734.GA10309@peff.net>
On Mon, Jul 28, 2014 at 01:37:34PM -0400, Jeff King wrote:
Show 16 quoted lines
> On Mon, Jul 28, 2014 at 10:32:45AM -0700, Junio C Hamano wrote:
> 
> > > Junio, we should consider a v2.0.4 with that series, I think. This is a
> > > pretty serious regression in diff-tree (I didn't even realize that the
> > > buffer-slab work went into the maint series; that may have been a little
> > > ambitious).
> > 
> > Or v2.0.4 without that series, which is how we usually do things,
> > but let me see if jk/alloc-commit-id is easily applicable there
> > first.
> 
> Yeah, I'm fine with a straight revert, too (I think it is fine to keep
> in master, though). I think jk/alloc-commit-id is built right on top of
> the original commit-slab topic, so it should be easy to do either way.
> 
> Thanks for dealing with it.
Whatever we do, perhaps it is worth applying the test below on top?
-- >8 --
Subject: t4013: test diff-tree's --stdin commit formatting

Once upon a time, git-log was just "rev-list | diff-tree", and we did not bother to test it separately. These days git-log is implemented internally, but we want to make sure that the rev-list to diff-tree pipeline continues to function. Let's add a basic sanity test.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t4013-diff-various.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 805b055..6ec6072 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -324,4 +324,14 @@ test_expect_success 'diff --cached -- file on unborn branch' '
 	test_cmp "$TEST_DIRECTORY/t4013/diff.diff_--cached_--_file0" result
 '
 
+test_expect_success 'diff-tree --stdin with log formatting' '
+	cat >expect <<-\EOF &&
+	Side
+	Third
+	Second
+	EOF
+	git rev-list master | git diff-tree --stdin --format=%s -s >actual &&
+	test_cmp expect actual
+'
+
 test_done
-- 
2.0.0.566.gfe3e6b2
Previous: Jeff KingNext: Junio C Hamano
Message 10 of 14 in “git diff-tree commit detail bug in 2.0.2 and 2.0.3”
  1. Bryan TurnerJul 28, 2014
  2. Ramsay JonesJul 28, 2014
  3. Jeff KingJul 28, 2014
  4. Jeff KingJul 28, 2014
  5. Bryan TurnerJul 28, 2014
  6. Junio C HamanoJul 28, 2014
  7. Jeff KingJul 28, 2014
  8. Junio C HamanoJul 28, 2014
  9. Jeff KingJul 28, 2014
  10. Jeff KingJul 28, 2014
  11. Junio C HamanoJul 28, 2014
  12. Junio C HamanoJul 29, 2014
  13. Bryan TurnerJul 29, 2014
  14. Jeff KingJul 29, 2014

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.