Permalink
Browse files

add a pull-to-commit version

  • Loading branch information...
1 parent 5c4b012 commit 1f586208b705d804841befe59b4897c2adcb506a @kentfredric kentfredric committed Dec 29, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 sync_tree.pl
View
@@ -36,13 +36,21 @@ sub git_subtree {
$opts->{pushas} = $value;
next;
}
+ if ( $field_name eq 'mc' ) {
+ $opts->{has_commit} = 1;
+ $opts->{commit} = $value;
+ next;
+ }
}
if ( not $opts->{push} ) {
if ( not -d -e $root->child($prefix) ) {
git_subtree( 'add', '--squash', '--prefix=' . $prefix, $travis, 'master' );
}
else {
- git_subtree( 'pull', '--squash', '-m', 'Synchronise git subtree maint-travis-ci', '--prefix=' . $prefix, $travis, 'master' );
+ my $commitish = 'master';
+ $commitish = $opts->{commit} if $opts->{has_commit};
+ git_subtree( 'pull', '--squash', '-m', 'Synchronise git subtree maint-travis-ci', '--prefix=' . $prefix, $travis,
+ $commitish );
}
}
else {

0 comments on commit 1f58620

Please sign in to comment.