git grep argument parser bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In both ubuntu versions of git 1.9.1 and 2.7.0

    git grep '-test'
    git grep '--help'

Or any other expressions literal leading with a single dash or double
dash get interpreted as argument flags and not as search expressions.

What I expect is grep results for the literal strings "-test" and "--help"
What i get is git help output informing of wrong argument usage, or
accidentally turning on flags I didn't expect.

Work around; for afflicted users terminating argument parsing with `
-- ` works as it should.

    git grep -- '-test'

Confirmed on two Ubuntu [based] systems, Ubuntu Server 14.03 and
LinuxMint 17.3 [Cinnamon]

-- 
Dylan Grafmyre
Associate System Administrator

Email: DylanG@xxxxxxxxxxxxxx
Office: +1 (888) 778 1004
Web:   www.conversica.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]