File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,10 @@ pub fn filter_commit(
221
221
oid : git2:: Oid ,
222
222
permissions : filter:: Filter ,
223
223
) -> JoshResult < git2:: Oid > {
224
- let original_commit = transaction. repo ( ) . find_commit ( oid) ?;
224
+ let original_commit = {
225
+ let obj = transaction. repo ( ) . find_object ( oid, None ) ?;
226
+ obj. peel_to_commit ( ) ?
227
+ } ;
225
228
226
229
let perms_commit = if let Some ( s) = transaction. get_ref ( permissions, oid) {
227
230
s
Original file line number Diff line number Diff line change 30
30
1 file changed, 1 insertion(+)
31
31
create mode 100644 sub1/ file12
32
32
33
+ $ git tag -m " a tag object" a_tag_object
33
34
34
35
$ mkdir sub2
35
36
$ echo contents1 > sub2/ file2
40
41
create mode 100644 sub2/ file2
41
42
42
43
$ git describe -- tags
43
- a_tag-2 -gbbc3f80
44
+ a_tag_object-1 -gbbc3f80
44
45
45
46
$ tree
46
47
.
65
66
$ git push -- tags
66
67
To http: // localhost: 8001 / real_repo. git
67
68
* [new tag] a_tag -> a_tag
69
+ * [new tag] a_tag_object -> a_tag_object
68
70
69
71
$ cd $ {TESTTMP}
70
72
84
86
* add file1
85
87
86
88
$ git describe -- tags
87
- a_tag-1-g6e99e1e
89
+ a_tag_object
88
90
89
91
$ cat file1
90
92
contents1
142
144
| | | | -- 282e9 cdc1b972fffd08fd21eead43bc0c83cb8
143
145
| | | | -- c3f8026800792a43ffbc932153f4864509378e
144
146
| | | `-- f54cff926d013ce65a3b1cf4e8d239c43beb4b
147
+ | | | -- c1
148
+ | | | `-- 90 f9e0d45065e20a13996f541c3571ed317c45
145
149
| | | -- c8
146
150
| | | `-- 2 fc150c43f13cc56c0e9caeba01b58ec612022
147
151
| | | -- fa
158
162
| | | -- heads
159
163
| | | `-- master
160
164
| | `-- tags
161
- | | `-- a_tag
165
+ | | | -- a_tag
166
+ | | `-- a_tag_object
162
167
| `-- tags
163
168
`-- overlay
164
169
| -- HEAD
178
183
| -- namespaces
179
184
`-- tags
180
185
181
- 38 directories, 26 files
186
+ 39 directories, 28 files
182
187
$ cat $ {TESTTMP}/ josh-proxy. out | grep TAGS
You can’t perform that action at this time.
0 commit comments