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

[git] Git subtree install option #1144

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

tsuga
Copy link

@tsuga tsuga commented Oct 7, 2024

This PR enhances the existing git feature to install git/contrib/subtree by specifying to do so in the options.

    "options": {
        "version": {
            "type": "string",
            "proposals": [
                "latest",
                "system",
                "os-provided"
            ],
            "default": "os-provided",
            "description": "Select or enter a Git version."
        },
        "ppa": {
            "type": "boolean",
            "default": true,
            "description": "Install from PPA if available (only supported for Ubuntu distributions)"
        },
        "installSubtree": {
            "type": "boolean",
            "default": false,
            "description": "Install git/contrib/subtree"
        }
    },

@tsuga tsuga requested a review from a team as a code owner October 7, 2024 16:27
@tsuga
Copy link
Author

tsuga commented Oct 7, 2024

@microsoft-github-policy-service agree

@tsuga tsuga mentioned this pull request Oct 8, 2024
@samruddhikhandale
Copy link
Member

Hi @tsuga 👋

Thank you for taking the time to contribute this PR. Can you help me understand how you utilize git/contrib/subtree and how impactful this change will be for the community?

I understand that the git-subtree command is an alternative to git-submodule for managing project dependencies. However, we'd like more feedback before we add this feature option. Hope that makes sense to you. Thanks!

// cc @bamurtaugh

@samruddhikhandale samruddhikhandale added the gathering-community-feedback This issue is on hold while we gather input, votes, and feedback from the community. label Oct 8, 2024
@tsuga
Copy link
Author

tsuga commented Oct 10, 2024

Hi @samruddhikhandale
There are various pros and cons over subtree vs submodule.
You may find good explanation on the Internet.

@Karmaibringkaosanddrama

This PR enhances the existing git feature to install git/contrib/subtree by specifying to do so in the options.

    "options": {
        "version": {
            "type": "string",
            "proposals": [
                "latest",
                "system",
                "os-provided"
            ],
            "default": "os-provided",
            "description": "Select or enter a Git version."
        },
        "ppa": {
            "type": "boolean",
            "default": true,
            "description": "Install from PPA if available (only supported for Ubuntu distributions)"
        },
        "installSubtree": {
            "type": "boolean",
            "default": false,
            "description": "Install git/contrib/subtree"
        }
    },

@

@Kaniska244
Copy link

Hello @tsuga ,

Thank you for the PR. Would you kindly add some tests to verify the git subtree feature when opted in by the user using the flag. A simple "git --version" like command isn't available for git subtree as I can see.

With Regards,
Kaniska

@tsuga
Copy link
Author

tsuga commented Jan 11, 2025

@Kaniska244 Thank you for your attention to this PR!
Indeed, git subtree --version does not exist. However, if subtree is installed, git subtree --help should return the help text. If not installed, git subtree --help will raise an error git: 'subtree' is not a git command.

Do you think git subtree --help is enough? If you can agree, I will add the line as a test.

@Kaniska244
Copy link

Kaniska244 commented Jan 12, 2025

@Kaniska244 Thank you for your attention to this PR! Indeed, git subtree --version does not exist. However, if subtree is installed, git subtree --help should return the help text. If not installed, git subtree --help will raise an error git: 'subtree' is not a git command.

Do you think git subtree --help is enough? If you can agree, I will add the line as a test.

Hello @tsuga ,

Thank you for the response. Sure if git subtree -h or git subtree --help works, it could be used in the test scripts. Kindly proceed with the change & let us check further.

With Regards,
Kaniska

@Kaniska244 Kaniska244 closed this Jan 12, 2025
@Kaniska244 Kaniska244 reopened this Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gathering-community-feedback This issue is on hold while we gather input, votes, and feedback from the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants