Skip to content

Commit

Permalink
add completion support for gm repo compare (#186)
Browse files Browse the repository at this point in the history
as per title
  • Loading branch information
amtoine authored Mar 6, 2024
1 parent 599298c commit 59f20ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/nu-git-manager-sugar/git/gm-repo-compare.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ compare the changes between two revisions, from a target to the "head"


## Parameters
- `target` <`string`>: the target to compare from
- `--head` <`string`> = `HEAD`: the "head" to use for the comparison
- `target` <`string@get-branches`>: the target to compare from
- `--head` <`string@get-branches`> = `HEAD`: the "head" to use for the comparison


## Signatures
Expand Down
4 changes: 2 additions & 2 deletions pkgs/nu-git-manager-sugar/nu-git-manager-sugar/git/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export def "gm repo get commit" [

# compare the changes between two revisions, from a target to the "head"
export def "gm repo compare" [
target: string, # the target to compare from
--head: string = "HEAD", # the "head" to use for the comparison
target: string@get-branches, # the target to compare from
--head: string@get-branches = "HEAD", # the "head" to use for the comparison
]: nothing -> string {
^git diff (^git merge-base $target $head) $head
}
Expand Down

0 comments on commit 59f20ab

Please sign in to comment.