Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 57993 invoked from network); 14 Jan 2011 14:57:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Jan 2011 14:57:22 -0000 Received: (qmail 36864 invoked by uid 500); 14 Jan 2011 14:57:21 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 36491 invoked by uid 500); 14 Jan 2011 14:57:19 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 36483 invoked by uid 99); 14 Jan 2011 14:57:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 14:57:18 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 76.96.27.227 is neither permitted nor denied by domain of jim@jagunet.com) Received: from [76.96.27.227] (HELO qmta12.emeryville.ca.mail.comcast.net) (76.96.27.227) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jan 2011 14:57:08 +0000 Received: from omta22.emeryville.ca.mail.comcast.net ([76.96.30.89]) by qmta12.emeryville.ca.mail.comcast.net with comcast id vRvs1f0051vN32cACSwn2d; Fri, 14 Jan 2011 14:56:47 +0000 Received: from [192.168.199.10] ([69.251.84.64]) by omta22.emeryville.ca.mail.comcast.net with comcast id vSwl1f00B1PGofZ8iSwmNG; Fri, 14 Jan 2011 14:56:47 +0000 From: Jim Jagielski Content-Type: multipart/mixed; boundary=Apple-Mail-2-1029709168 Subject: git and httpd Date: Fri, 14 Jan 2011 09:56:45 -0500 Message-Id: <0AB98DF1-A3D9-4B7A-A6B8-F09AA93E15D4@jaguNET.com> To: dev@httpd.apache.org Mime-Version: 1.0 (Apple Message framework v1082) X-Mailer: Apple Mail (2.1082) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-2-1029709168 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii For anyone trying out git with the httpd SVN repo, or any other git-svn user, the lack of 'git svn diff' is a pain. This helps. Cheers! --Apple-Mail-2-1029709168 Content-Disposition: attachment; filename=git-svn-diff Content-Type: application/octet-stream; name="git-svn-diff" Content-Transfer-Encoding: 7bit #!/usr/bin/env perl # # git-svn does not have a 'git svn diff' capability, # which means you can't see what diffs there are between # your current git branch and HEAD on svn. This fixes # that. # # Installation: # Make sure you have perl # Install this script someone along $PATH # Add a git alias (edit .gitconfig or use 'git config'): # [alias] # svn-diff=!git-svn-diff # # Now you can 'git svn-diff' # # Jim Jagielski (jim@jaguNET.com) # $branch = `git config --get svn-remote.svn.fetch`; chomp $branch; $branch =~ s/.*:refs\/remotes\///; $revbranch = `git rev-list --date-order --max-count=1 $branch`; chomp $revbranch; $revnumber = `git svn find-rev $revbranch`; chomp $revnumber; open(IN, "git diff --no-prefix $revbranch |"); while () { # reverse order works best... s/^(\+\+\+ .*)/\1 (working copy)/; s/^(--- .*)/\1 (revision $revnumber)/; s/^diff --git [^[:space:]]*/Index:/; s/^index.*/===================================================================/; print; } --Apple-Mail-2-1029709168--