This commit is contained in:
Lunny Xiao
2025-12-22 19:28:20 -08:00
parent 0394fca421
commit 10d4361a5c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ func Clone(ctx context.Context, from, to string, opts CloneRepoOptions) error {
// PushOptions options when push to remote
type PushOptions struct {
Remote string
LocalBranch string
LocalBranch string
Branch string
Force bool
ForceWithLease string
+2 -2
View File
@@ -75,8 +75,8 @@ func initRepoCommit(ctx context.Context, tmpPath string, repo *repo_model.Reposi
if err := gitrepo.PushFromLocal(ctx, tmpPath, repo, git.PushOptions{
LocalBranch: "HEAD",
Branch: defaultBranch,
Env: repo_module.InternalPushingEnvironment(u, repo),
Branch: defaultBranch,
Env: repo_module.InternalPushingEnvironment(u, repo),
}); err != nil {
log.Error("Failed to push back to HEAD Error: %v", err)
return fmt.Errorf("git push: %w", err)