Skip to content

Commit

Permalink
fix(submit:phabricator): don't update diffs with --verbatim
Browse files Browse the repository at this point in the history
The `--verbatim` flag updates the phab's "reviewers" field, among others. If Herald added reviewers, or if somebody not in your reviewers list accepted the diff, then running `git submit` would revert the "reviewers" field and you would lose your accepts, which is a bad experience. There is a successful workflow where you run `arc amend` before ever running `arc diff` to update the diff, but it's probably better to do the least surprising thing, which is to preserve the state on Phabricator (since mutating it may have side effects, unlike the local commit message).
  • Loading branch information
arxanas committed Jul 29, 2023
1 parent 5b7dbbf commit afb56bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-branchless-submit/src/phabricator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ Differential Revision: https://phabricator.example.com/D000$(git rev-list --coun
.map_err(Error::BuildRebasePlan)?;
let test_options = ResolvedTestOptions {
command: if !should_mock() {
let mut args = vec!["arc", "diff", "--verbatim", "--head", "HEAD", "HEAD^"];
let mut args = vec!["arc", "diff", "--head", "HEAD", "HEAD^"];
args.extend(match message {
Some(message) => ["-m", message.as_ref()],
None => ["-m", "update"],
Expand Down

0 comments on commit afb56bd

Please sign in to comment.