All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Sveinung Kvilhaugsvik <sveinung84@users.sourceforge.net>
Subject: Re: [PATCH] git-completion: add stashes for gitk
Date: Thu, 12 Mar 2015 11:40:43 -0700	[thread overview]
Message-ID: <xmqqioe62h5g.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <xmqq1tku3x3c.fsf@gitster.dls.corp.google.com> (Junio C. Hamano's message of "Thu, 12 Mar 2015 11:11:03 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> ...  Also, when you have no ref that is named es-tee something,
> "gitk st<TAB>" completes to "gitk stash@{", as if the problem the
> change tries to cure is "it is unnecessarily hard to type at-mark
> open-brace".
>
> I do not have to be the target audience, though.  Maybe this is
> useful for some people.

There is another thing your patch made me notice, which is not a
problem that is introduced by your desire to include stash entries
to the completion.

The way in which the users can name a stash entry is not very
descriptive.  I often cannot offhand remember what stash@{2}
contains, for example, in my tree.  So it is not very useful to be
offered a choice among stash@{0} stash@{1} stash@{2} and stash@{3}
by a TAB completion.

If there were a way for users to say "The one I made to stash away
that change" from the command line (I do not mean "git stash list |
grep 'that change'"), it would be good.  A new syntax to name a
stash entry by pattern matching with the message given to "stash
save" could be something like (just thinking aloud, not suggesting
that this has to be our final design of that syntax):

    $ git log stash@{/$pattern}

and then it mould make a lot of sense for a completion request

    $ git log stash@{<TAB>

to result in something like this:

    "stash@{/avoid unnecessary negation}"
    "stash@{/style fix t4122}"
    ...

  reply	other threads:[~2015-03-12 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  0:42 [PATCH] git-completion: add stashes for gitk Sveinung Kvilhaugsvik
2015-03-12 18:11 ` Junio C Hamano
2015-03-12 18:40   ` Junio C Hamano [this message]
2015-03-13 17:25     ` Sveinung Kvilhaugsvik
2015-03-14  5:18       ` 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=xmqqioe62h5g.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=sveinung84@users.sourceforge.net \
    /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.