Skip to content
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

Add option to clean submodules #11054

Closed
samwebster opened this issue Jun 17, 2023 · 10 comments · Fixed by #11101
Closed

Add option to clean submodules #11054

samwebster opened this issue Jun 17, 2023 · 10 comments · Fixed by #11101
Labels
🤓 good first issue type: feature request up-for-grabs Easy tasks for those looking to get involved. Refer to https://up-for-grabs.net/

Comments

@samwebster
Copy link

samwebster commented Jun 17, 2023

Feature description

It would be very handy if you could clean (not reset) all submodules (recursively) from git extensions. It's just one more tick box on the Commands->Clean working directory (or two if you want to control whether it is recursive or not). I think the relevant script is git submodule foreach --recursive git clean -xfd

Environment

All
clean

@RussKie
Copy link
Member

RussKie commented Jun 17, 2023 via email

@samwebster
Copy link
Author

This isn't about reset but clean. It's just one more tick box on the Commands->Clean working directory (or two if you want to control whether it is recursive or not)

@RussKie
Copy link
Member

RussKie commented Jun 18, 2023

That's the context that was missing from your origin post. Please update the post providing the full context of what you think is missing from the app. Screenshots can be helpful too.

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Jun 18, 2023
@samwebster
Copy link
Author

@RussKie Done. Thanks

@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Jun 19, 2023
@RussKie
Copy link
Member

RussKie commented Jun 19, 2023

Thank you.

Setting up for grabs. Pull requests are welcome.

@RussKie RussKie added up-for-grabs Easy tasks for those looking to get involved. Refer to https://up-for-grabs.net/ 🤓 good first issue labels Jun 19, 2023
@NatRavenhill
Copy link
Contributor

I have been having a look at this, and have a question. Would the cleaning of submodules take place after the initial clean command, when the Cleanup button is pressed?

@vbjay
Copy link
Contributor

vbjay commented Jul 6, 2023

Yes and it would be a simple git submodule foreach --recursive git clean <args>. With args passed in like original clean args and recursive being optional. It is not hard to add a script that does this.

What about exclusions like all but x submodule? This is where a script in the repo folder that does the work for master repo and the subs with but I don't want x repo because... is handled.

@RussKie
Copy link
Member

RussKie commented Jul 7, 2023

Yes and it would be a simple git submodule foreach --recursive git clean <args>. With args passed in like original clean args and recursive being optional. It is not hard to add a script that does this.

What about exclusions like all but x submodule? This is where a script in the repo folder that does the work for master repo and the subs with but I don't want x repo because... is handled.

I think for the purpose of this dialog executing git submodule foreach --recursive git clean <args> should suffice. Anything more advanced could/should be handled by users themselves.

Personally, I've never used this dialog, typing git clean -xdf [-e <path>] is much faster for me.

NatRavenhill added a commit to NatRavenhill/gitextensions that referenced this issue Jul 13, 2023
@ghost ghost added the 🚧 status: in progress Issues which have associated PRs label Jul 13, 2023
@NatRavenhill
Copy link
Contributor

I've had a go at implementing this - never worked on the repo before, so any feedback would be awesome! 🙂

@RussKie
Copy link
Member

RussKie commented Jul 15, 2023 via email

@ghost ghost removed the 🚧 status: in progress Issues which have associated PRs label Jul 22, 2023
RussKie pushed a commit that referenced this issue Jul 22, 2023
* Sign contributors.txt

* #11054 Add option to clean submodules

* Update translations

* Add Clean Submodules behaviour to Preview

* Remove unused import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤓 good first issue type: feature request up-for-grabs Easy tasks for those looking to get involved. Refer to https://up-for-grabs.net/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants