Skip to content

Commit a673028

Browse files
committed
fix release tags not recognized when not on a branch
"dh-make-golang" creates the "debianized" source repo from scratch. It creates an empty git repo, adds the upstream as a remote, and fetches the tags. However, before this patch, it is using "git fetch" with no additional flags or options. This results in upstream tags not on any branches not being picked up. This patch adds "--tags" flag to "git fetch" so that it can fetch all upstream tags. Signed-off-by: William Lyu <[email protected]>
1 parent d70d43c commit a673028

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

make.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ func createGitRepository(debsrc, gopkg, orig string, u *upstream,
493493
if err := runGitCommandIn(dir, "remote", "add", u.remote, u.rr.Repo); err != nil {
494494
return dir, fmt.Errorf("git remote add %s %s: %w", u.remote, u.rr.Repo, err)
495495
}
496-
log.Printf("Running \"git fetch %s\"\n", u.remote)
497-
if err := runGitCommandIn(dir, "fetch", u.remote); err != nil {
496+
log.Printf("Running \"git fetch --tags %s\"\n", u.remote)
497+
if err := runGitCommandIn(dir, "fetch", "--tags", u.remote); err != nil {
498498
return dir, fmt.Errorf("git fetch %s: %w", u.remote, err)
499499
}
500500
}

0 commit comments

Comments
 (0)