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

Add a command to fix the entire commit stack by clang-format.py #25

Open
hikalium opened this issue Jun 26, 2023 · 0 comments
Open

Add a command to fix the entire commit stack by clang-format.py #25

hikalium opened this issue Jun 26, 2023 · 0 comments
Labels
P2 Want, no time estimates

Comments

@hikalium
Copy link
Collaborator

When working with a stack of commits, I often have to format individual ones by doing git rebase -i, selecting the commit with bad formatting, running clang-format.py, git commit --amend for each commit with bad formatting.

It'd be nice to have lium format that just iterates over every commit in git rebase -i, runs clang-format.py, and git commit --amend the changes.

FYI: one-liner to apply cros format for every commit

git rebase --keep-base --exec 'git diff-tree --no-commit-id --name-only HEAD -r --relative . | xargs -I {} -- cros format {} && git commit --amend -a --no-edit'
@hikalium hikalium added the P2 Want, no time estimates label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Want, no time estimates
Projects
None yet
Development

No branches or pull requests

1 participant