@@ -7,15 +7,14 @@ use git2::{Oid, Repository};
77use snafu:: { OptionExt , ResultExt as _, Snafu } ;
88use tracing_indicatif:: suspend_tracing_indicatif;
99
10+ #[ cfg( doc) ]
11+ use crate :: repo:: ensure_worktree_is_at;
1012use crate :: {
1113 error:: { self , CommitId } ,
1214 patch_mail:: { self , mailinfo, mailsplit} ,
1315 utils:: raw_git_cmd,
1416} ;
1517
16- #[ cfg( doc) ]
17- use crate :: repo:: ensure_worktree_is_at;
18-
1918#[ derive( Debug , Snafu ) ]
2019pub enum Error {
2120 #[ snafu( display( "failed to open stgit series file {path:?}" ) ) ]
@@ -61,14 +60,18 @@ pub enum Error {
6160 source : git2:: Error ,
6261 parent_commit : error:: CommitId ,
6362 } ,
64- #[ snafu( display( "failed to apply patch {patch_email_file:?} (from {patch_file:?}) to parent commit {parent_commit}" ) ) ]
63+ #[ snafu( display(
64+ "failed to apply patch {patch_email_file:?} (from {patch_file:?}) to parent commit {parent_commit}"
65+ ) ) ]
6566 ApplyPatch {
6667 source : git2:: Error ,
6768 parent_commit : error:: CommitId ,
6869 patch_email_file : PathBuf ,
6970 patch_file : PathBuf ,
7071 } ,
71- #[ snafu( display( "failed to write tree for patch {patch_email_file:?} (from {patch_file:?}) applied to parent commit {parent_commit}" ) ) ]
72+ #[ snafu( display(
73+ "failed to write tree for patch {patch_email_file:?} (from {patch_file:?}) applied to parent commit {parent_commit}"
74+ ) ) ]
7275 WritePatchedTree {
7376 source : git2:: Error ,
7477 parent_commit : error:: CommitId ,
@@ -77,7 +80,9 @@ pub enum Error {
7780 } ,
7881 #[ snafu( display( "failed to read patched tree {tree}" ) ) ]
7982 ReadPatchedTree { source : git2:: Error , tree : Oid } ,
80- #[ snafu( display( "failed to write commit for patch {patch_email_file:?} (from {patch_file:?}) applied to parent commit {parent_commit}" ) ) ]
83+ #[ snafu( display(
84+ "failed to write commit for patch {patch_email_file:?} (from {patch_file:?}) applied to parent commit {parent_commit}"
85+ ) ) ]
8186 WriteCommit {
8287 source : git2:: Error ,
8388 parent_commit : error:: CommitId ,
0 commit comments