Skip to content

git subtree push to skip nested subrepos #553

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

Open
michelemartone opened this issue Dec 2, 2021 · 1 comment
Open

git subtree push to skip nested subrepos #553

michelemartone opened this issue Dec 2, 2021 · 1 comment

Comments

@michelemartone
Copy link

Hi.
I am aware of #417 and #165 and #161 #82 and this ... is yet another query regarding 'nested subrepos' support :-)
Specifically, if both "bar" and "baz" in "bar/baz" are subrepos, then "git-subrepo push bar" pushes "baz" as well into the "bar" upstream.
Maybe it would make sense for "git-subrepo push" to skip directories containing ".gitrepo" (at least optionally)?

Background of this is to allow "git-subrepo" setups where one would lay subrepos according to the most natural order required by the packages, yet avoiding "excessive" pushes as described above.

michelemartone added a commit to michelemartone/git-subrepo that referenced this issue Dec 2, 2021
Assuming "bar" and "baz" in "bar/baz" are both subrepos, make
 "git-subrepo push bar" to skip "baz" -- for that, one would use
 "git-subrepo push bar/baz" instead.

See also test/push-nested.t.
@michelemartone
Copy link
Author

michelemartone commented Dec 2, 2021

I've put together a patch (#554) for push to skip nested subrepos, with (passing) test.
I omitted updating the documentation though; probably having this functionality as an option would be the best thing.

mahmoudimus added a commit to mahmoudimus/git-subrepo that referenced this issue Mar 16, 2022
* Add test for current style push of nested subrepo

Assuming both bar/ and bar/baz/ have been created with 'git-subrepo clone',
a 'git-subrepo push bar' takes contents of bar/baz/* as well, as if
bar/baz/ were not another subrepo.
This test confirms this current style.

* One may consider adding nested subrepos a bug

With such expectation, git-subrepo would fail the test.

* Fix ingydotnet#553

Assuming "bar" and "baz" in "bar/baz" are both subrepos, make
 "git-subrepo push bar" to skip "baz" -- for that, one would use
 "git-subrepo push bar/baz" instead.

See also test/push-nested.t.

Co-authored-by: Michele Martone <[email protected]>
doak pushed a commit to doak/git-subrepo that referenced this issue Dec 19, 2023
* Add test for current style push of nested subrepo

Assuming both bar/ and bar/baz/ have been created with 'git-subrepo clone',
a 'git-subrepo push bar' takes contents of bar/baz/* as well, as if
bar/baz/ were not another subrepo.
This test confirms this current style.

* One may consider adding nested subrepos a bug

With such expectation, git-subrepo would fail the test.

* Fix ingydotnet#553

Assuming "bar" and "baz" in "bar/baz" are both subrepos, make
 "git-subrepo push bar" to skip "baz" -- for that, one would use
 "git-subrepo push bar/baz" instead.

See also test/push-nested.t.

Co-authored-by: Michele Martone <[email protected]>
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

No branches or pull requests

1 participant