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

[PATCH 12/19] Remove trailing slash from prefix parameter

From
Paul Campbell <pcampbell@kemitix.net>
Date
Mar 9, 2013, 19:27 UTC
Message-ID
<CALeLG_mbpS_iJzP=ev8_cN_11mcTQnC3GTO3_z5Fjk+3WgnvJw@mail.gmail.com>
>From d4aa87f53b61481d2f916415f0baec527a8b6417 Mon Sep 17 00:00:00 2001
From: Paul Campbell <pcampbell@kemitix.net>
Date: Sat, 9 Mar 2013 18:34:10 +0000
Subject: [PATCH 12/19] Remove trailing slash from prefix parameter
Conflicts:
	git-subtree.sh
Original-Author: Herman van Rink <rink@initfour.nl>
Conflicts-resolved-by: Paul Campbell <pcampbell@kemitix.net>
---
 contrib/subtree/git-subtree.sh | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index d67fe5a..ae7d1fe 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -103,6 +103,9 @@ while [ $# -gt 0 ]; do
 	esac
 done

+# Remove trailing slash
+prefix="${prefix%/}";
+
 command="$1"
 shift
 case "$command" in
-- 
1.8.2.rc1


-- 
Paul [W] Campbell
Message 1 of 1 in “Remove trailing slash from prefix parameter”
  1. 12/19 Remove trailing slash from prefix parameterPaul Campbell, Mar 9, 2013

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.