runcmd @git, qw(rm --quiet -rf --cached --ignore-unmatch), $subdir;
}
+sub read_tree_subdir ($$) {
+ my ($subdir, $new_tree_object) = @_;
+ rm_subdir_cached $subdir;
+ runcmd @git, qw(read-tree), "--prefix=$subdir/";
+}
+
# classify returns an info hash like this
# CommitId => $objid
# Hdr => # commit headers, including 1 final newline
my $read_tree_debian = sub {
my ($treeish) = @_;
- rm_subdir_cached qw(debian);
- runcmd @git, qw(read-tree --prefix=debian/), "$treeish:debian";
+ read_tree_subdir 'debian', "$treeish:debian";
};
my $read_tree_upstream = sub {
my ($treeish) = @_;