Extended headers in git diffs break patch parsing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Colin Watson |
Bug Description
https:/
MalformedPatc
'new file mode 100644\n'
Traceback (most recent call last):
Module lazr.jobrunner.
self.
Module lp.services.
super(
Module lazr.jobrunner.
job.run()
Module lp.code.
mailer = CodeReviewComme
Module lp.code.
code_
Module lp.code.
self.
Module lp.code.
inline_
Module lp.code.
diff_lines, allow_dirty=True, keep_dirty=True)
Module lp.code.
patch_
Module lp.code.
(orig_name, mod_name) = get_patch_
Module lp.code.
raise MalformedPatchH
MalformedPatchH
'new file mode 100644\n'
The relevant bit of the patch looks something like:
diff --git a/foo b/foo
new file mode 100644
Anything with an extended header line that doesn't start with "index " will do this. git documents quite a few of these, in Documentation/
Related branches
- Kit Randel (community): Approve
-
Diff: 89 lines (+20/-5)2 files modifiedlib/lp/code/mail/patches.py (+11/-0)
lib/lp/code/mail/tests/test_codereviewcomment.py (+9/-5)
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Fixed in stable r17835 <http:// bazaar. launchpad. net/~launchpad- pqm/launchpad/ stable/ revision/ 17835>.