<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:windowtext">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="color:windowtext">From:</span></b><span style="color:windowtext"> llvm-dev <llvm-dev-bounces@lists.llvm.org>
<b>On Behalf Of </b>Philip Reames via llvm-dev<br>
<b>Sent:</b> Monday, October 28, 2019 7:24 PM<br>
<b>To:</b> Nemanja Ivanovic <nemanja.i.ibm@gmail.com>; llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [llvm-dev] Committing with git<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>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?<o:p></o:p></p>
<p>Philip<o:p></o:p></p>
<div>
<p class="MsoNormal">On 10/28/19 4:18 PM, Nemanja Ivanovic via llvm-dev wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">My typical workflow once my patch is approved on Phabricator has always been:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Update my source tree to latest<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Apply the approved patch<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Rebuild<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Retest<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- If all is well, commit<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>LLVM Developers mailing list<o:p></o:p></pre>
<pre><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><o:p></o:p></pre>
<pre><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></pre>
</blockquote>
</div>
</div>
</body>
</html>