Re: [PATCH] git-filter-branch: document --original option

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-filter-branch: document --original option

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:31

Giuseppe Bilotta [off-list ref] writes:
+--original <namespace>::
+	Use this option to set the namespace where the original commits
+	will be stored. The default value is 'refs/original'.
+
The default seems to be "refs/original/".

Even worse.

I think if you say --force --original refs/head (notice the lack
of "s" nor slash at the end), the code will get you in a *lot*
of trouble.

Dscho, don't we want to do something like this?

---
 git-filter-branch.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 0190060..a7f50a6 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -134,6 +134,7 @@ do
 		filter_subdir="$OPTARG"
 		;;
 	--original)
+		case "$OPTARG" in */) ;; *) OPTARG="$OPTARG/" ;; esac
 		orig_namespace="$OPTARG"
 		;;
 	*)

Re: [PATCH] git-filter-branch: document --original option

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:31

Hi,

On Thu, 30 Aug 2007, Junio C Hamano wrote:
Giuseppe Bilotta [off-list ref] writes:
quoted
+--original <namespace>::
+	Use this option to set the namespace where the original commits
+	will be stored. The default value is 'refs/original'.
+
The default seems to be "refs/original/".

Even worse.

I think if you say --force --original refs/head (notice the lack
of "s" nor slash at the end), the code will get you in a *lot*
of trouble.

Dscho, don't we want to do something like this?
Yes, I think so, too.  The --original option is probably the least tested 
option of filter-branch :-(

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help