From: Manlio Perillo <manlio.perillo@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>,
"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: Re: [PATCH v3] git-completion.bash: add support for path completion
Date: Thu, 20 Dec 2012 00:43:25 +0100 [thread overview]
Message-ID: <50D2511D.3020705@gmail.com> (raw)
In-Reply-To: <7vzk1995mx.fsf@alter.siamese.dyndns.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 19/12/2012 20:57, Junio C Hamano ha scritto:
> [...]
I just found a serious bug with "git commit" path completion.
When doing the first commit on an empty repository, completion will
cause an error:
$git commit -m init <TAB>fatal: ambiguous argument 'HEAD': unknown
revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
The problem is that for a newly created repository there is no HEAD.
If HEAD does not exists, code must use ls-files instead of diff-index
to get the completion list.
Another change is to always call git commands with stderr redirected to
/dev/null.
By the way, this is also a bug of current bash completion code:
$ git show does-not-exists:<TAB>fatal: Not a valid object name
does-not-exists
I will write a patch (based on master) to fix this.
> [...]
Regards Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAlDSUR0ACgkQscQJ24LbaUSkRwCfVKk9JhSD4sKDFm4heAkVbN0o
KAAAn3paTXyUiFlfY/UBpnkwiARegLsE
=7Q5s
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2012-12-19 23:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 18:58 [PATCH v3] git-completion.bash: add support for path completion Manlio Perillo
2012-12-19 19:57 ` Junio C Hamano
2012-12-19 21:54 ` Manlio Perillo
2012-12-19 23:43 ` Manlio Perillo [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-18 17:25 Manlio Perillo
2012-12-18 17:53 ` Junio C Hamano
2012-12-18 18:55 ` Manlio Perillo
2012-12-18 19:22 ` Junio C Hamano
2012-12-18 20:29 ` Manlio Perillo
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=50D2511D.3020705@gmail.com \
--to=manlio.perillo@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=szeder@ira.uka.de \
/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.