Re: [PATCH] git-rm: Fix to properly handle files with spaces, tabs, newlines, etc.
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:20
Carl Worth [off-list ref] writes:
Please ignore the previous patch. This is what I intended to send.
Ahh. I was wondering...
(For as useful as the index is---and yes, I have found it very useful---I still find it easy to inadvertently commit stale data with it. I guess what might help me is a command to update into the index all files that are currently in the "updated but not checked in (will commit)" state as reported by git status. Does such a command exist?)
No. I do not do this myself, but this one-liner should work: git diff --name-only "$@" | git update-index --stdin [from another message]
PS. What's the syntax/tool support for just replying to an existing message, and at the end inserting a patch with its own subject and commit message? Here I've manually whacked the subject and put the commit message above my reply (in the style of git-format-patch) but that seems inelegant.
YMMV depending on the MUA you use, of course. I start [REPLY], have my MUA quote the original and write response while trimming excess quote, just as usual. When I need to add a patch, then I remove all that with \C-w (kill-region), read a format-patch output into the same mail buffer, and then \C-y (yank) to paste the "usual correspondence" part below the three-dash lines. Yes, it's all manual. I presume it would be easy to write a few-liner Emacs macro to do this though...