[PATCH 0/2] branch: support for at-refs like @{-1} in --edit-description, --set-upstream-to and --unset-upstream
- From
Rubén Justo via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Sep 5, 2022, 14:34 UTC
- Message-ID
- <pull.1346.git.1662388460.gitgitgadget@gmail.com>
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
-- gitgitgadget