git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Kenneth Cochran <kenneth.cochran101@gmail.com>
To: git@vger.kernel.org
Cc: Sahil Dua <sahildua2305@gmail.com>,
	Duy Nguyen <pclouds@gmail.com>, Jeff King <peff@peff.net>
Subject: [RFC PATCH 0/4] Add alias option to git branch
Date: Mon, 4 Mar 2019 09:45:45 -0600	[thread overview]
Message-ID: <47CA9077-E8C1-4093-8B36-2D5D3DE2D886@gmail.com> (raw)

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



             reply	other threads:[~2019-03-04 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 15:45 Kenneth Cochran [this message]
2019-03-04 15:47 ` [RFC PATCH 1/4] Add alias option to git branch 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CA9077-E8C1-4093-8B36-2D5D3DE2D886@gmail.com \
    --to=kenneth.cochran101@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=sahildua2305@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).