-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
hack: fix cherrypick instruction #11152
Conversation
Remotes is not a valid git command. Also, set the environmental variable correctly.
@@ -7,14 +7,14 @@ Handles cherry-picks of PR(s) from etcd master to a stable etcd release branch a | |||
Set the `UPSTREAM_REMOTE` and `FORK_REMOTE` environment variables. | |||
`UPSTREAM_REMOTE` should be set to git remote name of `github.com/etcd-io/etcd`, | |||
and `FORK_REMOTE` should be set to the git remote name of the forked etcd | |||
repo (`github.com/${github-username}/etcd`). Use `git remotes -v` to | |||
repo (`github.com/${github-username}/etcd`). Use `git remote -v` to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
look up the git remote names. If etcd has not been forked, create | ||
one on github.com and register it locally with `git remote add ...`. | ||
|
||
|
||
``` | ||
export UPSTREAM_REMOTE=origin | ||
export FORK_REMOTE=${github-username} | ||
export UPSTREAM_REMOTE=upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If user run git clone https://github.com/etcd-io/etcd.git
which is instructed in our doc https://github.com/etcd-io/etcd/blob/master/Documentation/dl_build.md#build-the-latest-version, then 'origin is the upstream'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingyih thanks, and that's a good question. So yes, when you run the git clone that way, it will set origin
to https://github.com/etcd-io/etcd.git
. However, the cherrypick script is for the etcd developers/contributors, where one would fork it first and clone it so in that case origin is the forked repo. The https://github.com/etcd-io/etcd.git
should be added using git remove add
as we commonly do which is the upstream. That's how the script also documents it, https://github.com/spzala/etcd/blob/master/hack/patch/cherrypick.sh#L21 Also that's how
README says https://github.com/spzala/etcd/tree/master/hack/patch#setup I understand that you are just making sure that it's not confusing to the users of the script, hope the couple of links I mentioned above makes it clear for users? If you think it's still not clear, I am fine with modifying the doc a little more per what I have explained here. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingyih yrw, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
look up the git remote names. If etcd has not been forked, create | ||
one on github.com and register it locally with `git remote add ...`. | ||
|
||
|
||
``` | ||
export UPSTREAM_REMOTE=origin | ||
export FORK_REMOTE=${github-username} | ||
export UPSTREAM_REMOTE=upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks!
remotes
is not a valid git command. Also, set the environmental variablecorrectly.