광고
광고

SKIDIA's PaperBoy

EN WIRE · 2026-09-22 02:38

Git Flags Duplicate Ticket Work Only When Patches Touch the Same Lines, Leaving the Rest to Human Review

Mostly True

When two developers independently implement the same task on separate branches, Git does not raise an alarm on its own. According to the merge semantics laid out in the project's own documentation, the version control system objects only if the resulting patches happen to edit the same lines. Beyond that single line-level tripwire, the safeguard is code review — and that, too, catches duplicated work only when the reviewer is familiar with both tickets.

원문 주장 (KR)
Git only notices if the resulting patches happen to touch the same lines and the review only catches it if they are familiar with both tickets.

Silent merges are the default

Git's merge machinery operates at line granularity. A three-way merge compares two branches against their common ancestor and combines changes that do not collide; the Pro Git book illustrates this with diagrams of divergent histories converging cleanly. Two patches that implement the same feature in different files — or in different regions of the same file — meet no resistance and merge without a warning.

The one automated tripwire is collision. When both patches modify the same lines, Git declares a conflict and forces a developer to reconcile them. That moment is the only point at which version control itself notices that two strands of work may be the same strand of work.

Review depends on knowledge of both tickets

Once a clean merge has gone through, detection shifts entirely to code review. A reviewer examining a single pull request sees one implementation, not the parallel history behind it. The duplicate surfaces only if that reviewer happens to know both tickets — the one already landed and the one in flight.

Teams that spread ticket ownership across squads, or across time, have no structural mechanism that surfaces the overlap for them. The result is that duplicate code can accumulate not because tooling failed loudly, but because it succeeded quietly — applying two patches that never needed to meet.

For engineering organizations running parallel workstreams, the practical takeaway is procedural rather than technical: assign overlapping tickets carefully, and treat merge conflicts not as an annoyance but as the rare automated signal Git actually provides.

The picture that emerges — Git silent except for line collisions, and human review effective only when the reviewer knows both tickets — is Mostly True.

Sources — primary documents (12)
  1. https://git-scm.com/docs/git-merge
  2. https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
  3. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts
  4. https://soft.vub.ac.be/~wmuylaer/repository/2023scam.pdf
  5. https://arxiv.org/abs/2310.02395
  6. https://dl.acm.org/doi/10.1145/3546944
  7. https://par.nsf.gov/biblio/10515782-characterization-study-merge-conflicts-java-projects
  8. https://arxiv.org/abs/2111.11904
  9. https://www.microsoft.com/en-us/research/publication/expectations-outcomes-and-challenges-of-modern-code-review/
  10. https://homes.cs.washington.edu/~mernst/pubs/vc-conflicts-tse2013-abstract.html
  11. https://par.nsf.gov/biblio/10515782
  12. https://git-scm.com/images/[email protected]

KR: /news/ · 판정: 대체로 사실