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

[PATCH 1/2] Add test to show that show-branch misses out the 8th column

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 23, 2008, 00:50 UTC
Message-ID
<alpine.DEB.1.00.0807230148130.8986@racer>
Noticed by Pasky.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t3202-show-branch-octopus.sh |   59 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)
 create mode 100755 t/t3202-show-branch-octopus.sh
diff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh
new file mode 100755
index 0000000..8d50c23
--- /dev/null
+++ b/t/t3202-show-branch-octopus.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+test_description='test show-branch with more than 8 heads'
+
+. ./test-lib.sh
+
+numbers="1 2 3 4 5 6 7 8 9 10"
+
+test_expect_success 'setup' '
+
+	> file &&
+	git add file &&
+	test_tick &&
+	git commit -m initial &&
+
+	for i in $numbers
+	do
+		git checkout -b branch$i master &&
+		> file$i &&
+		git add file$i &&
+		test_tick &&
+		git commit -m branch$i || break
+	done
+
+'
+
+cat > expect << EOF
+! [branch1] branch1
+ ! [branch2] branch2
+  ! [branch3] branch3
+   ! [branch4] branch4
+    ! [branch5] branch5
+     ! [branch6] branch6
+      ! [branch7] branch7
+       ! [branch8] branch8
+        ! [branch9] branch9
+         * [branch10] branch10
+----------
+         * [branch10] branch10
+        +  [branch9] branch9
+       +   [branch8] branch8
+      +    [branch7] branch7
+     +     [branch6] branch6
+    +      [branch5] branch5
+   +       [branch4] branch4
+  +        [branch3] branch3
+ +         [branch2] branch2
++          [branch1] branch1
++++++++++* [branch10^] initial
+EOF
+
+test_expect_failure 'show-branch with more than 8 branches' '
+
+	git show-branch $(for i in $numbers; do echo branch$i; done) > out &&
+	test_cmp expect out
+
+'
+
+test_done
-- 
1.6.0.rc0.22.gf2096d.dirty
Next: Johannes Schindelin
Message 1 of 8 in “Add test to show that show-branch misses out the 8th column”
  1. 1/2 Add test to show that show-branch misses out the 8th columnJohannes Schindelin, Jul 23, 2008
  2. 2/2 sort_in_topological_order(): avoid setting a commit flagJohannes Schindelin, Jul 23, 2008
  3. Junio C HamanoJul 23, 2008
  4. Jon LoeligerJul 23, 2008
  5. Petr BaudisJul 23, 2008
  6. Junio C HamanoJul 23, 2008
  7. Junio C HamanoJul 23, 2008
  8. Johannes SchindelinJul 23, 2008

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.