-
Notifications
You must be signed in to change notification settings - Fork 371
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
Determine if index clone can be fast-forwarded, if not re-clone #199
Comments
I'm 100% for handling this case. We should make clear though that the index is managed by I think that the sequence of steps can be slightly simplified.
|
I didn't realize we could do Do you know if there could be local changes that we need to do |
Git will of course not remove untracked local files. One exception is when there is an untracked local file with an identical path as an added file in upstream. Then, |
This sounds a bit fragile, for two reasons:
I guess we have to do something like:
WDYT? |
Oh I think my explanation was misleading. Let me give an example:
The above sequence of commands will reset branch Does that make more sense? I think this will work just perfectly. |
Not sure if I follow. How will we know the remote name as well as the "arbitrary branch" name? Is |
Yes, it's a magic string. It always resolves to the configured upstream branch of the currently active branch. |
Then I'm assuming we don't need
because the cloned repos have automatic tracking branch set? (If not, perhaps we can make them so). |
Yes. That was only for the sake of the example. The upstream should be correctly configured right after cloning. |
I just found out that |
I have an older clone of krew-index.
shows that the tracking branch is correctly set.
works, and
correctly updates when:
So we can move forward with this. 👍 (P.S. messaged you some stuff on Slack) |
/kind proposal
/priority important-soon
Once we start offering multiple indexes (#23), inevitably the plugin authors will do weird stuff like rewriting the git history (probably accidentally) and we don't want this to break
krew update
.Decision 1: Should we try to handle this case?
So I think, ahead of time, we need to implement something that does:
Decision 2 (if decision 1 is accepted): Are the steps above a sound approach to this problem?
The text was updated successfully, but these errors were encountered: