New git diff compaction heuristic isn't working

前端 未结 2 1369
感情败类
感情败类 2020-12-10 17:15

Update

This is solved now, thanks to @torek\'s answer

I needed to have more lines above the new addition so that Git could move up the diff\'ed block, and

2条回答
  •  长情又很酷
    2020-12-10 18:16

    I have not played with the new features yet, so this may need anywhere from a grain of salt to a full salt lick, but:

    Any ideas on what I'm missing here?

    The description specifically says that git diff hunks are moved up until reaching a blank line. There is no blank line above line 1; if there were, that might suffice. (It might require even more "above" context—which need not be blank—since the norm is to include three lines of context above and below, and it's not clear from the brief description whether the "moving up" will be stymied by the lack of additional lines.)

提交回复
热议问题