-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
branches/tags/commit hashes support #189
branches/tags/commit hashes support #189
Conversation
alternate install name can be specified now in name_specs string function vundle#config#require() can now accept both list and dict
Update git commands for bundle install and upgrade for better git tree-ish support
The current implemention requrired the rest args is in a dictionary, you patch broke that, maybe it is convenient to just add a string after the uri, but that would break other possiblilty of extension. Maybe this is a good way:
And then pass all the rev (does not matter if it is branch name, tag name or just a commit hash) to
The script will be installed at What do you think about? |
it breaks nothing. Bundle 'vendor/bundlename', {'tree-ish':'feature/branch-name','dir':'plugin-bundlename'} exactly the same as Bundle 'vendor/bundlename', 'feature/branch-name', {'dir':'plugin-bundlename'} As for your suggestion i don't see any point in that. There is no need to distinguish bundle types. If several different bundles from different repos have one name you can specify alternate install names (in my PR, not in original vundle). |
This PR will not be accepted though. |
@Xerkus why not? |
@Xerkus thanks for the PR. My proposal on specifying revision/sha1 looks like this:
There's a PS: Sorry for late update |
@gmarik what is wrong with separate parameter? Your suggestion can be implemented as alternate syntax though |
@Xerkus for simplicity reasons, i think keeping convention Also Having revision/version as part of name is the simplest way possible to specify revision i think. |
@gmarik I like this one And I really don't like |
i can't say i like that much name and tree-ish in single parameter Bundle 'Xerkus/vundle feature/refactor-git-treeish-support'
Bundle '[email protected]:Xerkus/vundle.git@feature/refactor-git-treeish-support'
Bundle '[email protected]:Xerkus/vundle.git feature/refactor-git-treeish-support' It feels a bit messy. Bundle 'Xerkus/vundle', {'v': 'feature/refactor-git-treeish-support'} vs Bundle 'Xerkus/vundle', 'feature/refactor-git-treeish-support', {'v': 'master'} And actual usage example: @gmarik public api is not that important in this PR though, can you comment on code changes? UPD: Bundle 'Xerkus/vundle @feature/refactor-git-treeish-support'
Bundle '[email protected]:Xerkus/vundle.git @feature/refactor-git-treeish-support' I'd prefer to keep 'repo', 'tree-ish' as one of the alternatives though |
I believe the following syntax/format is gonna allow backwards compatibility, and it's clear on what it does: For a specific branch, with a specific commit: Bundle 'vendor/reponame/branchname@SHA' Without branch: Bundle 'vendor/reponame@SHA' Normal: Bundle 'vendor/reponame' It is uncluttered, clean, and it's backwards compatible. |
I'm with @Xerkus in that the branch/commit as part of the main spec is not better than having it as an option. The way I see it is: The spec is what we clone. The options change the where, the how, and what we do with it afterwards, including checking something out. |
Ah, I didn't realize the
@jdevera I do see your point, and it does make sense, I normally see with the same point of view. If we do go with that approach, I would suggest the following format then. With a specific branch: Bundle 'vendor/reponame', {'b':'branchname'} And if we want to specify a SHA: Bundle 'vendor/reponame', {'s':'sha'} Of course, this would change to a valid VimL syntax. Just want to point out, I have no preference, so it's all on you guys. Although I do think the first method is cleaner and more elegant. |
I'd prefer if, in either case, we didn't distinguish between tree-ish representations. There's no need for a different syntax for branches and sha IDs. We should be able to accept anything you can |
@Peeja Right, but this is more of a power use really, so that we can stick with a certain version of a software for example, or only accept commits from a certain branch, stuff like that. It's just an extra thing, that's very nice to have. :) |
I'm saying that, since we're going to just send that string to |
So, you're saying to not specify a branch and sha at the same time? I'm not clear on what you're saying. ❓ |
@greduan, @Peeja's point is that it's unnecessary complexity to add two parameter names (s and b in your example) when, what we would do with either is just call |
I think I understand now, thanks @jdevera. Well, what would be a nice method to tell Vundle what branch to get? The extra parameters are really there just for download, after that they're not necessary. So what would be a good method to tell Vundle what SHA or branch to get? |
👍 |
Why not copy from Bundler and use this syntax (loosely translated): Bundle 'vendor/reponame', {'ref':'1a2b3c'}
Bundle 'vendor/reponame', {'branch':'experimental'}
Bundle 'vendor/reponame', {'tag':'v2.0'} This should cover all cases. See how Bundler handles it: http://gembundler.com/v1.3/git.html |
I like the idea of being consistent with Bundler's syntax. Astute readers will notice that my support of that syntax contradicts what I said above about only needing one key name for all three. I was going to say that Bundler treats all three as synonyms, and that it's worth doing the same for the same reason Bundler does it (because it reads sensibly) and to be consistent with Bundler, which most people are familiar with. It turns out that Bundler treats |
Is something like that in the roadmap for the main repo? |
:bump: |
What is the status of this? I really would love to see this in vundle 😭 |
This PR is 2 years old. If you want to help implementing such feature for VAM we'll merge into master in no time. vam#vcs#GitCheckoutFixDepth needs to be changed: If a version / hash /tag is passed as key in repository then no shallow clone should take place (or which depths to use !??). Then a second git checkout command or such could be followed? Or can you pull targeting tags? |
I'm looking at implementing this and it is updates that are the trickiest. The command used in this PR, for example:
Does not work as intended. The We'd have to fetch, then checkout the branch and do a merge --ff-only. But that means we need special treatment for branches. I think I'll close this PR and start a new one-and-only issue for this. Stay tuned. |
I have added support for git tree-ish. Branch, tag or commit can be specified now.
Also i've added alias support in case there are compatible bundles with same name by different vendors
and local flag to prevent vundle from managing bundle installs and updates, but still registering it's resources. Useful for developers.
new Bundle format is backwards compatible and can be described by
Related issue: #35