[llvm-dev] Workflow to commit changes using git alone (?)

Joan Lluch via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 10 14:58:44 PST 2019


Hi Mehdi,

> On 10 Nov 2019, at 20:27, Mehdi AMINI <joker.eph at gmail.com> wrote:
> 
> No: the arcanist command does not suffer from the problem I was raising.
> The issue I was referring to is that your reset command will lead to *undoing* changes from master (unrelated to your branch) when you commit in the end (all the changes that are in master but not in "patchbranch").
> (just try to add `git checkout master && git pull && git checkout tmp` before your `git reset `, and then look at the resulting commit).
>  

But I would never do that!. The commands "git checkout master && git pull” are only run before the whole procedure, never in the middle. And the patchbranch is always merged with master before starting the procedure. The Phabricator diff is created by comparing both branches after they have merged, and the point of reseting ’tmp' to ‘master’ is to obtain a fresh commit containing exactly the same diff.

In any case, I would want to understand why the archaist command does not suffer from an “evolving” master, which is the problem that you raised first. The “arc patch” command creates a new branch from the local master, so the remote repo can still have changed even before the actual command is completed (!) or at any time after that. So what makes executing that command different?, or maybe I should ask, what is the archaist command actually doing in terms of plain git commands? 

Thanks 

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191110/900d7116/attachment-0001.html>


More information about the llvm-dev mailing list