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

Allow reverts to be supported (or documented) #500

Open
dandhlee opened this issue Apr 23, 2021 · 2 comments
Open

Allow reverts to be supported (or documented) #500

dandhlee opened this issue Apr 23, 2021 · 2 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@dandhlee
Copy link

Currently, in order to revert any changes made I had to go through the following command:

repo apply --branch name --message header --comment body "git revert --no-commit \$(git log --grep=\"for text you need\" --pretty=format:\"%H\"); git reset"

it took a bit of time to figure out that if you simply only do git reverts, the repo tool looks for changes to make through git status and thus does not work naturally with the way that git revert works, hence that's why I had to add ;git reset. Can this be supported through like repo revert "insert query to match commit"?

If not, having the above documented somewhere could also be great for other folks wishing to do a massive revert.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 25, 2021
@SurferJeffAtGoogle
Copy link
Contributor

Thanks for reporting this issue, Dan.

I don't know the repo tool well. To help me understand, could you describe in these terms:

  1. What you did.
  2. What you expected to happen.
  3. What actually happened.

Thanks!

@SurferJeffAtGoogle SurferJeffAtGoogle added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Apr 26, 2021
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Apr 26, 2021
@dandhlee
Copy link
Author

Hey Jeff!

  1. Currently we don't support git revert through the repo tool features, so I've went around to use repo apply tool and used its exec feature to use git revert commands through the repositories to successfully revert specific commits.
  2. I would like this to be supported through a command lets say called repo revert rather than having to weave my way around
  3. I've also tried using repo exec but it doesn't automatically create PRs for you so I've had to use repo apply ... as shown above but with a minor tweak so that it complies with how repo apply expects your git branch status to be in. More specifically, git revert naturally goes into committed changes, repo apply tool expects changes to not be committed yet, thus an additional tweak is required. I don't think anything should change for repo apply function, but support for repo revert would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants