From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] git-filter-branch: document --original option Date: Thu, 30 Aug 2007 14:55:39 -0700 Message-ID: <7vy7fs7kmc.fsf@gitster.siamese.dyndns.org> References: <11884893671845-git-send-email-giuseppe.bilotta@gmail.com> <1188493842963-git-send-email-giuseppe.bilotta@gmail.com> <11884938431525-git-send-email-giuseppe.bilotta@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, Johannes Schindelin To: Giuseppe Bilotta X-From: git-owner@vger.kernel.org Thu Aug 30 23:55:52 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IQrzT-0000kP-2Z for gcvg-git@gmane.org; Thu, 30 Aug 2007 23:55:51 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762561AbXH3Vzq (ORCPT ); Thu, 30 Aug 2007 17:55:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762393AbXH3Vzq (ORCPT ); Thu, 30 Aug 2007 17:55:46 -0400 Received: from rune.sasl.smtp.pobox.com ([208.210.124.37]:54644 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762262AbXH3Vzp (ORCPT ); Thu, 30 Aug 2007 17:55:45 -0400 Received: from pobox.com (ip68-225-240-77.oc.oc.cox.net [68.225.240.77]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by rune.sasl.smtp.pobox.com (Postfix) with ESMTP id 868A812B17D; Thu, 30 Aug 2007 17:56:03 -0400 (EDT) In-Reply-To: <11884938431525-git-send-email-giuseppe.bilotta@gmail.com> (Giuseppe Bilotta's message of "Thu, 30 Aug 2007 19:10:42 +0200") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Giuseppe Bilotta writes: > +--original :: > + 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" ;; *)