Skip to content

Commit b6a64ae

Browse files
committed
sync/git(fix[update_repo]): Use quiet=True for stash.save
why: The code incorrectly passed "--quiet" as the message parameter, creating stashes with literal "--quiet" message instead of suppressing output. what: - Change stash.save(message="--quiet") to stash.save(quiet=True) - Remove unused git_stash_save_options variable - Remove outdated Git < 1.7.6 comment
1 parent f0e705d commit b6a64ae

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ $ uv add libvcs --prerelease allow
2020

2121
_Upcoming changes will be written here._
2222

23+
### Bug fixes
24+
25+
#### Fix stash.save() quiet parameter usage (#506)
26+
27+
- Fixed `GitSync.update_repo()` to use `stash.save(quiet=True)` instead of incorrectly passing `"--quiet"` as the message parameter
28+
2329
### Development
2430

2531
#### Makefile -> Justfile (#500)

src/libvcs/sync/git.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,8 @@ def update_repo(
480480
# If not in clean state, stash changes in order to be able
481481
# to be able to perform git pull --rebase
482482
if need_stash:
483-
# If Git < 1.7.6, uses --quiet --all
484-
git_stash_save_options = "--quiet"
485483
try:
486-
process = self.cmd.stash.save(message=git_stash_save_options)
484+
process = self.cmd.stash.save(quiet=True)
487485
except exc.CommandError:
488486
self.log.exception("Failed to stash changes")
489487

0 commit comments

Comments
 (0)