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
Support prune empty commit #27
Comments
|
This issue is a big deal. BFG appears to only remove empty commits from the descendents of HEAD. Due to not noticing the discrepency this caused a big headache for me. I ended up redoing the clean up with git-filter-branch & --prune-empty; fortunately it only took 2 minutes to run. Here's a complete rundown on what I ran including stripping out the synthetic GitHub pull request refs. |
Ah, you might be getting a bit confused here - The BFG currently doesn't remove empty commits from anywhere - descendants of If you're not seeing empty commits in the history of your http://rtyley.github.io/bfg-repo-cleaner/#protected-commits ...so if the history of your |
|
Then why did these branches diverge so much? Here is the output of that bfg run in between: |
|
in the bfg'd repo the following empty commit is after 0aaef480d02bcc955ebba0655dc1323fbe51ccc3 and is the source of the divergence: The original version commit: |
|
Could you share the original repo (before cleaning) with me? Thanks for that diagnostic information you've already sent - unfortunately it doesn't quite give me enough information to get a clear picture of the evidence for your assertion that The BFG sometimes prunes empty commits. By 'pruning empty commits', I mean entire commits being removed from commit history when they no longer contain any file changes in their cleaned form, and as I said, I don't think The BFG currently does that at all. |
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits #27
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits #27
|
@rtyley, are you planning to merge these changes to master? I think this is a very useful feature. |
|
+1. Can indeed be very useful. |
|
+1 |
1 similar comment
|
+1 |
|
Working on the many open source projects I give to the community takes up a
|
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits rtyley#27
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits rtyley#27
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits rtyley#27
|
+1 |
This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits rtyley#27
rtyley#147 Squashed commit of the following: commit 850d967 Author: Brett Randall <javabrett@gmail.com> Date: Tue Feb 6 20:39:47 2018 +1100 Updated --prune-empty-commits test: specs2 -> scalatest. commit c008b83 Author: Brett Randall <javabrett@gmail.com> Date: Mon May 16 09:17:33 2016 +1000 Consider --prune-empty-commits option as work on-its-own, allow BFG to run with prune-empty-commits as its only cleaning-task. commit ea4c8a2 Author: Brett Randall <javabrett@gmail.com> Date: Fri May 13 23:00:31 2016 +1000 API updates to bring this up to master 8abe03c 1.12.13-SNAPSHOT. commit 56c4cfe Author: Martin Dengler <martin@martindengler.com> Date: Tue Dec 22 14:08:39 2015 -0600 Prune empty commits test typo fix commit 8b6366d Author: Roberto Tyley <roberto.tyley@gmail.com> Date: Fri May 9 09:11:54 2014 +0100 Add nasty nasty code to address pruning the initial commit... ...do we want to go this far!? commit 1caf6f1 Author: Roberto Tyley <roberto.tyley@gmail.com> Date: Sat May 10 13:01:54 2014 +0100 Prune empty commits test commit 2f866b5 Author: Roberto Tyley <roberto.tyley@gmail.com> Date: Sun Apr 6 23:11:14 2014 +0100 Add the option to prune empty commits (issue rtyley#27) This feature removes commits that- after the cleaning process -contain *no* file-tree change when compared to their parent commit. This would be because the cleaning process has cleaned away whatever content it was that was _changing_ in the original commit. The option is off by default, it's activated by using the `--prune-empty-commits` flag, eg: $ bfg --delete-files foo --prune-empty-commits rtyley#27
Like git branch-filter --prune-empty
The text was updated successfully, but these errors were encountered: