-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clone] first journey test for pack-receive
- Loading branch information
Showing
5 changed files
with
85 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Outcome { index: Outcome { index_kind: V2, index_hash: Id([199, 135, 222, 42, 175, 184, 151, 65, 124, 168, 22, 123, 174, 177, 70, 234, 189, 24, 188, 95]), data_hash: Id([52, 101, 116, 183, 51, 29, 195, 161, 114, 77, 162, 24, 214, 34, 198, 225, 182, 198, 106, 87]), num_objects: 9 }, pack_kind: V2, index_path: None, data_path: None } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,33 +48,52 @@ title "CLI ${kind}" | |
) | ||
) | ||
|
||
function small-repo-in-sandbox() { | ||
sandbox | ||
{ | ||
git init | ||
git config commit.gpgsign false | ||
set -a | ||
export GIT_AUTHOR_DATE="2020-09-09 09:06:03 +0800" | ||
export GIT_COMMITTER_DATE="${GIT_AUTHOR_DATE}" | ||
export GIT_AUTHOR_NAME="Sebastian Thiel" | ||
export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME}" | ||
export GIT_AUTHOR_EMAIL="[email protected]" | ||
export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL}" | ||
touch a | ||
git add a | ||
git commit -m "first" | ||
git tag unannotated | ||
touch b | ||
git add b | ||
git commit -m "second" | ||
git tag annotated -m "tag message" | ||
git branch dev | ||
echo hi >> b | ||
git commit -am "third" | ||
} &>/dev/null | ||
} | ||
|
||
title plumbing | ||
snapshot="$snapshot/plumbing" | ||
(when "running 'pack-receive'" | ||
snapshot="$snapshot/pack-receive" | ||
(small-repo-in-sandbox | ||
(with "file:// protocol" | ||
(with "version 1" | ||
(with "no output directory" | ||
it "generates the correct output" && { | ||
WITH_SNAPSHOT="$snapshot/file-v-any" \ | ||
expect_run $SUCCESSFULLY "$exe_plumbing" pack-receive -p 1 .git | ||
} | ||
) | ||
) | ||
) | ||
) | ||
) | ||
(when "running 'remote-ref-list'" | ||
snapshot="$snapshot/remote-ref-list" | ||
(sandbox | ||
{ | ||
git init | ||
git config commit.gpgsign false | ||
set -a | ||
export GIT_AUTHOR_DATE="2020-09-09 09:06:03 +0800" | ||
export GIT_COMMITTER_DATE="${GIT_AUTHOR_DATE}" | ||
export GIT_AUTHOR_NAME="Sebastian Thiel" | ||
export GIT_COMMITTER_NAME="${GIT_AUTHOR_NAME}" | ||
export GIT_AUTHOR_EMAIL="[email protected]" | ||
export GIT_COMMITTER_EMAIL="${GIT_AUTHOR_EMAIL}" | ||
touch a | ||
git add a | ||
git commit -m "first" | ||
git tag unannotated | ||
touch b | ||
git add b | ||
git commit -m "second" | ||
git tag annotated -m "tag message" | ||
git branch dev | ||
echo hi >> b | ||
git commit -am "third" | ||
} &>/dev/null | ||
(small-repo-in-sandbox | ||
(with "file:// protocol" | ||
(with "version 1" | ||
it "generates the correct output" && { | ||
|