Skip to content

Commit 00faf61

Browse files
alyssaisehuss
authored andcommitted
Add missing code checks to Error::raw_code()
These codes are both already handled by Error::code(), but because they weren't listed in Error::raw_code(), it would return -1, and so the paths in Error::code() for them would never be hit. This fixes the code of errors from Repository::merge_commits() with fail_on_conflict set for me.
1 parent 7bebf64 commit 00faf61

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/error.rs

+5
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ impl Error {
286286
GIT_EEOF,
287287
GIT_EINVALID,
288288
GIT_EUNCOMMITTED,
289+
GIT_EDIRECTORY,
290+
GIT_EMERGECONFLICT,
289291
GIT_PASSTHROUGH,
290292
GIT_ITEROVER,
291293
GIT_RETRY,
@@ -294,6 +296,9 @@ impl Error {
294296
GIT_EAPPLYFAIL,
295297
GIT_EOWNER,
296298
GIT_TIMEOUT,
299+
GIT_EUNCHANGED,
300+
GIT_ENOTSUPPORTED,
301+
GIT_EREADONLY,
297302
)
298303
}
299304

0 commit comments

Comments
 (0)