Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.2.0-rc1
-
None
-
4c7f1c5ea98fead57034826d8fe7064c55ce992f
Description
Commit the following code:
void func() { // comment1 // comment2 } void OtherFunc() { }
Now change comment2 to comment3, and add another function below OtherFunc():
void func() { // comment1 // comment3 } void OtherFunc() { } void Another() { }
Open a diff editor with 3-line context. The diff is missing the opening brace of OtherFunc. This leads to an error when trying to stage this chunk.
If there are empty (committed) lines after OtherFunc, that move Another() to a different context, the brace in the first context shouldn't appear at all, and it doesn't, but an empty line is added, and stage fails again...
See this screenshot. Line 8 shouldn't appear (it's the 4th line in the context), but it appears (and written to patch file) as an empty context line.