From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Sixt Subject: Re: [PATCH] Add git-filter-branch Date: Wed, 06 Jun 2007 17:22:43 +0200 Organization: eudaptics software gmbh Message-ID: <4666D143.32BC9693@eudaptics.com> References: <4663BCDA.F1BADDD8@eudaptics.com> <46643F2D.7C896CBC@eudaptics.com> <46650A58.4934C07C@eudaptics.com> <466665AD.CF5B85DF@eudaptics.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: git@vger.kernel.org To: Johannes Schindelin X-From: git-owner@vger.kernel.org Wed Jun 06 17:21:49 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 1HvxKW-00080j-Eb for gcvg-git@gmane.org; Wed, 06 Jun 2007 17:21:48 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759680AbXFFPVe (ORCPT ); Wed, 6 Jun 2007 11:21:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761482AbXFFPVe (ORCPT ); Wed, 6 Jun 2007 11:21:34 -0400 Received: from lilzmailso02.liwest.at ([212.33.55.24]:50729 "EHLO lilzmailso02.liwest.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759680AbXFFPVd (ORCPT ); Wed, 6 Jun 2007 11:21:33 -0400 Received: from cm56-163-160.liwest.at ([86.56.163.160] helo=linz.eudaptics.com) by lilzmailso02.liwest.at with esmtp (Exim 4.44) id 1HvxKF-0000v3-TM; Wed, 06 Jun 2007 17:21:32 +0200 Received: from eudaptics.com (unknown [192.168.1.88]) by linz.eudaptics.com (Postfix) with ESMTP id A3E6654D; Wed, 6 Jun 2007 17:21:31 +0200 (CEST) X-Mailer: Mozilla 4.73 [en] (Windows NT 5.0; U) X-Accept-Language: en X-Spam-Score: 0.0 (/) X-Spam-Report: AWL=0.042 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Schindelin wrote: > Of course, it would be even more so if the target branch name was > "filtered", overrideable by "--target ". My plan for this is: 1. run the rev-list args ("$@") through rev-parse 2. pick only the positive ones (/^[a-z0-9]{40}$/) 3. filter show-ref against the result of 2. 4. foreach ref in the result of 3. install a refs/rewritten/$ref with the mapped id if and only if the mapped id is different from the original id of $ref. Then you can, for example, 'git filter-branch --all' to rewrite all branches. -- Hannes