@@ -256,16 +256,15 @@ def listall_branches(self):
256256 """
257257 return self .git_repo .listall_branches (pygit2 .GIT_BRANCH_LOCAL )
258258
259- def switch_current_branch (self , dst_b , move_over = False , no_stash_ignored = False ):
259+ def switch_current_branch (self , dst_b , move_over = False , move_ignored = False ):
260260 """Switches to the given branch.
261261
262262 Args:
263263 dst_b: the destination branch.
264264 move_over: if True, then uncommitted changes made in the current branch are
265265 moved to the destination branch (defaults to False).
266- no_stash_ignored: if move_over is False and no_stash_ignored is True, then
267- stash only non-ignored files. If both move_over and
268- no_stash_ignored are False, then stash all files, including ignored files.
266+ move_ignored: if True, and move_over is False, then ignored files are moved
267+ to the destination branch, but uncommitted changes are not (defaults to False).
269268 """
270269 if dst_b .is_current :
271270 raise ValueError (
@@ -349,7 +348,7 @@ def save(b):
349348
350349 if not move_over :
351350 # Stash
352- if no_stash_ignored :
351+ if move_ignored :
353352 git .stash .save ('--include-untracked' , '--' , msg )
354353 else :
355354 git .stash .save ('--all' , '--' , msg )
0 commit comments