git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC PATCH 0/4] Add alias option to git branch
@ 2019-03-04 15:45 Kenneth Cochran
  2019-03-04 15:47 ` [RFC PATCH 1/4] " Kenneth Cochran
  2019-03-05 13:21 ` [RFC PATCH 0/4] " Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Kenneth Cochran @ 2019-03-04 15:45 UTC (permalink / raw)
  To: git; +Cc: Sahil Dua, Duy Nguyen, Jeff King

From c1bad54b29ae1c1d8548d248f6ecaa5959e55f7b Mon Sep 17 00:00:00 2001
From: Kenneth Cochran <kenneth.cochran101@gmail.com>
Date: Mon, 4 Mar 2019 09:40:22 -0600
Subject: [RFC PATCH 0/4] Add alias option to git branch
Cc: Sahil Dua <sahildua2305@gmail.com>,
    Duy Nguyen <pclouds@gmail.com>,
    Jeff King <peff@peff.net>

I find myself often using git symbolic-ref to get around work requirements to use branch names that are not very human friendly.
There are a few problems with this:
	- There’s a lot of text to type
	- Mistyping certain parts (heads/refs) will do things other than create a branch alias
	- It will happily overwrite an existing branch
	- Deleting one that is checked out will put HEAD in an invalid state.

I think this solution is much better; however, I’m not super familiar with the codebase, so I’m sure it can be improved.
I’d appreciate any feedback.

Kenneth Cochran (4):
  branch: add "--alias" option to create an alias
  refs: add function to iteratively dereference symref chain
  worktree: symref should be found anywhere in chain
  branch: disallow accidentally breaking symrefs

 Documentation/git-branch.txt |  8 ++++
 builtin/branch.c             | 49 ++++++++++++++++++++-
 refs.c                       | 28 ++++++++++++
 refs.h                       | 13 ++++++
 t/t3207-branch-alias.sh      | 83 ++++++++++++++++++++++++++++++++++++
 worktree.c                   | 18 +++++---
 6 files changed, 191 insertions(+), 8 deletions(-)
 create mode 100755 t/t3207-branch-alias.sh

-- 
2.17.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-06 10:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 15:45 [RFC PATCH 0/4] Add alias option to git branch Kenneth Cochran
2019-03-04 15:47 ` [RFC PATCH 1/4] " Kenneth Cochran
2019-03-04 15:48   ` [RFC PATCH 2/4] " Kenneth Cochran
2019-03-04 15:49     ` [RFC PATCH 3/4] " Kenneth Cochran
2019-03-04 15:49       ` [RFC PATCH 4/4] " Kenneth Cochran
2019-03-04 16:38         ` Kenneth Cochran
     [not found]         ` <CAJ145vUChd7+5QkmJsOK3bzZsudWfzZYp5wHZDzoq8SKSv0g0A@mail.gmail.com>
2019-03-04 19:33           ` Phil Sainty
2019-03-04 19:52             ` Kenneth Cochran
2019-03-05 13:21 ` [RFC PATCH 0/4] " Junio C Hamano
2019-03-05 17:36   ` Kenneth Cochran
2019-03-06 10:13     ` Phil Sainty

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).