Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git {ref,}log calls: pass --no-show-signature (#1285)
* git {ref,}log calls: pass --no-show-signature If the `git` configuration `log.showSignature` is set to `true`, then some `git log` and `git reflog` invocations performed by `git-machete` return GPG signature output that causes `git-machete` to fail. The failures appear to occur because GPG signatures are assumed not to appear in the output of those commands. This commit resolves that failure mode by passing the `--no-show-signature` flag to all `git log` and `git reflog` queries. (Passing that flag to `git reflog` queries is necessary because `git reflog` is porcelain for `git log` plus some additional flags.) Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]> * git {ref}log: use `-c log.showSignature=0` instead The `--no-show-signature` flag and `log.showSignature` configuration options were both added in the `git` 2.10.0 release. This commit tries to use `-c log.showSignature=0` instead of `--no-show-signature` to see whether it improves CI test results. Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]> * flake8: fix instances of rules violations Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]> * git_operations: set log.showSignature in one place Pawel Lipski suggested setting the `log.showSignature` git configuration option in a single location rather than passing it in 9 separate locations. This commit makes that change to simplify maintenance, and documents the rationale for passing that setting. Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]> * RELEASE_NOTES: add log.showSignature changes To keep `git machete`'s release notes up to date, this commit mentions the `log.showSignature` fix in those release notes. Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]> * test_git_operations: test log.showsignature bug To prevent the bug from issue #1286 from recurring, this commit adds a test to the `git_operations` tests that will fail if the active `git` configuration sets `log.showSignature` to `true`. Signed-off-by: Geoffrey M. Oxberry <[email protected]> * git_operations: make git {ref,}log calls 1-liners Moving the location at which `git-machete` injects `-c log.showSignature=false` into `git` command invocations means we no longer need to break up so many long lines. This commit reverts a collection of changes related to `git log` and `git reflog` calls. Adding the `-c log.showSignature=false` flags to `git log` and `git reflog` invocations caused some `flake8` line length lint errors, which motivated splitting those invocations into multiple lines. Removing those flags means that splitting those invocations into multiple lines is no longer necessary. Invoking those subcommands in Python on single lines is regarded as a readability improvement. Signed-off-by: Geoffrey M. Oxberry <[email protected]> --------- Signed-off-by: Geoffrey M. Oxberry <[email protected]> Signed-off-by: Geoffrey M. Oxberry <[email protected]>
- Loading branch information