Skip to content

Is there a way to split a source file into 'regions' that resolve branch/fork merges independently? #21716

Discussion options

You must be logged in to vote

Great question! Unfortunately, the answer is “not really, no.”

Source control systems since the days of our forefathers have essentially been line-oriented beasts, in that they detect differences between files using the diff utility. Since diff calculates the minimum number of lines that have to be changed to transform the “before” file into the “after” file, it often doesn’t deal super-well with structured data that isn’t strictly line-oriented, for example JSON or XML. This often creates a tension between what makes the most sense from a language-design perspective or from a “simple tools are more robust” perspective.

With that said, working in a line-oriented way works really, really w…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants