in_workarea sub {
if ($bare) {
runcmd @git, qw(checkout -q -b gdr-internal), $upstream;
- read_tree_debian $old_head;
+ runcmd @git, qw(rm --quiet -rf --ignore-unmatch debian);
+ runcmd @git, qw(checkout -q), $old_head, qw(debian);
runcmd @git, qw(commit --allow-empty -q -m ADD-DEBIAN);
} else {
runcmd @git, qw(checkout -q -b gdr-internal), $old_head;
];
# make the anchor merge
# the tree is already exactly right
+ if ($bare) {
+ runcmd @git, qw(reset -q), $upstream, qw(-- :/ :!/debian);
+ }
$work = make_commit [$work, $upstream], [
'git-debrebase import: declare upstream',
'First breakwater merge.',