sync/git(fix[update_repo]): Use quiet=True for stash.save#506
Open
sync/git(fix[update_repo]): Use quiet=True for stash.save#506
Conversation
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
98da623 to
b6a64ae
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #506 +/- ##
==========================================
- Coverage 53.22% 53.21% -0.01%
==========================================
Files 38 38
Lines 5676 5675 -1
Branches 1063 1063
==========================================
- Hits 3021 3020 -1
Misses 2144 2144
Partials 511 511 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitSync.update_repo()to usestash.save(quiet=True)instead of incorrectly passing"--quiet"as the message parameterProblem
The code was calling
self.cmd.stash.save(message="--quiet")which passed the string"--quiet"as the stash message instead of using the dedicatedquietparameter to suppress output.This resulted in stashes being created with the literal message "--quiet" rather than the operation being quiet.
Fix
Changed to
self.cmd.stash.save(quiet=True)and removed the unused variable and outdated comment.