0

Is it better to "Show merge commits in per-file log", or not. I'm trying to decide what to choose in Xcode Source Control. I'm not sure what that means. Xcode help doesn't give an answer, and instead gives me a link to search the web. I am the only one using this repository. It is unlikely that this repository will be used by more than one programmer. Is this selection able to be changed later down the road?

daniel
  • 1,446
  • 3
  • 29
  • 65
  • I can't really answer the XCode question, but I'll note that Git doesn't actually *have* a "per file" log. Git stores commits, not files; each commit has a full snapshot of *every* file; and many commits store unchanged files (which they de-duplicate so that they take no *space* but they're logically still in each commit). To see a "per file" log in raw Git, Git has to march through the commits, one pair at a time, and compare: is file F identical in parent and child? If so, don't mention this commit. This breaks down with merge commits because merge commits have *two* parents, not one. – torek Apr 10 '22 at 01:41
  • With the `git log` command, you'd add `-m` to make it report merges in which the file is different in the merge result snapshot,as compared to either or both of the two input parent commit snapshots. Since each invocation of `git log` is something you type in at the terminal, you choose to add `-m`, or not, each time you run it. XCode is presumably emulating this somehow. The details, however, will matter. – torek Apr 10 '22 at 01:42

0 Answers0