Coder Social home page Coder Social logo

Comments (5)

ardaguclu avatar ardaguclu commented on June 21, 2024

I added a solution with respect to my proposal #833. Appending branch name with # will set the cloned repositories default branch to the given one. It worked without any problem in my tests.

from krew.

chriskim06 avatar chriskim06 commented on June 21, 2024

it seems a little strange to me to handle this with different versions of the index. homebrew handles this by allowing versioned formulae in their main tap. i dont know off the top of my head if that is already possible with krew (i forget exactly what parts of the plugin spec are used to setup the binary installed in .krew/store and the symlink in .krew/bin). there are other things in addition to having separate plugins that would be needed though, like how to link a specific version.

i think your implementation makes sense for solving this by versioning the index (as long as that clone command properly sets refs/remotes/origin/{branch} so that the git reset --hard @{upstream} is referencing the correct remote), but im not totally convinced it should be handled there instead of supporting different plugin versions.

from krew.

ardaguclu avatar ardaguclu commented on June 21, 2024

it seems a little strange to me to handle this with different versions of the index. homebrew handles this by allowing versioned formulae in their main tap. i dont know off the top of my head if that is already possible with krew (i forget exactly what parts of the plugin spec are used to setup the binary installed in .krew/store and the symlink in .krew/bin). there are other things in addition to having separate plugins that would be needed though, like how to link a specific version.

i think your implementation makes sense for solving this by versioning the index (as long as that clone command properly sets refs/remotes/origin/{branch} so that the git reset --hard @{upstream} is referencing the correct remote), but im not totally convinced it should be handled there instead of supporting different plugin versions.

@chriskim06 thanks for your comments. I had a similar discussion on Slack with @ahmetb and he also had some concerns about supporting this in terms of maintainability and narrow audience.

I'm closing my PR due to this, I'll keep issue for a while in case someone else also need this;
/close

from krew.

ardaguclu avatar ardaguclu commented on June 21, 2024

I incorrectly closed issue :). Sorry for noise.

from krew.

ardaguclu avatar ardaguclu commented on June 21, 2024

/close

from krew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.