{"thread":{"id":"13116","subject":"Splitting code between files and then merging","startedAt":"2008-04-15T01:22:34Z","lastAt":"2008-04-15T01:22:34Z","messageCount":1,"participants":["nathan bullock"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"74400","messageId":"916b88c10804141822m45588ae9x7492867b749cc53c@mail.gmail.com","threadId":"13116","inReplyTo":null,"subject":"Splitting code between files and then merging","fromName":"nathan bullock","fromEmail":"nathanbullock@gmail.com","sentAt":"2008-04-15T01:22:34Z","receivedAt":"2008-04-15T01:22:34Z","isPatch":false,"sender":{"key":"nathanbullock@gmail.com","avatar":"https://gravatar.com/avatar/d8d2714dc203db6b899a705e72b8b38a90bf78593022b744cecb8eb003c70a67?d=mp&s=160"},"body":"I have been playing around with various merge situations and things\ndon't seem to be working quite as I expected.\n\nIf I have a repository with a file such as:\n\n### file abc ###\nvoid\nfoo(){\n  int x;\n  func(x);\n}\n\nvoid\nmoo(){\n  int y;\n  func(y);\n}\n\nAnd then clone that repo and in my clone I edit things so that I have two files:\n\n### file abc ###\nvoid\nfoo(){\n  int x;\n  func(x);\n}\n\n### file bcd ###\nvoid\nmoo(){\n  int y;\n  func(y);\n}\n\nI commit this.\n\nThen I do a git blame -C -C6 bcd\n(If I make these functions larger I can get away with just a single -C)\n\nIt seems to be able to determine that all of the lines in both files\noriginated from the file abc.\n\nNow the problem is that if I make a change to the function moo in the\nfile abc in the original repo and the try to pull it into the second\nrepo I always get merge conflicts. Is this expected? Do any of the\nvarious merge algorithms in git handle these situations?\n\nNathan Bullock\n"}]}