From 76c5ddbbfcaadad93af42530d706cf0aaea52b82 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 21 Apr 2025 22:11:20 +0100 Subject: [PATCH] patchutils: reduce diff context --- flake.nix | 2 +- patchutil/patchutil.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index b9a6233a..cc7c4890 100644 --- a/flake.nix +++ b/flake.nix @@ -49,7 +49,7 @@ inherit (gitignore.lib) gitignoreSource; in { overlays.default = final: prev: let - goModHash = "sha256-2vljseczrvsl2T0P9k69ro72yU59l5fp9r/sszmXYY4="; + goModHash = "sha256-EilWxfqrcKDaSR5zA3ZuDSCq7V+/IfWpKPu8HWhpndA="; buildCmdPackage = name: final.buildGoModule { pname = name; diff --git a/patchutil/patchutil.go b/patchutil/patchutil.go index 8132e19e..a0a94ddb 100644 --- a/patchutil/patchutil.go +++ b/patchutil/patchutil.go @@ -182,7 +182,7 @@ func Unified(oldText, oldFile, newText, newFile string) (string, error) { } newTemp.Close() - cmd := exec.Command("diff", "-U", "9999", "--label", oldFile, "--label", newFile, oldTemp.Name(), newTemp.Name()) + cmd := exec.Command("diff", "-u", "--label", oldFile, "--label", newFile, oldTemp.Name(), newTemp.Name()) output, err := cmd.CombinedOutput() if exitErr, ok := err.(*exec.ExitError); ok && exitErr.ExitCode() == 1 { -- 2.51.2