All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Schuberth <sschuberth@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Sixt <j6t@kdbg.org>, Jiang Xin <worldhello.net@gmail.com>
Subject: [PATCH] path-utils: Rename mingw_path function to print_path
Date: Thu, 10 Oct 2013 22:49:43 +0200	[thread overview]
Message-ID: <525712E7.2010608@gmail.com> (raw)

mingw_path was introduced in abd4284 to output a mangled path as it is
passed as an argument to main(). But the name is misleading because
mangling does not come from MinGW, but from MSYS [1]. As abd4284 does not
introduce any MSYS or MinGW specific code but just prints out argv[2] as
it is passed to main(), give the function the more generic and less
confusing name "print_path".

[1] http://www.mingw.org/wiki/Posix_path_conversion

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
 t/t0060-path-utils.sh | 4 ++--
 test-path-utils.c     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 3a48de2..2bd5e32 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -8,13 +8,13 @@ test_description='Test various path utilities'
 . ./test-lib.sh
 
 norm_path() {
-	expected=$(test-path-utils mingw_path "$2")
+	expected=$(test-path-utils print_path "$2")
 	test_expect_success $3 "normalize path: $1 => $2" \
 	"test \"\$(test-path-utils normalize_path_copy '$1')\" = '$expected'"
 }
 
 relative_path() {
-	expected=$(test-path-utils mingw_path "$3")
+	expected=$(test-path-utils print_path "$3")
 	test_expect_success $4 "relative path: $1 $2 => $3" \
 	"test \"\$(test-path-utils relative_path '$1' '$2')\" = '$expected'"
 }
diff --git a/test-path-utils.c b/test-path-utils.c
index bb975e4..3dd3744 100644
--- a/test-path-utils.c
+++ b/test-path-utils.c
@@ -116,7 +116,7 @@ int main(int argc, char **argv)
 		return 0;
 	}
 
-	if (argc == 3 && !strcmp(argv[1], "mingw_path")) {
+	if (argc == 3 && !strcmp(argv[1], "print_path")) {
 		puts(argv[2]);
 		return 0;
 	}
-- 
1.8.4.msysgit.0

                 reply	other threads:[~2013-10-10 20:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=525712E7.2010608@gmail.com \
    --to=sschuberth@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=worldhello.net@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.