From 3538250e45974480c88df3f4b2ed946ad97e896a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 4 Jan 2017 21:47:53 +0000 Subject: dgit: Do not generate bogus commits There were two places in the code where ill-formed commits were generated: both psedumerges. One is in dgit import-dsc, a fairly minor problem. The other is in --overwrite and is very bad because that's an important option. Nothing in git seems to notice, unless you run git-fsck. Even a git server does not, by default. However, some other popular git servers do reject these broken commits. I have tested this changes with git-fsck (by using the test suite patches which follow in this series) and now everything seems fine. Signed-off-by: Ian Jackson --- dgit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dgit b/dgit index 1e7c923..9d3584f 100755 --- a/dgit +++ b/dgit @@ -3538,7 +3538,7 @@ tree $tree parent $dgitview parent $archive_hash author $authline -commiter $authline +committer $authline $msg_msg @@ -5944,10 +5944,14 @@ END progress "Import, merging."; my $tree = cmdoutput @git, qw(rev-parse), "$newhash:"; my $version = getfield $dsc, 'Version'; + my $clogp = commit_getclogp $newhash; + my $authline = clogp_authline $clogp; $newhash = make_commit_text <