From e358f3c31e1ae9f653e9b2a6be69f5df53b4ba7e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 23 Jul 2008 01:51:36 +0100 Subject: sort_in_topological_order(): avoid setting a commit flag We used to set the TOPOSORT flag of commits during the topological sorting, but we can just as well use the member "indegree" for it: indegree is now incremented by 1 in the cases where the commit used to have the TOPOSORT flag. This is the same behavior as before, since indegree could not be non-zero when TOPOSORT was unset. Incidentally, this fixes the bug in show-branch where the 8th column was not shown: show-branch sorts the commits in topological order, assuming that all the commit flags are available for show-branch's private matters. But this was not true: TOPOSORT was identical to the flag corresponding to the 8th ref. So the flags for the 8th column were unset by the topological sorting. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t3202-show-branch-octopus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t3202-show-branch-octopus.sh b/t/t3202-show-branch-octopus.sh index 8d50c23b8..7fe4a6ecb 100755 --- a/t/t3202-show-branch-octopus.sh +++ b/t/t3202-show-branch-octopus.sh @@ -49,7 +49,7 @@ cat > expect << EOF +++++++++* [branch10^] initial EOF -test_expect_failure 'show-branch with more than 8 branches' ' +test_expect_success 'show-branch with more than 8 branches' ' git show-branch $(for i in $numbers; do echo branch$i; done) > out && test_cmp expect out -- cgit v1.2.1