Repository navigation
Adds feature to auto-prune local branches - #6544
Merged
Merged
Conversation
added 9 commits
December 4, 2018 11:45
this commit should be reverted before merging
Contributor
|
@iAmWillShepherd I'm excited to see this! Prior to adding |
Contributor
Author
|
@billygriffin This is still very much WIP. I added a high-level overview of what I have left. |
sensetv
approved these changes
Jan 7, 2019
sensetv
previously approved these changes
Jan 7, 2019
sensetv
previously approved these changes
Jan 8, 2019
added 8 commits
January 8, 2019 11:12
Indicates that no pruning has been done
shiftkey
suggested changes
Feb 6, 2019
shiftkey
reviewed
Feb 6, 2019
shiftkey
reviewed
Feb 6, 2019
shiftkey
reviewed
Feb 6, 2019
Co-Authored-By: iAmWillShepherd <[email protected]>
Co-Authored-By: iAmWillShepherd <[email protected]>
Co-Authored-By: iAmWillShepherd <[email protected]>
Co-Authored-By: iAmWillShepherd <[email protected]>
Co-Authored-By: iAmWillShepherd <[email protected]>
Co-Authored-By: iAmWillShepherd <[email protected]>
Contributor
Author
|
💯 |
shiftkey
approved these changes
Feb 6, 2019
Member
|
This has gone through a long review process and is feature-flagged for development currently, so to prevent further delays I plan to merge this in around 1pm SF time today so we can unblock #6664. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #750
This PR adds a feature that will auto-prune branches based on these conditions:
It will run once a repo is opened and every 24 hours for that repo, but only when that repo is opened. This means if a repo is not opened in 3 days, the next time it will be pruned is when that repo is opened. If a repo was just pruned, the next check will be 24 hours later if that repo is opened. To accomplish this, I'll likely use IndexedDB to store last time a repo was pruned.
Note that this PR does not include logic to only delete branches that haven't been checked out within 14 days. That logic is captured in #6664 and will be integrated after it is merged.
Todo:
Filter out local branches that are ahead of default branch(Runninggit branch --mergedtakes care of this)Add logic to only add branch to prune list if last checkout was more than 14 days ago- Add git function to get branch checkouts from reflog #6664