git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Additional merge-base tests
@ 2006-07-04  3:55 A Large Angry SCM
  2006-07-04  5:47 ` Junio C Hamano
  0 siblings, 1 reply; 26+ messages in thread
From: A Large Angry SCM @ 2006-07-04  3:55 UTC (permalink / raw)
  To: Junio C Hamano, git

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
---
This demonstrates a problem with git-merge-base.

 t6010-merge-base.sh |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+)

diff --git a/t/t6010-merge-base.sh b/t/t6010-merge-base.sh
index 1dce123..9a815bd 100755
--- a/t/t6010-merge-base.sh
+++ b/t/t6010-merge-base.sh
@@ -44,6 +44,31 @@ A=$(doit 1 A $B)
 G=$(doit 7 G $B $E)
 H=$(doit 8 H $A $F)
 
+# Setup for second test set
+#
+#   PL  PR
+#  /  \/  \
+# L2  C2  R2
+# |   |   |
+# L1  C1  R1
+# |   |   |
+# L0  C0  R0
+#   \ |  /
+#     S
+
+S=$(doit  0 S)
+C0=$(doit -3 C0 $S)
+L0=$(doit  2 L0 $S)
+R0=$(doit  2 R0 $S)
+C1=$(doit -2 C1 $C0)
+L1=$(doit  3 L1 $L0)
+R1=$(doit  3 R1 $R0)
+C2=$(doit -1 C2 $C1)
+L2=$(doit  4 L2 $L1)
+R2=$(doit  4 R2 $R1)
+PL=$(doit  1 PL $L2 $C2)
+PR=$(doit  1 PR $C2 $R2)
+
 test_expect_success 'compute merge-base (single)' \
     'MB=$(git-merge-base G H) &&
      expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
@@ -56,4 +81,12 @@ test_expect_success 'compute merge-base 
     'MB=$(git-show-branch --merge-base G H) &&
      expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
 
+test_expect_success 'compute merge-base (single)' \
+    'MB=$(git-merge-base PL PR) &&
+     expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/C2"'
+
+test_expect_success 'compute merge-base (all)' \
+    'MB=$(git-merge-base --all PL PR) &&
+     expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/C2"'
+
 test_done

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2006-07-05 17:05 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04  3:55 [PATCH] Additional merge-base tests A Large Angry SCM
2006-07-04  5:47 ` Junio C Hamano
2006-07-04  6:41   ` A Large Angry SCM
2006-07-04  7:17     ` Junio C Hamano
2006-07-04  7:45     ` Junio C Hamano
2006-07-04  8:23       ` Johannes Schindelin
2006-07-04 10:38         ` Junio C Hamano
2006-07-04 11:16           ` Jakub Narebski
2006-07-04 11:35             ` Johannes Schindelin
2006-07-04 11:40           ` Johannes Schindelin
2006-07-04 20:18         ` A Large Angry SCM
2006-07-04 21:15         ` Junio C Hamano
2006-07-04 22:25           ` Johannes Schindelin
2006-07-04 22:42             ` Junio C Hamano
2006-07-04 23:07             ` A Large Angry SCM
2006-07-04 23:14               ` Jakub Narebski
2006-07-04 23:39                 ` Junio C Hamano
2006-07-05  0:26                 ` A Large Angry SCM
2006-07-05  0:24               ` Junio C Hamano
2006-07-05  7:56               ` Johannes Schindelin
2006-07-05 16:15                 ` A Large Angry SCM
2006-07-05 17:04                   ` Johannes Schindelin
2006-07-05  8:39           ` Josef Weidendorfer
2006-07-05 14:28             ` A Large Angry SCM
2006-07-04 20:08       ` A Large Angry SCM
2006-07-05  0:59       ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).