Skip to content

Commit cc56fc2

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 54121b2 commit cc56fc2

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

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
_Notes on the upcoming release will go here._
2121
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->
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
## libvcs 0.40.0 (2026-04-25)
2430

2531
### What's new

src/libvcs/sync/git.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,8 @@ def update_repo(
551551
# If not in clean state, stash changes in order to be able
552552
# to be able to perform git pull --rebase
553553
if need_stash:
554-
# If Git < 1.7.6, uses --quiet --all
555-
git_stash_save_options = "--quiet"
556554
try:
557-
process = self.cmd.stash.save(message=git_stash_save_options)
555+
process = self.cmd.stash.save(quiet=True)
558556
except exc.CommandError as e:
559557
self.log.exception("Failed to stash changes")
560558
result.add_error("stash-save", str(e), exception=e)

0 commit comments

Comments
 (0)