You've already forked agentic-coding-workflow
fix: address code review — error-path tests, edge cases, UX improvements
This commit is contained in:
@@ -52,7 +52,7 @@ func parseRemoteBranches(buf []byte) []string {
|
||||
var branches []string
|
||||
sc := bufio.NewScanner(bytes.NewReader(buf))
|
||||
for sc.Scan() {
|
||||
line := sc.Text()
|
||||
line := strings.TrimSpace(sc.Text())
|
||||
if idx := strings.Index(line, "\trefs/heads/"); idx >= 0 {
|
||||
name := line[idx+len("\trefs/heads/"):]
|
||||
if name != "" {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
func TestParseRemoteBranches(t *testing.T) {
|
||||
t.Parallel()
|
||||
input := []byte("aabbccdd\trefs/heads/main\n" +
|
||||
input := []byte("aabbccdd\trefs/heads/main\r\n" +
|
||||
"eeff0011\trefs/heads/develop\n" +
|
||||
"22334455\trefs/heads/feature/foo\n" +
|
||||
"deadbeef\trefs/tags/v1.0\n")
|
||||
|
||||
Reference in New Issue
Block a user