|
|
| File: [Development] / xfs-cmds / xfsmisc / Attic / git-make-xfs (download)
Revision 1.1, Wed Jun 22 05:59:18 2005 UTC (12 years, 4 months ago) by nathans.longdrop.melbourne.sgi.com
Update scripts for pushing kernel changes to upstream maintainers. Merge of master-melb:xfs-cmds:22947a by kenmcd. |
#!/usr/bin/perl -w
# extract commits from a git repo, produce email body
#
use strict;
if ($#ARGV != 0) {
print STDERR "Usage: git-make-xfs </path/to/git-parent>\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 (<CHANGES>) {
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 (<DIFFSTAT>) { print; }
close DIFFSTAT;
print "\n";
print "through these commits:\n";
print "\n";
print $changes;