From: Junio C Hamano <gitster@pobox•com>
To: Johannes Schindelin <johannes.schindelin@gmx•de>
Cc: git@vger•kernel.org, Jacob Keller <jacob.keller@gmail•com>
Subject: Re: [PATCH] squash! diff: add --diff-line-prefix option for passing in a prefix
Date: Sun, 14 Aug 2016 13:42:37 -0700 [thread overview]
Message-ID: <xmqqinv3krpe.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <5ca415f99718b1792cd0a9c31606b45d27befc48.1471164824.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Sun, 14 Aug 2016 10:56:25 +0200 (CEST)")
Johannes Schindelin <johannes.schindelin@gmx•de> writes:
> - test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
> + test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g' -e 'y/>/_/')
The existing sed scriptlet says "we cannot have slash and do not
want to have space in filename, so we squash runs of them to a
single underscore". If you have more characters that you do not
want, you should add that to the existing set instead.
While you are at it, it may be sensible to add a colon to that set,
too, no?
Something like this, perhaps?
> - test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
> + test=$(echo "$cmd" | sed -e 's|[/ <:>][/ <:>]*|_|g')
next prev parent reply other threads:[~2016-08-14 20:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 8:56 [PATCH] squash! diff: add --diff-line-prefix option for passing in a prefix Johannes Schindelin
2016-08-14 20:42 ` Junio C Hamano [this message]
2016-08-15 14:07 ` Johannes Schindelin
2016-08-15 16:20 ` Junio C Hamano
2016-08-16 15:39 ` Johannes Schindelin
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=xmqqinv3krpe.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jacob.keller@gmail$(echo .)com \
--cc=johannes.schindelin@gmx$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox