Skip to content

branch: support for at-refs like @{-1} in --edit-description, --set-upstream-to and --unset-upstream

Rubén Justo via GitGitGadget git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2branch: refactor edit_description command switch casebuiltin/branch.c+8 -90 replies
2/2branch: support for at-refs like @{-1}builtin/branch.c t/t3204-branch-name-interpretation.sh+62 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] branch: support for at-refs like @{-1} in --edit-description, --set-upstream-to and --unset-upstream

branch command with --edit-description, --set-upstream-to and --unset-upstream options expects a branch name. A branch can be specified using at-refs like @{-1}, so those references need to be resolved.

We can modify the description of the previously checked out branch with:

$ git branch --edit--description @{-1}

We can modify the upstream of the previously checked out branch with:

$ git branch --set-upstream-to upstream @{-1} $ git branch --unset-upstream
@{-1}

Rubén Justo (2):
branch: refactor edit_description command switch case
branch: support for at-refs like @{-1}

 builtin/branch.c                      | 49 +++++++++++++++++++--------
 t/t3204-branch-name-interpretation.sh | 36 ++++++++++++++++++++
 2 files changed, 70 insertions(+), 15 deletions(-)

base-commit: 795ea8776befc95ea2becd8020c7a284677b4161
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1346%2Frjusto%2Fbranch-support-at-refs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1346/rjusto/branch-support-at-refs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1346

Signature · 1 line
gitgitgadget