How can I visualize per-character differences in a unified diff file?
In git, you can merge without committing. Merge your patch first, then do: git diff –word-diff-regex=. Note the dot after the equals sign.
In git, you can merge without committing. Merge your patch first, then do: git diff –word-diff-regex=. Note the dot after the equals sign.
Both the input and output are different: git apply takes a patch (e.g. the output of git diff) and applies it to the working directory (or index, if –index or –cached is used). git am takes a mailbox of commits formatted as an email messages (e.g. the output of git format-patch) and applies them to … Read more
I found how to do a “custom” PATCH request with the previous System.Net.Http.HttpClient class here, and then fiddled with until I made it work in the Windows.Web.Http.HttpClient class, like so: public async Task<HttpResponseMessage> PatchAsync(HttpClient client, Uri requestUri, IHttpContent iContent) { var method = new HttpMethod(“PATCH”); var request = new HttpRequestMessage(method, requestUri) { Content = iContent … Read more
You already have a byte array, so you could simply modify the bytes at any given offset. $bytes = [System.IO.File]::ReadAllBytes(“C:\OldFile.exe”) $offset = 23 $bytes[$offset] = 0xFF $bytes[$offset+1] = 0xFF $bytes[$offset+2] = 0xFF [System.IO.File]::WriteAllBytes(“C:\NewFile.exe”, $bytes)
you could write a script, which diffs the given tree against a revision range in your repository. assume we first fetch the changed tree (without history) into our own repository: git remote add foreign git://… git fetch foreign we then output the diffstat (in short form) for each revision we want to match against: for … Read more
If manually editing the patch file is out of the question or infeasible, this can be done with standard options (available in git apply, git format-patch and GNU patch). -p<n> removes n leading directories from the paths in the patch. After processing -p, –directory=<root> prepends root to each of the paths in the patch before … Read more
If you’re using git add -p and even after splitting with s, you don’t have a small enough change, you can use e to edit the patch directly. This can be a little confusing, but if you carefully follow the instructions in the editor window that will be opened up after pressing e then you’ll … Read more
I am still looking for a solution or at least some guidance, even though I agree that this is outside of normal good practices. – jJack 1 hour ago I don’t have access to my deployment tools, but I will try to provide a perspective. Since I don’t fully grasp all aspects of what you … Read more
HTTP verbs are probably one of the most cryptic things about the HTTP protocol. They exist, and there are many of them, but why do they exist? Rails seems to want to support many verbs and add some verbs that aren’t supported by web browsers natively. Here’s an exhaustive list of http verbs: http://annevankesteren.nl/2007/10/http-methods There … Read more
Is this like in this git-add post? Manually editing the hunk is immensely powerful, but also a bit complicated if you’ve never done it before. The most important thing to keep in mind: The diff is always indented with one character in addition to whatever other indentation is there. The character can either be: a … Read more