rev-list was over-counting
Signed-off-by: oppiliappan me@oppi.li
··· 95 args := []string{fmt.Sprintf("--max-count=%d", 100)} 96 97 if line.OldSha.IsZero() { 98 - // just git rev-list <newsha> 99 args = append(args, line.NewSha.String()) 0 0 0 0 0 0 0 0 100 } else { 101 // git rev-list <oldsha>..<newsha> 102 args = append(args, fmt.Sprintf("%s..%s", line.OldSha.String(), line.NewSha.String()))
··· 95 args := []string{fmt.Sprintf("--max-count=%d", 100)} 96 97 if line.OldSha.IsZero() { 98 + // git rev-list <newsha> ^other-branches --not ^this-branch 99 args = append(args, line.NewSha.String()) 100 + 101 + branches, _ := g.Branches() 102 + for _, b := range branches { 103 + args = append(args, fmt.Sprintf("^%s", b.Name)) 104 + } 105 + 106 + args = append(args, "--not") 107 + args = append(args, fmt.Sprintf("^%s", line.Ref)) 108 } else { 109 // git rev-list <oldsha>..<newsha> 110 args = append(args, fmt.Sprintf("%s..%s", line.OldSha.String(), line.NewSha.String()))