From: Taylor Blau <me@ttaylorr.com>
To: Sergey Organov <sorganov@gmail.com>
Cc: Konstantin Khomoutov <kostix@bswap.ru>,
Junio C Hamano <gitster@pobox.com>, Taylor Blau <me@ttaylorr.com>,
Ivan Tham <pickfire@riseup.net>,
git@vger.kernel.org,
"brian m . carlson" <sandals@crustytoothpaste.net>
Subject: Re: [PATCH] branch: add '-' to delete previous branch
Date: Fri, 1 May 2020 16:22:27 -0600 [thread overview]
Message-ID: <20200501222227.GE41612@syl.local> (raw)
In-Reply-To: <87r1w43qfy.fsf@osv.gnss.ru>
On Fri, May 01, 2020 at 01:22:25PM +0300, Sergey Organov wrote:
> Konstantin Khomoutov <kostix@bswap.ru> writes:
>
> > On Fri, May 01, 2020 at 12:18:31PM +0300, Sergey Organov wrote:
> >
> > [...]
> >> >> I would speculate that `git checkout -` may have learned about "-"
> >> >> simply from the `cd -` ...
> >> >
> >> > You do not have to speculate. You only need to read what has been
> >> > already said in the thread ;-).
> >>
> >> Should I expect "git checkout ~" to get me to my "home" branch then? ;-)
> >
> > Heh, no you shouldn't: the '~' is expanded by the shell itself according
> > to its parameter expansion rules, so `cd` never sees the bare tilde
> > in this case ;-)
>
> Yeah, but then git could compare its argument to $HOME and "do the right
> thing" ;-) Just kidding, obviously.
>
> That said, bare "cd" also changes to home directory, so bare "git
> checkout" could become as useful.
My qualms about the general usefulness of a bare 'git checkout' going to
some bookmarked branch aside, this won't work, since a bare 'git
checkout' already sets HEAD to the currently checked-out branch.
That said, I am not at all sold on this being a good idea.
> >
> >> Actually, that could be a good idea. I mean, to have "home" branch
> >> notion and a short-cut for it.
> >
> > I have no say for the idea per se but you would have hard time using
> > bare tilda character for that precisely because of it being special to
> > Unix shells - you'd need to escape it all the time (though something
> > like unquoted @{~} would work just OK).
>
> Yes, plain '~' won't do.
>
> -- Sergey
Thanks,
Taylor
next prev parent reply other threads:[~2020-05-01 22:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 13:01 [PATCH] branch: add '-' to delete previous branch Ivan Tham
2020-04-29 13:37 ` Sergey Organov
2020-04-29 19:00 ` Taylor Blau
2020-04-29 19:06 ` Eric Sunshine
2020-04-29 19:50 ` Sergey Organov
2020-04-29 19:57 ` Taylor Blau
2020-04-29 20:22 ` Junio C Hamano
2020-04-29 20:35 ` Taylor Blau
2020-04-29 20:39 ` Junio C Hamano
2020-04-29 20:37 ` Junio C Hamano
2020-04-29 20:26 ` Sergey Organov
2020-04-30 16:27 ` Konstantin Khomoutov
2020-04-30 19:52 ` Junio C Hamano
2020-05-01 9:18 ` Sergey Organov
2020-05-01 9:44 ` Konstantin Khomoutov
2020-05-01 10:22 ` Sergey Organov
2020-05-01 22:22 ` Taylor Blau [this message]
2020-04-30 3:43 ` Ivan Tham
2020-04-29 19:27 ` Junio C Hamano
2020-04-29 19:31 ` Randall S. Becker
2020-04-29 19:55 ` Sergey Organov
2020-04-29 18:58 ` Taylor Blau
2020-04-30 14:52 ` Ivan Tham
2020-04-30 15:59 ` Taylor Blau
2020-04-30 19:51 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200501222227.GE41612@syl.local \
--to=me@ttaylorr.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kostix@bswap.ru \
--cc=pickfire@riseup.net \
--cc=sandals@crustytoothpaste.net \
--cc=sorganov@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.