Hitting every branch on the way down
Merge Commits, Rebasing, and History Integrity
- Many argue rebasing is safer and clearer than merging:
- Rebase produces a linear, easily understood history; every change is explicit.
- Merge introduces “sharp edges”: merge commits can contain arbitrary changes not present in parents, and many tools (e.g.,
git log -p) hide these diffs by default.
- Others stress that rebasing on shared branches is dangerous:
- One mistaken force-push can appear to “destroy” weeks of work, especially in poorly managed workflows.
- Counterpoint: true loss is rare because commits linger in reflogs and clones; the real issue is process and education.
- Common position:
- Rebase for local/feature branches, never rewrite shared/main history.
- Protect main branches; use
--force-with-leaseif force-push is allowed at all.
Merge Diff Visibility and Git UX
- Several comments highlight that merges are “just commits with multiple parents” but note:
git log -pomits merge diffs unless-m/--diff-mergesflags are used.- This can hide substantial changes inside merge commits; some report entire features being implemented only in a merge.
- Suggestion: adjust defaults or train people to use flags like
-mand--first-parent.
Semantic Difference Between #include <> and ""
- Thread clarifies typical behavior:
""searches local project paths first, then system paths.<>searches only system/include paths.
- Recommended practice from cited C resources:
- Use
""for project headers,<>for implementation/system headers.
- Use
- Some ecosystems (e.g., large internal codebases) standardize on quotes for almost everything, often because even the “system” headers are vendored and not truly system-level.
- A merge that silently changed
<>to""is seen as risky, especially when combined with a hidden merge change.
Protobuf Versioning and Design Frustrations
- Commenters find protobuf version tags confusing (parallel major versions with synchronized minors).
- Some dislike protobuf’s complexity and binary format design:
- Criticisms include lack of intuitive versioning/type handling, inefficiency for small or one-off usages, and surprising complexity vs. simpler custom or alternative schemes.
Tooling, IDEs, and Flags
- IDE abstractions (e.g., “sync” buttons) can put repos in odd states; some prefer explicit CLI or GUIs that clearly expose underlying commands.
-iquote(GCC/Clang) is proposed as a cleaner way to make headers discoverable via""without sed-based post‑processing.
Security and Supply-Chain Concerns
- Hidden changes in merge commits plus header-style changes trigger worry after high‑profile supply‑chain attacks.
- Some see this as a major red flag; others think widespread malicious infiltration is possible but detection before “activation” is inherently hard.