git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <johannes.schindelin@gmx.de>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Jacob Keller <jacob.keller@gmail.com>
Subject: [PATCH] squash! diff: add --diff-line-prefix option for passing in a prefix
Date: Sun, 14 Aug 2016 10:56:25 +0200 (CEST)	[thread overview]
Message-ID: <5ca415f99718b1792cd0a9c31606b45d27befc48.1471164824.git.johannes.schindelin@gmx.de> (raw)

The '>' character is not a legal part of filenames on Windows. So let's
just not use it in Git's source code. This poses a challenge in the test
script t4013 which distills command-lines into file names (so that the
expected outcome can be stored in files with said names).

We have to take particular care not to confound the existing conversion
of unwanted characters to underscores with the new substitution of '>':
the existing conversion chose to collapse runs of multiple unwanted
characters into a single underscore. If we allowed '>' to be collapsed,
too, the file name generated from the command "diff [...]=-- [...]"
would be identical to the one generated from "diff [...]=--> [...]".

Please squash this patch into
3c90ffd2f01e2d0d080c8e42df2ee89709b324de

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Published-As: https://github.com/dscho/git/releases/tag/mingw-t4013-v1
Fetch-It-Via: git fetch https://github.com/dscho/git mingw-t4013-v1

	For the record: this prevented my beautiful CI jobs from even
	checking out the source code for `pu` in the last days.

	Junio, please let me know if you would prefer this as a separate
	patch.

 t/t4013-diff-various.sh                                                 | 2 +-
 ...aster^_side => diff.diff_--diff-line-prefix=--__master_master^_side} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename t/t4013/{diff.diff_--diff-line-prefix=-->_master_master^_side => diff.diff_--diff-line-prefix=--__master_master^_side} (100%)

diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 5204645..84e2ee0 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -115,7 +115,7 @@ do
 	case "$cmd" in
 	'' | '#'*) continue ;;
 	esac
-	test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g')
+	test=$(echo "$cmd" | sed -e 's|[/ ][/ ]*|_|g' -e 'y/>/_/')
 	pfx=$(printf "%04d" $test_count)
 	expect="$TEST_DIRECTORY/t4013/diff.$test"
 	actual="$pfx-diff.$test"
diff --git a/t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side b/t/t4013/diff.diff_--diff-line-prefix=--__master_master^_side
similarity index 100%
rename from t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side
rename to t/t4013/diff.diff_--diff-line-prefix=--__master_master^_side
-- 
2.9.2.691.g78954f3

base-commit: 945e149951a152207b56d5e49ff5167d151a4c89

             reply	other threads:[~2016-08-14  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-14  8:56 Johannes Schindelin [this message]
2016-08-14 20:42 ` [PATCH] squash! diff: add --diff-line-prefix option for passing in a prefix Junio C Hamano
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ca415f99718b1792cd0a9c31606b45d27befc48.1471164824.git.johannes.schindelin@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.keller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).