[LLVMdev] Howdy + GIT

Mehdi Amini mehdi.amini at apple.com
Fri Jan 16 19:01:07 PST 2015


> On Jan 16, 2015, at 6:31 PM, Tim Northover <t.p.northover at gmail.com> wrote:
> 
>> Even though git could be used in the same way as svn, why migrate just to
>> re-create the current workflow? Doesn't make too much sense to me. A
>> migration to git would have to include some other benefit, not just be
>> change for the sake of it.
> 
> I think our routine workflow suffers quite a bit from the svn
> emphasis. Sending text patches is all very well from a portability
> point, but it makes applying someone else's commits rather annoying
> (particularly for commit, but even for testing):
> 
> 1. Download the patch.
> 2. Remember where you put it (~/Downloads, ~, ~/Documents -- depends
> on exactly what program downloaded it) and what the name of the file
> was.
> 3. Either look or randomly guess what -pN you need to apply it.
> 4. Check things.
> 5. Open the blasted file again to recover the commit message
> (frequently weirdly indented because that's what "git show" produces).
> Or make one up.
> 6. Commit with that via copy/paste.
> 7. Hope you didn't forget to "git/svn add" the new test before committing.
> 
> This is all you can do in svn (as far as I'm aware), but it's
> something git has solutions for. Some unified "git fetch" available
> for this would be very useful for example, even if we do decide a
> world without monotonic numbers is too scary for us.


Most of this is solved by importing the patch with git am. But it works only if the patch was generated from git format-patch.
If you want to save also the “download and find the patch file”, any review coming from Phabricator can be committed in a single command, for example:

$ arc patch D7003


Mehdi





More information about the llvm-dev mailing list