From: Ian Jackson Subject: git-filter-branch automatic CC adding script Date: Wed, 18 Dec 2013 11:53:43 +0000 Message-ID: <21169.36039.233407.252197@mariner.uk.xensource.com> References: <1387297318-11893-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1387297318-11893-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("[PATCH 0/2] libxc: Fix some whitespace/tab-width problems"): > I have here two interrelated whitespace formatting fixes for libxc: > > 1/2 libxc: Remove hard tabs which ought to be 4 spaces > 2/2 libxc: Remove "tab-width: 8" from emacs local variables FYI I used the script below to add some missing CCs to this and my other series. #!/usr/bin/perl -w # # usage # git-filter-branch --msg-filter \ # ".../auto-cc-maintainers `pwd`/xen.git xen-devel@lists.xen.org" # # (args are things never to add to CCs) use strict; use IO::File; die unless @ARGV; die if $ARGV[0] =~ m/^-/; our %got; my $xendir = shift @ARGV; chdir $xendir or die "$xendir: $!"; $got{lc $_}++ foreach @ARGV; while () { print or die $!; $got{lc $1}++ if m/^[-0-9a-z]+: (.*)$/i; } my $anyyet=0; open CCS, "git-show $ENV{GIT_COMMIT} | scripts/get_maintainer.pl |" or die $!; while () { chomp; next if $got{lc $_}; print STDERR "\n" if !$anyyet++; print STDERR "$ENV{GIT_COMMIT} ADDING $_\n"; print "CC: $_\n" or die $!; } $!=0; $?=0; close CCS or die "$? $!";