Skip to main content

All Questions

Tagged with
1 vote
1 answer
804 views

Why is `-p1` to `patch` here?

For revert the changes to a file in a commit, from https://stackoverflow.com/a/2620822/156458 #!/bin/bash function output_help { echo "usage: git-revert-single-file <sha1> <file>" } ...
Tim's user avatar
  • 106k
0 votes
2 answers
894 views

Patching diff-files

I've downloaded a tarballed version of 0.85 "MTR" -> http://www.bitwizard.nl/mtr/ and installed it. I later saw that a 0.86 diff file exists. I downloaded this in order to patch it, but am confused ...
Krukan459's user avatar
45 votes
6 answers
79k views

How to fix "Hunk #1 FAILED at 1 (different line endings)" message?

I am trying to create a patch with the command git diff sourcefile >/var/lib/laymab/overlay/category/ebuild/files/thepatch.patch when I apply the patch, it gives me $ patch -v GNU patch 2.7.5 $ ...
user1709408's user avatar
26 votes
3 answers
6k views

Display only relevant hunks of a diff/patch based on a regexp

git log -G<regex> -p is a wonderful tool to search a codebase's history for changes that match the specified pattern. However, it can be overwhelming to locate the relevant hunk in the diff/...
wrksprfct's user avatar
  • 373