Re: Salvaging borked project history
- From
- Mason <slash.tmp@free.fr>
- Date
- Mar 4, 2015, 14:49 UTC
- Message-ID
- <54F71B75.7000104@free.fr>
- In-Reply-To
- <54EF814D.1020105@free.fr>
Mason wrote:
> I was planning to write 'git diff -q commit^ commit' > to test for empty commits. Looks like I'll be needing > 'git diff commit^ commit | wc -l' instead?
I wrote a script to generate the list of empty commits.
git log --format="%h" --reverse 413cb08.. | while read H do if git diff --quiet $H^ $H; then echo $H; fi done >empty_commits
But it turns out all this is unnecessary, as git-rebase will automatically filter empty commits! :-) Unless given the --keep-empty option, I presume.
Thanks to everyone involved in making this great tool.
Regards.