#!/usr/bin/perl -w # extract commits from a git repo, produce email body # use strict; if ($#ARGV != 0) { print STDERR "Usage: git-make-xfs \n"; exit 1; } my $parent_tree = $ARGV[0]; my $first_parent; my $final_commit; my $changes; open CHANGES, "git-changes-script -L $parent_tree |" or die "git-changes-script"; while () { if (/^commit (\S+)$/) { $final_commit = $1; } elsif (/^parent (\S+)$/) { $first_parent = $1 if !defined($first_parent); } $changes .= $_; } close CHANGES; print "Please pull from:\n"; print "\trsync://oss.sgi.com/git/xfs-2.6.git\n"; print "\n"; print "This will update the following files:\n"; print "\n"; open DIFFSTAT, "git-export $first_parent $final_commit | diffstat -p1 |" or die "git-export | diffstat"; while () { print; } close DIFFSTAT; print "\n"; print "through these commits:\n"; print "\n"; print $changes;