Closed Bug 1527621 Opened 5 years ago Closed 5 years ago

`moz-phab patch` should support --no-branch (or similar) for git-cinnabar

Categories

(Conduit :: moz-phab, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Unassigned)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

When using moz-phab on a git-cinnabar repository, it seems like there is no way to apply the patch to the current branch without creating a new branch.

Could we have an option similar to --no-bookmark but for git please?

The situation is a little different - the --no-bookmark is creating a DAG branch point, it is simply not bookmarking it.
I agree we could have a --no-branch option, but in Git the result would depend on the base commit of the patch.

  1. If --apply-to here and not working in detached HEAD patch would simply add commits to the current branch.
  2. If --apply-to here and working in detached HEAD patch would continue on adding commits in the detached HEAD state.
  3. If --apply-to base or --apply-to SHA1 - moz-phab patch would switch repository to the detached HEAD state and add commits.

I think we should allow to do this and guard switching to the detached HEAD with a warning or even a prompt.

Mercurial has a --no-bookmark option which allows to not create a
bookmark for a new DAG branch point. In Git we had been always create a
branch.

This patch is adding a new option --no-branch which allows to create
commits without creating a branch. This may result in switching the
repository to the 'detached HEAD' state. User has to use the --yes
option or agree to the prompt.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: