Git branch cleanup

Discussion among members of the development team.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
Pentarctagon
Forum Administrator
Posts: 4174
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Git branch cleanup

Post by Pentarctagon »

On Wesnoth's git repo, there are the following branches that haven't been modified since 2018 or earlier:

Code: Select all

1.4-lint                      - Latest commit ee2419b on Jul 21, 2013
alep_android_port             - Latest commit 2662091 on Jun 12, 2014
asio_umcd                     - Latest commit f974890 on Oct 4, 2013
color_range_deprecate         - Latest commit 7717775 on May 2, 2018
customize_objectives          - Latest commit e150693 on Aug 4, 2018
discord_rp                    - Latest commit d794fc4 on Feb 1, 2018
display_context_proxy         - Latest commit a2d6b9c on Apr 28, 2017
fix_3647                      - Latest commit a93674c on Oct 28, 2018
frame_cleanup                 - Latest commit 47c6cbe on Apr 15, 2017
gp2x                          - Latest commit 8c4e221 on Jun 22, 2008
gui2_floating_textbox         - Latest commit 185fca8 on Sep 18, 2016
gui2_help                     - Latest commit 713cbca on Apr 3, 2018
lua_mapgen_stuff              - Latest commit b605d72 on Aug 27, 2017
lua_reorg                     - Latest commit 1e1cf6d on Mar 24, 2018
lua_stuff                     - Latest commit 1f2d131 on Mar 17, 2018
make_tag                      - Latest commit 035b3d9 on Feb 12, 2017
move_units_to_core            - Latest commit f3f34ad on Jul 29, 2018
new_addon_server              - Latest commit d91580b on Oct 16, 2010
ogl                           - Latest commit a05b7fc on Nov 19, 2010
oob_cancel                    - Latest commit 621b474 on Dec 1, 2017
ping_test_disconnect_detect   - Latest commit b325708 on Jan 29, 2017
preprocessor_cleanup          - Latest commit 3a44f58 on Aug 29, 2017
qt                            - Latest commit 0d2b13f on Dec 15, 2014
rel_paths                     - Latest commit a1b5890 on May 7, 2017
renderpath_redo_new           - Latest commit 48bcb27 on Mar 19, 2016
schema                        - Latest commit f13bd92 on Nov 4, 2018
simple_wml_double_quotes      - Latest commit f144a15 on Sep 20, 2018
spritesheet                   - Latest commit 7c8fd2f on Jun 27, 2014
tidyup_blitting               - Latest commit c9d5bf5 on Nov 4, 2016
tod_manager_handling_refactor - Latest commit 29d9cf2 on Apr 19, 2017
unit-types-table              - Latest commit d8ae1dc on Jan 28, 2018
update_check                  - Latest commit 7796799 on Aug 15, 2018
wesnoth-gl                    - Latest commit b6aa0f5 on Jan 14, 2007
wfl_updates                   - Latest commit 2d07f3e on Jun 16, 2018
wml_error_recovery            - Latest commit d0c9bf9 on Jun 10, 2018
Which of these are still actually needed?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Tad_Carlucci
Developer
Posts: 499
Joined: April 24th, 2016, 4:18 pm

Re: Git branch cleanup

Post by Tad_Carlucci »

I'd say none of them. The merge conflicts are probably so daunting, I'd bet it'd be simpler to start anew any work abandoned for that long.
I forked real life and now I'm getting merge conflicts.

gfgtdf
Developer
Posts: 1215
Joined: February 10th, 2013, 2:25 pm

Re: Git branch cleanup

Post by gfgtdf »

Hmm I cannot see all of these branches on GitHub,did you already delete some of those?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Pentarctagon
Forum Administrator
Posts: 4174
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Git branch cleanup

Post by Pentarctagon »

No, I haven't deleted any of them.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

User avatar
josteph
Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Git branch cleanup

Post by josteph »

Recommend to just rename them, not to delete them entirely

User avatar
Pentarctagon
Forum Administrator
Posts: 4174
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Git branch cleanup

Post by Pentarctagon »

Why?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Tad_Carlucci
Developer
Posts: 499
Joined: April 24th, 2016, 4:18 pm

Re: Git branch cleanup

Post by Tad_Carlucci »

Renaming makes no sense to me. But, then, making a branch on the master repository rarely makes sense to me, either.

Remember, deletion just removes them from view. The commits making up the branch will still be there and findable in the reflog. So the brand can be resurrected if it should not have been deleted.
I forked real life and now I'm getting merge conflicts.

User avatar
Iris
Site Administrator
Posts: 6614
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Git branch cleanup

Post by Iris »

Tad_Carlucci wrote:
February 8th, 2020, 10:51 am
Remember, deletion just removes them from view. The commits making up the branch will still be there and findable in the reflog. So the brand can be resurrected if it should not have been deleted.
You're assuming that the commits won't be automatically cleaned up by GitHub once they're found to be orphaned, and that people are able to find the remote reflog in the first place.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
Pentarctagon
Forum Administrator
Posts: 4174
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Git branch cleanup

Post by Pentarctagon »

That's why I'm asking if they are still needed for anything. The qt branch for example hasn't been modified in over 5 years - would anything there still even be useful for someone trying a second time to use Qt in Wesnoth? Or the alep_android_port as another example; the last commit says it's an update for 1.10.7 and is also from over 5 years ago - same question as for the qt branch.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Tad_Carlucci
Developer
Posts: 499
Joined: April 24th, 2016, 4:18 pm

Re: Git branch cleanup

Post by Tad_Carlucci »

I did my research on how Git and GitHub work. There are a number of SO questions and the answer is always that the commits will not be deleted during "clean-up" they will, however, be candidates for compression. The git "gc" cleans up orphaned files, but does not delete commits simply because there is no reference pointing them from the index. The idea of Git is to maintain the history, good bad or ugly. I imagine, though, that it would be possible to delete commits on a force-push rewriting of history.

If it's really that important that we memorialize someone's incomplete, aborted project from a decade ago, I'd suggest moving them to a new repo.
I forked real life and now I'm getting merge conflicts.

User avatar
Celtic_Minstrel
Developer
Posts: 1577
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Git branch cleanup

Post by Celtic_Minstrel »

I think the ones that are linked to open PRs should generally be kept. That probably covers most of my branches, but not sure. Just from the list, I can't easily tell which branches are mine, but just off the top of my head, `lua_mapgen_stuff` should be kept, but `schema` probably isn't needed anymore (I think everything on it was actually merged?).
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

User avatar
octalot
Developer
Posts: 456
Joined: July 17th, 2010, 7:40 pm

Re: Git branch cleanup

Post by octalot »

Ah, the original list shows author-date instead of commit-date, so for the lua_mapgen_stuff it's showing the original date instead of the date that the branch was last rebased (which is a few months ago).

Edit: I think "git gc" can delete commits, contrary to Tad's comment. However these branches have been copied in to every recent fork of the repo, so they'll still exist in the other forks (and this will keep all of the referenced commits alive).

User avatar
Pentarctagon
Forum Administrator
Posts: 4174
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Git branch cleanup

Post by Pentarctagon »

octalot wrote:
February 9th, 2020, 8:46 pm
Ah, the original list shows author-date instead of commit-date, so for the lua_mapgen_stuff it's showing the original date instead of the date that the branch was last rebased (which is a few months ago).
I'll need to take a second look through these, in that case.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Post Reply