Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use ^git instead of git #105

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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