This is an archive of the discontinued LLVM Phabricator instance.

[arcconfig] Default base to previous revision
ClosedPublic

Authored by smeenai on Feb 21 2020, 3:21 PM.

Details

Summary

When you run arc diff, arc defaults to uploading all the changes you
have against the upstream branch into a single patch. This is almost
never what you want for stacked commits (patch series); you only want to
submit the changes done by the current patch. It's also come up as a
point of confusion in the Phabricator vs. GitHub PRs discussion, for
example. Configure arc to only upload your current patch by default,
which I think is a much more suitable default for LLVM developers.

Event Timeline

smeenai created this revision.Feb 21 2020, 3:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2020, 3:21 PM

When patching in a Differential, I usually do:

arc patch D74990
git rebase origin/master

Does this change mean I can delete git rebase origin/master from my workflow? If yes, strong +1 from me.

When patching in a Differential, I usually do:

arc patch D74990
git rebase origin/master

Does this change mean I can delete git rebase origin/master from my workflow? If yes, strong +1 from me.

I don't think this'll change the default arc patch behavior, unfortunately. You can use arc patch --nobranch to attempt to patch your current branch instead of creating a new one, although I'm not sure how well that handles rebase conflicts.

What this patch does (and perhaps I should add this to the description), is that previously, if you did something like

... some work
git commit -m 'commit1'
arc diff
... some more work
git commit -m 'commit2'
arc diff

Previously, that second arc diff would upload the changes from both commit1 and commit2 into a single Phabricator revision. With this change, it'll only upload the changes from commit2.

phosek accepted this revision.Feb 21 2020, 9:22 PM

LGTM

This revision is now accepted and ready to land.Feb 21 2020, 9:22 PM
This revision was automatically updated to reflect the committed changes.