summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-29 00:33:03 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-08 15:55:09 +0100
commit68935a4a1859107483111d4db9e69798c5bf2714 (patch)
tree8f15dc78cb84a8537290ad200e5d5a44874cb535 /dgit
parentdc217db9c437a31fed60485fc4fc2c18aa0b7d69 (diff)
New import: mktree_in_ud_from_only_subdir: New $raw parameter (nfc)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit13
1 files changed, 9 insertions, 4 deletions
diff --git a/dgit b/dgit
index cdf2e93..b188361 100755
--- a/dgit
+++ b/dgit
@@ -1374,7 +1374,9 @@ sub remove_stray_gits () {
$!=0; $?=0; close GITS or failedcmd @gitscmd;
}
-sub mktree_in_ud_from_only_subdir () {
+sub mktree_in_ud_from_only_subdir (;$) {
+ my ($raw) = @_;
+
# changes into the subdir
my (@dirs) = <*/.>;
die "@dirs ?" unless @dirs==1;
@@ -1384,10 +1386,13 @@ sub mktree_in_ud_from_only_subdir () {
remove_stray_gits();
mktree_in_ud_here();
- my ($format, $fopts) = get_source_format();
- if (madformat($format)) {
- rmtree '.pc';
+ if (!$raw) {
+ my ($format, $fopts) = get_source_format();
+ if (madformat($format)) {
+ rmtree '.pc';
+ }
}
+
runcmd @git, qw(add -Af);
my $tree=git_write_tree();
return ($tree,$dir);