chomp $spec->{Date} or die $!;
}
+defined $spec->{Nick} or die "no patch nickname specified\n";
+
length($spec->{Date})==18 or die "partial date specified, not supported\n";
chdir_toplevel();
#----- subroutines for setup
-sub create_and_switch ($) {
- my ($branchref) = @_;
- run_git(qw(update-ref -m), "tb-create base", $branchref, 'HEAD');
+sub create_and_switch ($$) {
+ my ($branchref, $what) = @_;
+ enable_reflog($branchref);
+ run_git(qw(update-ref -m), "tb-create $newpatch $what", $branchref, 'HEAD');
run_git(qw(symbolic-ref HEAD), $branchref);
}
}
my $baseref = "refs/topbloke-bases/$newpatch";
-create_and_switch($baseref);
-
-run_git(qw(update-ref -m), "tb-create base $newpatch", $baseref, 'HEAD');
-run_git(qw(symbolic-ref HEAD), $baseref);
+create_and_switch($baseref, 'base');
meta_and_stage('msg', "# not applicable\n");
meta_and_stage('deps', "# not applicable\n");
meta_and_stage('pflags', '');
}
-run_git(qw(commit -q -m), "tb-create base $newpatch");
+run_git(qw(commit -q -m), "tb-create $newpatch base");
#----- create the tip branch
my $tipref = "refs/topbloke-tips/$newpatch";
-create_and_switch($tipref);
+create_and_switch($tipref, 'tip');
my $nm = wf_start('.topbloke/msg');
wf($nm, "From: $author\n");
flagsfile_add_flag('included',$newpatch);
stage_meta('included');
-run_git(qw(commit -q -m), "tb-create tip $spec->{Nick}\n$newpatch\n");
+run_git(qw(commit -q -m), "tb-create $newpatch tip");