Re: Incomplete bash completion on git commit: --allow-empty-message and --allow-empty

2018-08-16 Thread Duy Nguyen
On Thu, Aug 16, 2018 at 3:50 PM Hadi Safari  wrote:
>
> Hi!
>
> I'm wondering why there isn't --allow-empty and --allow-empty-message in
> completeion list of git commit command.

This is because they are marked "hidden" in the code. If you do "git
commit -h", they will not show up either. Ævar provided the reason for
hiding them in c9b5fde759 (Add option to git-commit to allow empty log
messages - 2010-04-06), basically "not for normal use" so it makes
sense to not complete them. If they are used often on command line
now, then of course we need to reconsider to stop hiding them.
-- 
Duy


Incomplete bash completion on git commit: --allow-empty-message and --allow-empty

2018-08-16 Thread Hadi Safari

Hi!

I'm wondering why there isn't --allow-empty and --allow-empty-message in 
completeion list of git commit command. I'm getting only following flags 
from v2.18.0 on `git commit --`:


--ahead-behind  --include   --reedit-message=
--all   --interactive   --reset-author
--amend --long  --reuse-message=
--author=   --message=  --short
--branch--no-edit   --signoff
--cleanup=  --no-post-rewrite   --squash=
--date= --no-verify --status
--dry-run   --null  --template=
--edit  --only  --untracked-files
--file= --patch --verbose
--fixup=--porcelain --verify
--gpg-sign  --quiet

Besides, is there any way to allow empty commit message for a repo, e.g. 
by adding something to `.git/config`? I couldn't find any in docs.


--
Hadi