[llvm-dev] Committing with git

Robinson, Paul via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 28 16:32:48 PDT 2019

No, this is exactly right, due to the nature of git you must be fully up-to-date with the entire branch before pushing.  And because the volume of patches in the project is so high, you would need to keep mid-Pacific working hours to get decent intervals of time between commits.

I brought this up before the move, and nobody seemed to think it would be a big deal.  Really it means you need to trust the bots more, and understand that it’s no scandal if you break something.  Revert, catch up, try again.  Unless/until we get “real” pull requests as the project workflow, it’s necessarily how we have to work.

From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Philip Reames via llvm-dev
Sent: Monday, October 28, 2019 7:24 PM
To: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>; llvm-dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] Committing with git

I've noticed the same.  The net effect for me is that I add a "git pull --rebase && git diff" immediately before the commit and push.  It makes me a tad nervous for exactly the reason you mention, but I don't know of a better option.  Anyone else?

On 10/28/19 4:18 PM, Nemanja Ivanovic via llvm-dev wrote:
Now that we have switched to git and I had to leave behind my wonderfully simple svn workflow I have noticed something curious when committing.

My typical workflow once my patch is approved on Phabricator has always been:
- Update my source tree to latest
- Apply the approved patch
- Rebuild
- Retest
- If all is well, commit

Having to update again after rebuilding/retesting was extremely rare since SVN only prevented the commit if I am modifying the same file(s) that have been modified upstream since my update.

So I tried replicating that workflow with git, but apparently that isn't really an option. Apparently git won't let me push if there have been any commits upstream at all between my last pull and my push. This means that I can never push from a fully tested state since it is almost impossible to find a window of 20-30 minutes without any commits (which is how long a rebuild/retest takes for me).

One might argue that this is no worse than what I had with SVN since I would commit on top of changes that already happened upstream. But this is not always the case. Namely, if an upstream commit modifies the same file, causing a semantic conflict, I would not end up committing with the old svn workflow whereas I would end up committing with the new git workflow.

I am not sure if this is something that can be solved (nor if it is something that needs to be solved) but I thought I would just bring it up.


LLVM Developers mailing list

llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191028/7a3e72f1/attachment-0001.html>

More information about the llvm-dev mailing list