lambdalisue / vim-gina

👣 Asynchronously control git repositories in Neovim/Vim 8
http://www.vim.org/scripts/script.php?script_id=5531
MIT License
689 stars 27 forks source link

Failed to patch #292

Open lambdalisue opened 3 years ago

lambdalisue commented 3 years ago

It seems patch fails when there is no common suffix among stage, index, and worktree.

For example

|  HEAD    |  INDEX   | WORKTREE |
|+aaaaaaaa |+aaaaaaaa |          |
|+aaaaaaaa |+aaaaaaaa |          |
|          |+aaaaaaaa |+aaaaaaaa |
|          |+aaaaaaaa |+aaaaaaaa |
|+aaaaaaaa |          |          |
|+aaaaaaaa |          |          |
| XXXXXXXX | XXXXXXXX | XXXXXXXX |

works OK while the last XXXXXXXXXX are common among three but

|  HEAD    |  INDEX   | WORKTREE |
|+aaaaaaaa |+aaaaaaaa |          |
|+aaaaaaaa |+aaaaaaaa |          |
|          |+aaaaaaaa |+aaaaaaaa |
|          |+aaaaaaaa |+aaaaaaaa |
|+aaaaaaaa |          |          |
|+aaaaaaaa |          |          |

does not works while the last line is different among theee.

lambdalisue commented 2 years ago

Somehow I could not reproduce this issue. I knew there is this issue but could not reproduce it...

lambdalisue commented 2 years ago

Let me know if someone find a way to reproduce the issue.

lambdalisue commented 2 years ago

May https://stackoverflow.com/questions/4770177/git-patch-does-not-apply