reset to head commit
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
29a9bd467e
commit
831fdfd66d
@ -157,7 +157,7 @@ func (g *Gitea) RequestOpen(ctx context.Context, branch string, path string, mod
|
|||||||
logger.Info(ctx, fmt.Sprintf("update %s from %s to %s", path, mod.Module.Version, mod.Version))
|
logger.Info(ctx, fmt.Sprintf("update %s from %s to %s", path, mod.Module.Version, mod.Version))
|
||||||
|
|
||||||
logger.Info(ctx, "reset worktree")
|
logger.Info(ctx, "reset worktree")
|
||||||
if err = wtree.Reset(&git.ResetOptions{Mode: git.HardReset}); err != nil {
|
if err = wtree.Reset(&git.ResetOptions{Commit: headRef.Hash(), Mode: git.HardReset}); err != nil {
|
||||||
logger.Error(ctx, fmt.Sprintf("failed to reset repo branch: %v", err))
|
logger.Error(ctx, fmt.Sprintf("failed to reset repo branch: %v", err))
|
||||||
} //вроде меняем ветку todo вроде можно удалить
|
} //вроде меняем ветку todo вроде можно удалить
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user