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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

args: allow to use multiple --refs arguments #528

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nslsrv
Copy link

@nslsrv nslsrv commented Dec 13, 2023

Refs arguments are passed to git rev-list allowing user to configure the set of commits to operate on. IMHO it's important to be able to pass through any desirable rev-list configurations. This often requires using multiple --refs arguments.

Examples:

  • git filter-repo --refs head1 --refs head2
  • git filter-repo --refs='--glob:refs/heads/*' --refs='--glob:refs/tags/*'
  • git filter-repo --refs='--glob:refs/heads/*' --refs='--not' --refs='master

Example: `git filter-repo --refs head1 --refs head2`

Signed-off-by: Nikita Sliusarev <nsl@nebius.com>
@nslsrv
Copy link
Author

nslsrv commented Mar 31, 2024

@newren Hi, could you please review this one when you have some free time? This patch is good for cases when you need to rewrite ref history partially.

@newren
Copy link
Owner

newren commented Jul 7, 2024

Sorry for the delay.

The PR is interesting, but it is going to break people that have already been passing multiple refs like so:

   git filter-repo --refs head1 head2

or

   git filter-repo --refs ^master head1 head2

This would also invalidate part of the documentation, and would cause one of the tests in the regression testsuite to fail. This might make sense as an alternative way to have done things from the beginning, but I don't like breaking existing uses.

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.

2 participants