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

hack: fix cherrypick instruction #11152

Merged
merged 1 commit into from
Sep 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hack/patch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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
Copy link
Contributor

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'?

Copy link
Member Author

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!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jingyih yrw, thank you!

export FORK_REMOTE=origin
export GITHUB_USER=${github-username}
```

Expand Down