On 12/10/2017 12:36 AM, Seb wrote:

> tl;dr: I don't have a strong opinion here, but I guess there is no harm
> done in "officially" recommending -force-with-lease.

Thanks. I don't care anymore. :)

>> 2) Can you please explain the last sentence of this part:
>>
>> <quote>
>> If the pull request is for a bug fix, the commit message should have
>> the format "fix issue 1234". This enables the dlang-bot to
>> automatically pick up the issue from Bugzilla and post it as a comment
>> on the PR. If the PR is already open, then a git rebase is necessary
>> followed by a force push. During the rebase, the commit message should
>> be renamed to match the one specified.
>> </quote>
>>
>> What is "the commit message"? What is "the one specified"?
>
> The text is referring to the git commit message. I think the second part
> is trying to explain the typical scenario that you have opened a PR and
> forgot to reference a regarding issue in your git commit message.

So, the last sentence should be something like "The rebase allows you an extra opportunity to mention the Bugzilla issue if your original commit did not already mention it."?

> Though
> git commit --amend is an easier way to edit the last git commit message.
>
> The Readme here might also shed some light:
> https://github.com/dlang-bots/dlang-bot

It was helpful but not for that specific question.

> don't hesitate to ask again.

There is the following part:

<quote>
First, fork the github repository or repositories you'd like to contribute to (dmd, druntime, phobos etc) by navigating to their respective pages on github.com and clicking "Fork". Then, set up your local git repository to reflect that. For example, consider you want to contribute to phobos and have forked it. Then run these commands:

  cd ~/code/phobos
  git remote add myfork https://github.com/username/phobos.git
  git remote update
</quote>

That sequence does not work because apparently code/phobos must already be a git repo but the text does not explain where it comes from. So, I added three commands to the sequence and it seemed to work:

  mkdir -p ~/code/phobos   # <-- 1
  git init                 # <-- 2
  cd ~/code/phobos
  git remote add myfork https://github.com/<USERNAME>/phobos.git
  git remote update
  git pull myfork master   # <-- 3

Was I correct? Of course, it would be better to explain how one gains code/phobos.

I think that section should include setting up both the upstream repo and the myfork repo. I think a contributor would regularly be using both.

Ali

P.S. As I mentioned recently on this newsgroup, the general lack of information on the two repos, "upstream" and "personal fork", were the most detrimental to my understanding of git workflows. We do that in our document but I think setting up "upstream" should be a part of the command sequence above.

Reply via email to