Skip to content

Commit c28175b

Browse files
committed
add fetch
1 parent ee64529 commit c28175b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmd/diff-cov/diff-cov.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ var (
2424

2525
func fetch() error {
2626
out, err := exec.Command(
27-
"git", "fetch", "origin", flagTargetBranch,
27+
"git", "fetch", "origin",
28+
fmt.Sprintf("%s:refs/remotes/origin/%s", flagTargetBranch, flagTargetBranch),
2829
).CombinedOutput()
2930
if err != nil {
3031
fmt.Println(string(out))
@@ -104,7 +105,7 @@ func main() {
104105
"target", "origin/master",
105106
"Target branch")
106107
flag.BoolVar(&flagFetchTarget,
107-
"-fetch", true,
108+
"fetch", true,
108109
"Fetch the target branch")
109110
flag.IntVar(&flagMinimumLine,
110111
"min-diff", 10,

0 commit comments

Comments
 (0)