diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-03-16 11:11:42 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-16 12:05:38 -0700 |
commit | d40f108d42fd1d4d2064416629eb987dafb2b113 (patch) | |
tree | 955223b1eea94fc481a6da91e4c30b879a2f207c /notes-utils.c | |
parent | 52cae643c5d49b7fa18a7a4c60c284f9ae2e2c71 (diff) | |
download | git-jc/a-lone-dash-stands-for-previous-branch.tar.gz |
"-" and "@{-1}" on various programsjc/a-lone-dash-stands-for-previous-branch
JFF stands for just for fun.
This is not meant to give out a model answer and is known to be
incomplete, but I was wondering if it would be a better direction to
allow "-" as a stand-in for "@{-1}" everywhere we allow a branch
name, losing workarounds at the surface level we have for checkout,
merge and revert.
The first three paths are to remove the surface workarounds that
become unnecessary. The one in sha1_name.c is the central change.
The change in revision.c is to allow a single "-" to be recognized
as a potential revision name (without this change, what begins with
"-" is either an option or an unknown option).
So you could do things like "git reset - $path" but also things like
"git log -" after switching out of a branch.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-utils.c')
0 files changed, 0 insertions, 0 deletions