File tree Expand file tree Collapse file tree 4 files changed +19
-23
lines changed Expand file tree Collapse file tree 4 files changed +19
-23
lines changed Original file line number Diff line number Diff line change @@ -75,19 +75,6 @@ impl Index {
7575 }
7676 } ) ?;
7777
78- if repo_did_exist {
79- let remote = repo. find_remote ( "origin" ) ?;
80- let actual_remote_url = remote. url ( ) . ok_or_else ( || {
81- git2:: Error :: from_str ( "did not obtain URL of remote named 'origin'" )
82- } ) ?;
83- if actual_remote_url != repository_url {
84- return Err ( git2:: Error :: from_str ( & format ! (
85- "Actual 'origin' remote url {:#?} did not match desired one at {:#?}" ,
86- actual_remote_url, repository_url
87- ) ) ) ;
88- }
89- }
90-
9178 Ok ( Index {
9279 repo,
9380 seen_ref_name : LAST_SEEN_REFNAME ,
Original file line number Diff line number Diff line change 1+ version https://git-lfs.github.com/spec/v1
2+ oid sha256:77d8b1e3bd00d2ca3f136362a84f0a76bbefa8dc988e74287fae3bc50f949898
3+ size 855244
Original file line number Diff line number Diff line change @@ -5,14 +5,20 @@ set -eu -o pipefail
55parts=" ${1:? first argument is the repoitory root} /tests/fixtures/index-parts"
66commit_list=$parts /commit.list
77
8- git init
9- tar -x < $parts /init.* .tar
10- git add . && git commit -m " initial commit"
8+ mkdir worktree
9+ (cd worktree
10+ git init
11+ tar -x < $parts /init.* .tar
12+ git add . && git commit -m " initial commit"
1113
1214
13- while read -r commit; do
14- patch -p1 < " $parts /$commit .diff"
15- git add .
16- git commit -F " $parts /$commit .msg"
17- done < " $commit_list "
18- git gc
15+ while read -r commit; do
16+ patch -p1 < " $parts /$commit .diff"
17+ git add .
18+ git commit -F " $parts /$commit .msg"
19+ done < " $commit_list "
20+ git gc
21+ )
22+
23+ git clone --bare --no-local ./worktree base
24+ git clone --bare ./worktree clone
Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ fn index_ro() -> Index {
1818 . map ( |p| p. to_str ( ) . unwrap ( ) . to_owned ( ) ) ,
1919 )
2020 . unwrap ( ) ;
21- Index :: from_path_or_cloned ( dir) . unwrap ( )
21+ Index :: from_path_or_cloned ( dir. join ( "base" ) ) . unwrap ( )
2222}
You can’t perform that action at this time.
0 commit comments