How to --no-ff drain the bisector and blame?

The Git Workflow article says:

So you add a new rule: "When you merge into your function branch, use -no-ff to force a new commit." It does its job, and you move on.

Then one day you will find a critical manufacturing error and you need to track when it was introduced. You run in half, but continue to land at the checkpoint. You give up and investigate manually.

You reduce the error to one file. It's your fault to see how this has changed in the last 48 hours. You know its impossible, but blame reports that the file has not been touched for several weeks. It turns out that the changes in the reports during the initial fixation are to blame, and not during the merger. Your first checkpoint committed this file a few weeks ago, but the change was pulled down today.

Non-ff-strip, broken bisect and guilty secrets - all the symptoms that you use with a screwdriver as a hammer.

git merge --no-ffis the case when you prevent the direct merge of a fast forward. But, if one commit is not a direct ancestor of another, fast forward will not even take place. This is a rare development scenario. In other words, most mergers are not fast. Then, how does the transmission --no-ffdisrupt functionality bisectand blame?

+4
source share
2 answers

TL; DR

Uniting commits and --no-ffhave nothing to do with git bisector git blameas such.

- , , . git bisect git blame .

git bisect

@torek, --no-ff git bisect.

, , .

- - - . ​​ git bisect ; - - .

Linus Torvalds ,

, () () .

"" , :

.

, , . , , "git rebase" .., .

.

git blame

git blame, , , .

git blame ; , . Git , , . , .

, git blame , , .

, . , , , .

+6

, --no-ff bisect ?

, . , , , , , . :

bisect, . .

- . Bisect , , , , , , , , , bisect, . bisect, , , , , (), , git diff A B, A - , B - . , A B ?

( git blame).

( ) , " --no-ff", : " - , , ". , .

( ) , , , , , , , , . , " " are git merge --squash, ( ), 1 git commit.


1 , , git merge, git : git eatcake, , , , , , , , , , ,.

+3

Source: https://habr.com/ru/post/1621036/


All Articles