Skip to content

Commit 7c500a6

Browse files
authored
Merge pull request #179 from erizocosmico/it/commits-on-n-refs
it: commits that appear on more than one reference
2 parents 41f4776 + a051017 commit 7c500a6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

integration_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,25 @@ func TestIntegration(t *testing.T) {
110110
{int32(1), int32(3), path, "[email protected]"},
111111
},
112112
},
113+
{
114+
`SELECT * FROM (
115+
SELECT COUNT(c.hash) AS num, c.hash
116+
FROM refs r
117+
INNER JOIN commits c
118+
ON history_idx(r.hash, c.hash) >= 0
119+
GROUP BY c.hash
120+
) t WHERE num > 1`,
121+
[]sql.Row{
122+
{int32(3), "6ecf0ef2c2dffb796033e5a02219af86ec6584e5"},
123+
{int32(4), "918c48b83bd081e863dbe1b80f8998f058cd8294"},
124+
{int32(4), "af2d6a6954d532f8ffb47615169c8fdf9d383a1a"},
125+
{int32(4), "1669dce138d9b841a518c64b10914d88f5e488ea"},
126+
{int32(4), "a5b8b09e2f8fcb0bb99d3ccb0958157b40890d69"},
127+
{int32(4), "b8e471f58bcbca63b07bda20e428190409c2db47"},
128+
{int32(4), "35e85108805c84807bc66a02d91535e1e24b38b9"},
129+
{int32(4), "b029517f6300c2da0f4b651b8642506cd6aaf45d"},
130+
},
131+
},
113132
}
114133

115134
for _, tt := range testCases {

0 commit comments

Comments
 (0)