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

Re: [PATCH] import-tars: be nice to wrong directory modes

From
Randal L. Schwartz <merlyn@stonehenge.com>
Date
Apr 29, 2007, 01:36 UTC
Message-ID
<86tzv07yhq.fsf@blue.stonehenge.com>
In-Reply-To
<Pine.LNX.4.64.0704290159230.29859@racer.site>
>>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Johannes> +		next if $name =~ '/$';

This is misleading. That's a regex there. And it also falsely matches a string ending in "/\n", but I bet there are parts of git that break on those filenames too. :)

Consider:
        next if $name =~ m{/\z};
which matches precisely when the filename ends in /.
-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
Previous: Shawn O. Pearce
Message 5 of 5 in “import-tars: be nice to wrong directory modes”
  1. import-tars: be nice to wrong directory modesJohannes Schindelin, Apr 28, 2007
  2. Shawn O. PearceApr 29, 2007
  3. Junio C HamanoApr 29, 2007
  4. Shawn O. PearceApr 29, 2007
  5. Randal L. SchwartzApr 29, 2007

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.