{"modulePath":"github.com/ROGPEPPE/MISC","version":"v0.0.0-20250114223410-f64633da4fd4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\nPackage diffgrep prints portions of unified diff output, as produced many tools including git, that match (or don't match) a given pattern. If the input is a valid unified diff, the output is too.\n\nFor example, to exclude all Go test files from some git diff:\n\n\tgit diff some-other-branch | diffgrep -v -f '_test\\.go$'\n\nUsage:\n\n\tdiffgrep regex [flags]\n\tGrep unified diff output for a pattern.\n\t  -L\texclude whole files if they contain a match\n\t  -a\tsearch context too\n\t  -d\tsearch deleted content\n\t  -f\tgrep file names instead of content\n\t  -i\tsearch inserted content\n\t  -l\tinclude whole files if they contain a match\n\t  -v\tinvert results\n\nSee [https://www.gnu.org/software/diffutils/manual/html\\_node/Detailed-Unified.html](https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html) for details of the format.\n\nCredit to [https://godoc.org/sourcegraph.com/sourcegraph/go-diff/diff](https://godoc.org/sourcegraph.com/sourcegraph/go-diff/diff) for making it possible to implement this in less than an hour.\n\n## Variables\n\n```go\nvar (\n\tLflag = flag.Bool(\"L\", false, \"exclude whole files if they contain a match\")\n)\n```\n\n","path":"github.com/ROGPEPPE/MISC/cmd/diffgrep","name":"main","synopsis":"Package diffgrep prints portions of unified diff output, as produced many tools including git, that match (or don't match) a given pattern.","isRedistributable":true}
