@@ -35,6 +35,7 @@ def __init__(
3535 commit_if_empty : Optional [bool ] = False ,
3636 raise_if_empty : Optional [bool ] = False ,
3737 commit_only : Optional [bool ] = None ,
38+ skip_staging : bool = False ,
3839 ) -> None :
3940 """__init__ of Commit.
4041
@@ -49,6 +50,7 @@ def __init__(
4950 self ._commit_if_empty = commit_if_empty
5051 self ._raise_if_empty = raise_if_empty
5152 self ._commit_filter_paths = commit_only
53+ self ._skip_staging : bool = skip_staging
5254
5355 def _pre_hook (self , builder : Command , context : dict , * args , ** kwargs ) -> None :
5456 """Hook to create a commit transaction.
@@ -65,7 +67,9 @@ def _pre_hook(self, builder: Command, context: dict, *args, **kwargs) -> None:
6567 from renku .core .management .git import prepare_commit
6668
6769 self .diff_before = prepare_commit (
68- context ["client_dispatcher" ].current_client , commit_only = self ._commit_filter_paths
70+ context ["client_dispatcher" ].current_client ,
71+ commit_only = self ._commit_filter_paths ,
72+ skip_staging = self ._skip_staging ,
6973 )
7074
7175 def _post_hook (self , builder : Command , context : dict , result : CommandResult , * args , ** kwargs ):
@@ -90,6 +94,7 @@ def _post_hook(self, builder: Command, context: dict, result: CommandResult, *ar
9094 commit_empty = self ._commit_if_empty ,
9195 raise_if_empty = self ._raise_if_empty ,
9296 commit_message = self ._message ,
97+ skip_staging = self ._skip_staging ,
9398 )
9499 except errors .RenkuException as e :
95100 result .error = e
0 commit comments