From: Ian Jackson Date: Sun, 26 Jul 2015 20:41:49 +0000 (+0100) Subject: Provide dgit setup-new-tree (like dpkg-setup-mergechangelogs but only does it if... X-Git-Tag: debian/1.1~26 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=b03d65e3455ddc7ec7ef7ac666693f2013841817 Provide dgit setup-new-tree (like dpkg-setup-mergechangelogs but only does it if not disabled in config). --- diff --git a/debian/changelog b/debian/changelog index 8d3cca93..5c9b4f90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,8 @@ dgit (1.1~~) unstable; urgency=low * With -DDDD, print out all gitcfg references (copious!) * Fix a debug message in the obsolete sshpsql archive access driver. * Make configuration able to prevent dpkg-mergechangelogs setup. + * Provide dgit setup-new-tree (like dpkg-setup-mergechangelogs + but only does it if not disabled in config). -- diff --git a/dgit b/dgit index a935cbfa..d8a49dbc 100755 --- a/dgit +++ b/dgit @@ -1668,6 +1668,10 @@ sub setup_mergechangelogs (;$) { rename "$attrs.new", "$attrs" or die "$attrs: $!"; } +sub setup_new_tree () { + setup_mergechangelogs(); +} + sub clone ($) { my ($dstdir) = @_; canonicalise_suite(); @@ -1697,7 +1701,7 @@ sub clone ($) { $vcsgiturl =~ s/\s+-b\s+\S+//g; runcmd @git, qw(remote add vcs-git), $vcsgiturl; } - setup_mergechangelogs(); + setup_new_tree(); runcmd @git, qw(reset --hard), lrref(); printdone "ready for work in $dstdir"; } @@ -3027,6 +3031,11 @@ sub cmd_setup_mergechangelogs { setup_mergechangelogs(1); } +sub cmd_setup_new_tree { + badusage "no arguments allowed to dgit setup-tree" if @ARGV; + setup_new_tree(); +} + #---------- argument parsing and main program ---------- sub cmd_version { diff --git a/dgit.1 b/dgit.1 index 2b626a14..c0c14504 100644 --- a/dgit.1 +++ b/dgit.1 @@ -198,6 +198,11 @@ You will need similar enough versions of dgit on the build-host and the invocation host. The build-host needs gnupg installed, with your public key in its keyring (but not your private key, obviously). .TP +.B dgit setup-new-tree +Configure the current working tree the way that dgit clone would have +set it up. Like running dgit setup-mergechangelogs (but only does it +if dgit is configured to do it automatically). +.TP .B dgit setup-mergechangelogs Configures a git merge helper for the file .B debian/changelog