[ipxe-devel] Patch tracking

Robin Smidsrød robin at smidsrod.no
Tue Mar 5 21:43:05 UTC 2013


On 05.03.2013 18:56, Michael Brown wrote:
> On 05/03/13 16:02, Robin Smidsrød wrote:
>> That would also make it possible for anyone that follows the
>> mailing-list to help out by creating a pull request when someone sends a
>> patch directly to the mailing-list so it's easier to get into its own
>> branch (which also helps to distribute the load of finding unapplied
>> patches floating around).
>>
>> What do you think?
> 
> Happy to try anything that makes it easier to keep track of patches, as
> long as it allows me to do everything I normally do when merging:
> 
> - reformat code (usually whitespace issues, sometimes more substantial
> changes)
> 
> - reword commit messages for consistency
> 
> - linearise history (i.e. git rebase)
> 
> Given that it's very rare for me to merge something completely
> unmodified, one very important feature would be the ability to trivially
> delete branches/pull requests/etc once they had been merged, preferably
> without using a web interface.  (It's possible to use "git push" to
> delete a remote branch; maybe that would be sufficient?)
> 
> Would you like to try setting something up, and importing the various
> outstanding patches from the mailing list?

Basically you should be able to add this to your .git/config:

[remote "github"]
	url = git://github.com/ipxe/ipxe.git
	fetch = +refs/pull/*/head:refs/remotes/github/pr/*
	fetch = +refs/heads/*:refs/remotes/github/*

If you change the URL to git at github.com/ipxe/ipxe.git and you have setup
your SSH key properly with GitHub you should technically be able to do
"git push github :pr/X" (because you should have write access).

Since I don't have write access I can't confirm the impact of said
change. It's important that the fetch line with "refs/pull/*/head" comes
before "refs/heads/*", or else git fetch --all -p would just delete the
local PR refs during pruning.

You might also find this particular comment useful depending on your
workflow: https://gist.github.com/piscisaureus/3342247/#comment-608797

If you do this today, there are 7 pull requests listed, and 1-5 are
already closed and 6 is open (mouse's ipv6 work). PR 7 is a one-line
edit I did inside GitHub's web interface just as a test. I'm not sure
what would happen to those if you try to remove one of the remote
branches, but I guess it doesn't hurt to try. If purposely tried to use
the wrong kind of space formatting on PR 7 so you can try it out and see
what happens. I also made two commits that should probably be smashed
together, which is a good opportunity to see what happens if you do a
rebase and push it back.

I would also suggest that you change the "ipxe" github user into an
organization, and add your own personal user to that organization as
owner. That should make it possible for more than one user to do
administrative work on the organization, like open/closing pull
requests, closing/opening issues in the issue tracker etc. You could
invite someone else in the community you trust to help out with that
kind of activites. Triaging bugs is always a useful activity to delegate.

-- Robin




More information about the ipxe-devel mailing list