File tree 4 files changed +19
-23
lines changed 4 files changed +19
-23
lines changed Original file line number Diff line number Diff line change @@ -75,19 +75,6 @@ impl Index {
75
75
}
76
76
} ) ?;
77
77
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
-
91
78
Ok ( Index {
92
79
repo,
93
80
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
5
5
parts=" ${1:? first argument is the repoitory root} /tests/fixtures/index-parts"
6
6
commit_list=$parts /commit.list
7
7
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"
11
13
12
14
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 {
18
18
. map ( |p| p. to_str ( ) . unwrap ( ) . to_owned ( ) ) ,
19
19
)
20
20
. unwrap ( ) ;
21
- Index :: from_path_or_cloned ( dir) . unwrap ( )
21
+ Index :: from_path_or_cloned ( dir. join ( "base" ) ) . unwrap ( )
22
22
}
You can’t perform that action at this time.
0 commit comments