Page MenuHomePhabricator

arc commit range
Closed, ResolvedPublic

Asked by ardunster on Jul 31 2020, 4:32 PM.
Subscribers
None
Tokens
"Like" token, awarded by jcmcdonald.

Details

I did my first arc diff submission today, and I got the following block, which after a bit of researching in the User Guide I just accepted the default option.

 Select a Default Commit Range 

You're running a command which operates on a range of revisions (usually,
from some revision to HEAD) but have not specified the revision that should
determine the start of the range.

Previously, arc assumed you meant 'HEAD^' when you did not specify a start
revision, but this behavior does not make much sense in most workflows
outside of Facebook's historic git-svn workflow.

arc no longer assumes 'HEAD^'. You must specify a relative commit explicitly
when you invoke a command (e.g., `arc diff HEAD^`, not just `arc diff`) or
select a default for this working copy.

In most cases, the best default is 'origin/master'. You can also select
'HEAD^' to preserve the old behavior, or some other remote or branch. But you
almost certainly want to select 'origin/master'.

(Technically: the merge-base of the selected revision and HEAD is used to
determine the start of the commit range.)

    What default do you want to use? [origin/master]

However, when I went to submit the notes for the diff it gave me the notes from previous commits on the main devel branch, and tried to update someone else's diff, giving me an error message that I didn't own the diff it was trying to update. After which I ran arc diff HEAD^ instead, which worked.

I'm sure I'm missing something in the guide, but I'm not clear on how to change my commit range rules, and I don't know what the preferred rule is. Can anyone point me in the right direction?

Answers

jcmcdonald
Updated 747 Days Ago

Once upon a time, I would have said "use the default", but clearly that's wrong now.

Instead, next time you get this, type origin/devel and hit .


By the way, if you've ever run into this before in a repository and selected the wrong default, you can change it with this one-liner in Bash:

mkdir -p .git/arc; echo origin/devel > .git/arc/default-relative-commit

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.