git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] git-filter-branch: document --original option
Date: Thu, 30 Aug 2007 14:55:39 -0700	[thread overview]
Message-ID: <7vy7fs7kmc.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <11884938431525-git-send-email-giuseppe.bilotta@gmail.com> (Giuseppe Bilotta's message of "Thu, 30 Aug 2007 19:10:42 +0200")

Giuseppe Bilotta <giuseppe.bilotta@gmail.com> 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"
 		;;
 	*)

  reply	other threads:[~2007-08-30 21:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-30 15:56 [PATCH] git-filter-branch: more detailed USAGE Giuseppe Bilotta
2007-08-30 16:20 ` Johannes Sixt
2007-08-30 17:11   ` Giuseppe Bilotta
2007-08-30 17:10 ` Giuseppe Bilotta
2007-08-30 17:10   ` [PATCH] git-filter-branch: document --original option Giuseppe Bilotta
2007-08-30 21:55     ` Junio C Hamano [this message]
2007-08-30 22:00       ` David Kastrup
2007-08-30 22:23         ` Junio C Hamano
2007-08-30 23:13           ` Junio C Hamano
2007-08-31  6:16             ` David Kastrup
2007-08-31  6:13           ` David Kastrup
2007-08-30 23:04       ` 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=7vy7fs7kmc.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=giuseppe.bilotta@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /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 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 NNTP newsgroup(s).