Hi there,
So I often come across the situation where I'm performing a 3-way merge of C/C++ files and a conflict is flagged because both of the changed files have added a new line or lines at the same point in the file.
I realise that this is actually a conflict, but there are cases in C/C++ where this can be trivially resolved. Common cases I see are where multiple include directives are added to a file or multiple variable declarations are added at the same point in a header file.
As an example
Base
My Change
Their change
Result
Therefore, is there an option I can set somewhere (possibly C/C++ specific) to supress these simple conflicts?
Any help much appreciated.
Regards
Alan
So I often come across the situation where I'm performing a 3-way merge of C/C++ files and a conflict is flagged because both of the changed files have added a new line or lines at the same point in the file.
I realise that this is actually a conflict, but there are cases in C/C++ where this can be trivially resolved. Common cases I see are where multiple include directives are added to a file or multiple variable declarations are added at the same point in a header file.
As an example
Base
Code:
#inlcude "foo.h"
Code:
#include "foo.h" #include "bar.h"
Code:
#include "foo.h" #include "baz.h"
Code:
#include "foo.h" --- This section marked as conflict --- #include "bar.h" #include "baz.h" --- This section marked as conflict ---
Any help much appreciated.
Regards
Alan
Comment