Skip to content

If an empty group is the default group, then treat it as empty on purpose - #504

Open
paulhovey wants to merge 4 commits into
jacebrowning:mainfrom
paulhovey:phovey/empty-group
Open

paulhovey wants to merge 4 commits into
jacebrowning:mainfrom
paulhovey:phovey/empty-group

Conversation

@paulhovey

Copy link
Copy Markdown

This is continuing the discussion from #480 (comment) . Essentially, I was looking for a way to treat gitman slightly less of a default package manager, and a little more of a selective "please clone these repos recursively but not this one". Groups were selected which was a good idea in theory, but for a subrepo with a gitman.yml that we only wanted the top level of this solution fell short because gitman was treating an empty default group (even one defined, but defined with no members) as being empty, and cloning all repos/groups.

I explicitly left the current case of default_group: '' or default_group being undefined as defaulting to the current behavior of cloning everything, you have to explicitly define an empty group to get the behavior of not cloning any repos:

default_group:  empty
groups:
  - name: empty
    members:  null

@jacebrowning
jacebrowning self-requested a review September 24, 2026 12:57
@jacebrowning

Copy link
Copy Markdown
Owner

This looks reasonable but I'll get back to this when the tests pass on Windows.

@jacebrowning
jacebrowning marked this pull request as draft October 1, 2026 21:52
@paulhovey

Copy link
Copy Markdown
Author

This looks reasonable but I'll get back to this when the tests pass on Windows.

I fixed the Windows tests (it seemed to be a teardown issue, not an implementation issue) but was actually able to simplify the logic quite a bit and use the existing tests to prove it out, so the diff against main should be much smaller now 🙂

@jacebrowning
jacebrowning marked this pull request as ready for review October 3, 2026 19:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants