1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

use fallback approach for applying patch

This commit is contained in:
Jesse Duffield
2019-11-05 13:01:58 +11:00
parent 61deaaddb7
commit 48347d4d86
3 changed files with 20 additions and 10 deletions

View File

@ -610,6 +610,7 @@ func (c *GitCommand) Diff(file *File, plain bool, cached bool) string {
}
func (c *GitCommand) ApplyPatch(patch string, reverse bool, cached bool, extraFlags string) error {
c.Log.Warn(patch)
filepath := filepath.Join(c.Config.GetUserConfigDir(), utils.GetCurrentRepoName(), time.Now().Format(time.StampNano)+".patch")
if err := c.OSCommand.CreateFileWithContent(filepath, patch); err != nil {
return err