Git branch cleanup

Discussion among members of the development team.

Moderator: Forum Moderators

User avatar
Pentarctagon
Project Manager
Posts: 5526
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
Inactive Developer
Posts: 503
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: 1432
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
Project Manager
Posts: 5526
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
Inactive 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
Project Manager
Posts: 5526
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
Inactive Developer
Posts: 503
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: 6797
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
Project Manager
Posts: 5526
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
Inactive Developer
Posts: 503
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: 2166
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.
Former maintainer of Steelhive.
User avatar
octalot
General Code Maintainer
Posts: 782
Joined: July 17th, 2010, 7:40 pm
Location: Austria

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
Project Manager
Posts: 5526
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
User avatar
Pentarctagon
Project Manager
Posts: 5526
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Git branch cleanup

Post by Pentarctagon »

Alright, so an updated (and split) list. Branches that I think are easily too old to be useful, or in schema's case don't contain any commits that master doesn't already have anymore:

Code: Select all

gp2x                          - Latest commit 8c4e221 on Jun 22, 2008 - last modification 2008-06-22 - 193  commits ahead, 63178 commits behind master
new_addon_server              - Latest commit d91580b on Oct 16, 2010 - last modification 2010-10-16 - 16   commits ahead, 33443 commits behind master
1.4-lint                      - Latest commit ee2419b on Jul 21, 2013 - last modification 2013-07-21 - 881  commits ahead, 53281 commits behind master
asio_umcd                     - Latest commit f974890 on Oct 4, 2013  - last modification 2013-10-04 - 362  commits ahead, 23425 commits behind master
alep_android_port             - Latest commit 2662091 on Jun 12, 2014 - last modification 2014-06-12 - 586  commits ahead, 27684 commits behind master
spritesheet                   - Latest commit 7c8fd2f on Jun 27, 2014 - last modification 2014-06-27 - 11   commits ahead, 19822 commits behind master
qt                            - Latest commit 0d2b13f on Dec 15, 2014 - last modification 2014-12-16 - 35   commits ahead, 16947 commits behind master
schema                        - Latest commit f13bd92 on Nov 4, 2018  - last modification 2018-11-04 - 0    commits ahead, 3081  commits behind master
And then everything more recent which I need an answer for:

Code: Select all

renderpath_redo_new           - Latest commit 48bcb27 on Mar 19, 2016 - last modification 2016-10-26 - 1    commit  ahead, 9539  commits behind master - Vultraz
ping_test_disconnect_detect   - Latest commit b325708 on Jan 29, 2017 - last modification 2017-01-30 - 1    commit  ahead, 8782  commits behind master - Coffee
tod_manager_handling_refactor - Latest commit 29d9cf2 on Apr 19, 2017 - last modification 2017-04-20 - 1    commit  ahead, 7916  commits behind master - Vultraz
display_context_proxy         - Latest commit a2d6b9c on Apr 28, 2017 - last modification 2017-04-28 - 1    commit  ahead, 7802  commits behind master - Vultraz
preprocessor_cleanup          - Latest commit 3a44f58 on Aug 29, 2017 - last modification 2017-09-04 - 1    commit  ahead, 6632  commits behind master - Vultraz
unit-types-table              - Latest commit d8ae1dc on Jan 28, 2018 - last modification 2018-01-28 - 6    commits ahead, 5586  commits behind master - jyrkive
---

edit-
So, branches to keep:

Code: Select all

wesnoth-gl                    - Latest commit b6aa0f5 on Jan 14, 2007 - last modification 2007-01-14 - 15   commits ahead, 62400 commits behind master
ogl                           - Latest commit a05b7fc on Nov 19, 2010 - last modification 2010-11-19 - 45   commits ahead, 33275 commits behind master
oob_cancel                    - Latest commit 621b474 on Dec 1, 2017  - last modification 2017-12-02 - 2    commits ahead, 5792  commits behind master - loonycyborg
gui2_floating_textbox         - Latest commit 185fca8 on Sep 18, 2016 - last modification 2016-09-18 - 3    commits ahead, 10277 commits behind master - CelticMinstrel
color_range_deprecate         - Latest commit 7717775 on May 2, 2018  - last modification 2018-05-03 - 799  commits ahead, 4861  commits behind master - CelticMinstrel (pending check if still needed)
wfl_updates                   - Latest commit 2d07f3e on Jun 16, 2018 - last modification 2018-06-16 - 983  commits ahead, 4861  commits behind master - CelticMinstrel
customize_objectives          - Latest commit e150693 on Aug 4, 2018  - last modification 2018-08-04 - 1622 commits ahead, 4861  commits behind master - CelticMinstrel
wml_error_recovery            - Latest commit d0c9bf9 on Jun 10, 2018 - last modification 2018-10-23 - 1    commit  ahead, 3216  commits behind master - CelticMinstrel
gui2_help                     - Latest commit 713cbca on Apr 3, 2018  - last modification 2018-10-23 - 45   commits ahead, 3216  commits behind master - Vultraz/CelticMinstrel
move_units_to_core            - Latest commit f3f34ad on Jul 29, 2018 - last modification 2018-10-23 - 9    commits ahead, 3216  commits behind master - CelticMinstrel
rel_paths                     - Latest commit a1b5890 on May 7, 2017  - last modification 2018-10-23 - 6    commits ahead, 3216  commits behind master - CelticMinstrel
fix_3647                      - Latest commit a93674c on Oct 28, 2018 - last modification 2018-10-28 - 1    commit  ahead, 3180  commits behind master - CelticMinstrel
lua_reorg                     - Latest commit 1e1cf6d on Mar 24, 2018 - last modification 2018-11-11 - 7    commits ahead, 2842  commits behind master - CelticMinstrel
branches to delete:

Code: Select all

gp2x                          - Latest commit 8c4e221 on Jun 22, 2008 - last modification 2008-06-22 - 193  commits ahead, 63178 commits behind master
new_addon_server              - Latest commit d91580b on Oct 16, 2010 - last modification 2010-10-16 - 16   commits ahead, 33443 commits behind master
1.4-lint                      - Latest commit ee2419b on Jul 21, 2013 - last modification 2013-07-21 - 881  commits ahead, 53281 commits behind master
asio_umcd                     - Latest commit f974890 on Oct 4, 2013  - last modification 2013-10-04 - 362  commits ahead, 23425 commits behind master
alep_android_port             - Latest commit 2662091 on Jun 12, 2014 - last modification 2014-06-12 - 586  commits ahead, 27684 commits behind master
spritesheet                   - Latest commit 7c8fd2f on Jun 27, 2014 - last modification 2014-06-27 - 11   commits ahead, 19822 commits behind master
qt                            - Latest commit 0d2b13f on Dec 15, 2014 - last modification 2014-12-16 - 35   commits ahead, 16947 commits behind master
schema                        - Latest commit f13bd92 on Nov 4, 2018  - last modification 2018-11-04 - 0    commits ahead, 3081  commits behind master
make_tag                      - Latest commit 035b3d9 on Feb 12, 2017 - last modification 2017-02-13 - 1    commit  ahead, 8727  commits behind master - gfgtdf
frame_cleanup                 - Latest commit 47c6cbe on Apr 15, 2017 - last modification 2017-04-15 - 2    commits ahead, 8033  commits behind master - CelticMinstrel
lua_stuff                     - Latest commit 1f2d131 on Mar 17, 2018 - last modification 2018-03-17 - 11   commits ahead, 4903  commits behind master - CelticMinstrel
discord_rp                    - Latest commit d794fc4 on Feb 1, 2018  - last modification 2018-02-02 - 2    commits ahead, 5541  commits behind master - Vultraz
tidyup_blitting               - Latest commit c9d5bf5 on Nov 4, 2016  - last modification 2016-11-04 - 2    commits ahead, 9541  commits behind master - Aginor
simple_wml_double_quotes      - Latest commit f144a15 on Sep 20, 2018 - last modification 2018-09-20 - 1504 commits ahead, 4861  commits behind master - jyrkive
update_check                  - Latest commit 7796799 on Aug 15, 2018 - last modification 2018-08-18 - 1314 commits ahead, 4861  commits behind master - hrubymar
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
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Git branch cleanup

Post by Celtic_Minstrel »

  • gui2_floating_textbox - Pretty sure I have this on my hard drive still; might be useful in the future as a reference for implementing more modeless dialogs once the event system is fixed, but right now it's 1000% stalled. I'd say tentatively keep it, but it wouldn't hurt that much if you deleted it.
  • frame_cleanup - I don't even remember what this is… but looking at the commits it seems to be just a refactor of the animation frames system. I probably still have it on my hard drive too. I'd say delete it.
  • lua_stuff - I don't remember what this is either, but it looks like stuff that might've been merged? Is there an easy way to tell?
  • color_range_deprecate - Looks like this is something that should be merged if it wasn't already, unless some alternate deprecation message was added for the relevant syntax.
  • wfl_updates - Unsure. The HEAD commit looks like it (or some variation on it) has already been merged, while the other commit just below it seems like something that's technically a good idea but would break compatibility…
  • customize_objectives - Looks like an experiment, possibly with an associated PR? I'd keep it around for now.
  • wml_error_recovery - Another experiment that might have an associated PR. Not sure if it's worth keeping around.
  • gui2_help - Though this branch is broken at the moment, I think it's important to keep.
  • move_units_to_core - I'd consider this to be in progress. It also has an open PR associated with it. Please keep.
  • rel_paths - Again, this is in progress with an open PR. I'd prefer to keep it, though it'll probably be very different once I get back to it, so up to you I guess.
  • fix_2647 - Another experiment. I think the spirit of this commit is absolutely important, but I can't speak for whether this was the best way to do it.
  • lua_reorg - Totally in progress right now. Not sure whether it has an open PR currently, but it's also the branch I'm most likely to come back to soonest.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply