Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --all flag to fetch method #579

Conversation

matthewriedel-flux
Copy link

@matthewriedel-flux matthewriedel-flux commented May 2, 2022

The fix for CVE-2022-25648 broke a workflow for us by removing the ability
to fetch all remotes.

This adds --all to the list of available flags for the #fetch method. It does
not add :a as an alternative flag, as git fetch -a and git fetch --all are
not the same thing.

Signed-off-by: Matthew Riedel matthew.riedel@fluxfederation.com

Your checklist for this pull request

馃毃Please review the guidelines for contributing to this repository.

  • Ensure all commits include DCO sign-off.
  • Ensure that your contributions pass unit testing.
  • Ensure that your contributions contain documentation if applicable.

Description

Please describe your pull request.

The fix for CVE-2022-25648 broke a workflow for us by removing the ability
to fetch all remotes.

This adds --all to the list of available flags for the #fetch method. It does
not add :a as an alternative flag, as git fetch -a and git fetch --all are
not the same thing.

Signed-off-by: Matthew Riedel <matthew.riedel@fluxfederation.com>
@jcouball
Copy link
Member

@matthewriedel-flux thank you for reporting this issue and submitting a fix for it.

As I reviewed this PR, I was going to give feedback to add tests for the new --all options and permutations. However, I realized that there isn't a good example to point to in the body of tests that shows how to do this.

As a response, I created PR #583 which incorporates your changes (with a tweak or two) AND adds tests to test that the command line is generated as expected for different permutations of the fetch command.

I created Test::Unit::TestCase#assert_command_line which should simplify creation of test cases that only test that the command line is generated in a particular way for given Git::Base method. In these cases, the git command line isn't actually called.

I am hoping this helps improve the tests and speeds up the test suite.

I'd be interested in your feedback in that PR.

@jcouball
Copy link
Member

Closing this in favor of PR #583

@jcouball jcouball closed this May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants