Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bazel/git
1 result
Show changes
Commits on Source (3)
# [1.0.0-alpha.6](https://git.gitlab.arm.com/bazel/git/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2024-04-19)
### Features
- **checkout:** support `--force` ([3da1caa](https://git.gitlab.arm.com/bazel/git/commit/3da1caaf4cda126ac94dab22072541a7680891cf))
# [1.0.0-alpha.5](https://git.gitlab.arm.com/bazel/git/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2024-04-15)
### Features
......
module(
name = "bazel-git",
version = "1.0.0-alpha.5",
version = "1.0.0-alpha.6",
bazel_compatibility = [
">=7.0.0",
],
......
......@@ -12,7 +12,8 @@ import (
)
type CheckoutCommand struct {
Args struct {
Force bool `short:"f" long:"force" description:"When switching branches, proceed even if the index or the working tree differs from **HEAD**, and even if there are untracked files in the way. This is used to throw away local changes and any untracked files or directories that are in the way."`
Args struct {
Revision plumbing.Revision `positional-arg-name:"<revision>" description:"The revision to update the working tree to."`
} `positional-args:"yes" required:"yes"`
}
......@@ -51,7 +52,8 @@ func (x *CheckoutCommand) Execute(rest []string) error {
log.Debug("checkout", "hash", hash)
err = worktree.Checkout(&git.CheckoutOptions{
Hash: *hash,
Hash: *hash,
Force: x.Force,
})
if err != nil {
log.Error("checkout", "err", err)
......