diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-04 21:47:53 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-04 22:11:08 +0000 |
commit | 3538250e45974480c88df3f4b2ed946ad97e896a (patch) | |
tree | 31cdde6172c75a3575e3307568e2837e1647e1ae | |
parent | 134da599810337360905240c673ab074f3f1427b (diff) |
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 <ijackson@chiark.greenend.org.uk>
-rwxr-xr-x | dgit | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 <<END; tree $tree parent $newhash parent $oldhash +author $authline +committer $authline Merge $package ($version) import into $dstbranch END |