git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] get_sha1: support ref^{/regex} syntax

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Dec 15, 2010, 03:12 UTC
Message-ID
<AANLkTimy5MVkxDzXqzA8T4DHJmzsSAvwqVVzRvWw5KA0@mail.gmail.com>
In-Reply-To
<7v62uvrbfk.fsf@alter.siamese.dyndns.org>
On Wed, Dec 15, 2010 at 9:56 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
>
>> Perhaps we should just reject this case. No sane body would ever use it.
>
> I'd have to say that dismissing before even trying is not a very
> disciplined attitude.
>
> Shouldn't an empty regexp simply match everything?  Even on FBSD8,
>
>    $ grep '' /etc/passwd
>
> seems to show everything.  How hard would it be to do this in the codepath
> we are discussing?
To make '' match everything is easy. I'll cook up something when I get home.
-- 
Duy
Previous: Junio C HamanoNext: Nguyễn Thái Ngọc Duy
Message 9 of 17 in “get_sha1_oneline: do not leak or double free”
  1. 1/3 get_sha1_oneline: do not leak or double freeNguyễn Thái Ngọc Duy, Dec 13, 2010
  2. 2/3 get_sha1_oneline: let callers initialize the commit tips for traverseNguyễn Thái Ngọc Duy, Dec 13, 2010
  3. 3/3 get_sha1: support ref^{/regex} syntaxNguyễn Thái Ngọc Duy, Dec 13, 2010
  4. Nguyen Thai Ngoc DuyDec 13, 2010
  5. Jonathan NiederDec 13, 2010
  6. Junio C HamanoDec 15, 2010
  7. Nguyen Thai Ngoc DuyDec 15, 2010
  8. Junio C HamanoDec 15, 2010
  9. Nguyen Thai Ngoc DuyDec 15, 2010
  10. get_sha1: handle special case $commit^{/}Nguyễn Thái Ngọc Duy, Dec 15, 2010
  11. Junio C HamanoDec 15, 2010
  12. Nguyen Thai Ngoc DuyDec 16, 2010
  13. Junio C HamanoDec 13, 2010
  14. Junio C HamanoDec 13, 2010
  15. Nguyen Thai Ngoc DuyDec 13, 2010
  16. Junio C HamanoDec 13, 2010
  17. Junio C HamanoDec 13, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.