Skip to content

branch -l deprecation revisited

Jeff King git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 9 repliesIn review
  2. v15 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4t3200: unset core.logallrefupdates when testing reflog creationt/t3200-branch.sh+1 -10 replies
2/4t: switch "branch -l" to "branch --create-reflog"t/t1410-reflog.sh t/t3200-branch.sh+19 -190 replies
3/4branch: deprecate "-l" optionDocumentation/git-branch.txt builtin/branch.c+23 -22 replies
4/4branch: make "-l" a synonym for "--list"Documentation/git-branch.txt builtin/branch.c+2 -237 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] branch -l deprecation revisited

This series replaces the contents of jk/branch-l-0-deprecation, jk/branch-l-1-removal, and jk/branch-l-2-reincarnation.

It implements the idea discussed in the subthread in:

https://public-inbox.org/git/[email protected]/

Namely that "branch -l" would warn about deprecation only when we're not in list mode, and then we'll eventually jump straight to repurposing "-l" as "--list".

This gets us to the end result faster, without the annoying "-l doesn't mean anything" step in between, and without useless warnings on "git branch -l". It also sidesteps any pager issues since list mode will not print the warning.

The first 3 patches would become jk/branch-l-0-deprecate, and then the final one would become jk/branch-l-1-repurpose or similar. No third step required.

[1/4]: t3200: unset core.logallrefupdates when testing reflog creation [2/4]: t: switch "branch -l" to "branch --create-reflog" [3/4]: branch: deprecate "-l" option
[4/4]: branch: make "-l" a synonym for "--list"

 Documentation/git-branch.txt |  2 +-
 builtin/branch.c             |  4 ++--
 t/t1410-reflog.sh            |  4 ++--
 t/t3200-branch.sh            | 34 +++++++++++++++++-----------------
 4 files changed, 22 insertions(+), 22 deletions(-)

-Peff