Skip to content

Commit

Permalink
use ^git instead of git (#105)
Browse files Browse the repository at this point in the history
just to make all the calls consistent with each other 😌
  • Loading branch information
amtoine authored Nov 21, 2023
1 parent 7d30c11 commit b9a2786
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/gm.nu
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export def clone-full-repo [] {
$env.GIT_REPOS_HOME | path join "github.com/amtoine/nu-git-manager" | path sanitize
)

let actual = git -C $repo rev-list HEAD | lines | last
let actual = ^git -C $repo rev-list HEAD | lines | last
let expected = "2ed2d875d80505d78423328c6b2a60522715fcdf"
assert equal $actual $expected
}
Expand All @@ -118,7 +118,7 @@ export def clone-set-remote [] {
$env.GIT_REPOS_HOME | path join "github.com/amtoine/nu-git-manager" | path sanitize
)

let actual = git -C $repo remote --verbose
let actual = ^git -C $repo remote --verbose
| lines
| parse --regex '(?<remote>[-_\w]+)\s+(?<url>.*) \((?<mode>\w+)\)'
| str trim
Expand Down
14 changes: 7 additions & 7 deletions tests/mod.nu
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export def detect-grafting [] {

export def root-commit [] {
let repo = get-random-test-dir
git clone https://github.com/amtoine/nu-git-manager $repo
^git clone https://github.com/amtoine/nu-git-manager $repo

let actual = get-root-commit $repo
let expected = "2ed2d875d80505d78423328c6b2a60522715fcdf"
Expand All @@ -298,12 +298,12 @@ export def root-commit [] {
export def remote-listing [] {
let repo = get-random-test-dir

git init $repo
git -C $repo remote add 0 0-default
git -C $repo remote add 1 1-fetch
git -C $repo remote set-url 1 --push 1-push
git -C $repo remote add 2 2-fetch
git -C $repo remote set-url 2 --push 2-push
^git init $repo
^git -C $repo remote add 0 0-default
^git -C $repo remote add 1 1-fetch
^git -C $repo remote set-url 1 --push 1-push
^git -C $repo remote add 2 2-fetch
^git -C $repo remote set-url 2 --push 2-push

let expected = [
[remote, fetch, push];
Expand Down

0 comments on commit b9a2786

Please sign in to comment.