#!/usr/bin/perl -w # extract commits from a git repo, produce email body # is created by p_mod2git use strict; my $commit1; my $commit2; if ($#ARGV != 0) { print STDERR "Usage: git-make-xfs \n"; exit 1; } my $commitset = $ARGV[0]; open COMMITS, $commitset or die "cannot open commitset $commitset"; while () { chomp; if (!defined($commit1)) { $commit1 = $_; } else { $commit2 = $_; } } print "Please pull from:\n"; print "\tgit://oss.sgi.com:8090/nathans/xfs-2.6.git\n"; print "\n"; print "This will update the following files:\n"; print "\n"; open STAT, "git-diff-tree --stat --no-commit-id $commit1 $commit2 |" or die "git-diff-tree (diffstat)"; while () { print; } close STAT; print "\n"; print "through these commits:\n"; print "\n"; open CHANGES, "cat $commitset | git-diff-tree --stdin -v -s |" or die "git-diff-tree (commits)"; while () { print; } close CHANGES; print STDERR "Completed: git-export\n";