When simplify_commit() logic (now called get_comit_action()) decides to
show this commit because revs->show_all was specified, we did not rewrite
its parents, but now we will?
That is, here is what I meant...
revision.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
From: Adam Simpkins <hidden> Date: 2016-06-15 22:47:17
On Tue, Aug 18, 2009 at 11:25:49PM -0700, Junio C Hamano wrote:
Junio C Hamano [off-list ref] writes:
quoted
When simplify_commit() logic (now called get_comit_action()) decides to
show this commit because revs->show_all was specified, we did not rewrite
its parents, but now we will?
That is, here is what I meant...
- if (action == commit_show && revs->prune && revs->dense && want_ancestry(revs)) {
+ if (action == commit_show &&
+ !revs->show_all &&
+ revs->prune && revs->dense && want_ancestry(revs)) {
We may want to add some tests to demonstrate the breakage this fix
addresses.
Yes, you're right. Thanks for catching that. I'll submit a test case
that checks this scenario.
--
Adam Simpkins
simpkins@facebook.com
From: Adam Simpkins <hidden> Date: 2016-06-15 22:47:17
This test case ensures that rev-list --parents --show-all gets the
parent history correct. Normally, --parents rewrites parent history to
skip TREESAME parents. However, --show-all causes TREESAME parents to
still be included in the revision list, so the parents should still be
included too.
Signed-off-by: Adam Simpkins <redacted>
---
Looking through the code, I believe TREESAME commits are the only ones
affected by my earlier bug in simplify_commit().
t/t6015-rev-list-show-all-parents.sh | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
create mode 100644 t/t6015-rev-list-show-all-parents.sh
@@ -0,0 +1,31 @@+#!/bin/sh++test_description='--show-all --parents does not rewrite TREESAME commits'++../test-lib.sh++test_expect_success'set up --show-all --parents test''+test_commitonefoo.txt&&+commit1=`gitrev-list-1HEAD`&&+test_committwobar.txt&&+commit2=`gitrev-list-1HEAD`&&+test_committhreefoo.txt&&+commit3=`gitrev-list-1HEAD`+'++test_expect_success'--parents rewrites TREESAME parents correctly''+echo$commit3$commit1>expected&&+echo$commit1>>expected&&+gitrev-list--parentsHEAD--foo.txt>actual&&+test_cmpexpectedactual+'++test_expect_success'--parents --show-all does not rewrites TREESAME parents''+echo$commit3$commit2>expected&&+echo$commit2$commit1>>expected&&+echo$commit1>>expected&&+gitrev-list--parents--show-allHEAD--foo.txt>actual&&+test_cmpexpectedactual+'++test_done
From: Junio C Hamano <hidden> Date: 2016-06-15 22:47:17
Adam Simpkins [off-list ref] writes:
This test case ensures that rev-list --parents --show-all gets the
parent history correct. Normally, --parents rewrites parent history to
skip TREESAME parents. However, --show-all causes TREESAME parents to
still be included in the revision list, so the parents should still be
included too.
Signed-off-by: Adam Simpkins <redacted>
---
Looking through the code, I believe TREESAME commits are the only ones
affected by my earlier bug in simplify_commit().
What I meant was actually a test for the graph part (i.e. the problem we
would see if we did not apply your update to graph_is_interesting()), but
protecting the simplify_commit() logic with test from breakage is a good
thing to do as well.
Thanks.
From: Adam Simpkins <hidden> Date: 2016-06-15 22:47:17
These tests help make sure graph_is_interesting() is doing the right
thing.
---
t/t6016-rev-list-graph-simplify-history.sh | 276 ++++++++++++++++++++++++++++
1 files changed, 276 insertions(+), 0 deletions(-)
create mode 100755 t/t6016-rev-list-graph-simplify-history.sh