<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 30, 2022 at 8:50 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/29/22 04:35, Moritz C. Weber wrote:<br>
> ---<br>
>  toys/pending/wget.c | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
Sorry for the delay applying these, git is really stupid sometimes:<br>
<br>
$ git am one.eml<br>
fatal: Dirty index: cannot apply patches (dirty: toys/other/chvt.c)<br>
<br>
I did a git rm toys/other/chvt.c because I'm merging it into toys/other/openvt.c<br>
(putting all three text mode vt commands in the same file), and I haven't<br>
finished that yet so it won't let me "git am" to a COMPLETELY DIFFERENT FILE.<br>
(For no obvious reason.)<br>
<br>
It's queued, sorry 'bout that. Gotta finish something else first...<br>
<br>
Rob<br>
<br>
P.S. I'm sure there's a way to back out a "git rm" you haven't commited yet, but<br>
it's sort of non-obvious. There's the repository state, and the working tree<br>
state, and a sort of limnal state of pending changes between the two that "git<br>
mv" and such affect. </blockquote><div><br></div><div>iirc it's basically `git checkout -- whatever.c && git add whatever.c` to un-rm. if you haven't committed, i think `git status` actually tells you the undo command (though iirc they use reset rather than checkout or something?).</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And this doesn't even get into "stash". I don't really use<br>
"stash" because I don't understand it well enough...<br></blockquote><div><br></div><div>if you only use `git stash` and `git stash pop` (and don't need anything more complicated than a strict stack) it's pretty easy, but i only really use it as "please ignore my work in progress while pulling other changes".</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
P.P.S. Did you know that git's patch format can rename files?<br>
<a href="https://unix.stackexchange.com/questions/671081/how-to-create-a-patch-for-renaming-a-file" rel="noreferrer" target="_blank">https://unix.stackexchange.com/questions/671081/how-to-create-a-patch-for-renaming-a-file</a><br>
I've meant to add support for that to toybox/busybox patch forever, but the real<br>
question is how "diff" should figure out a file's been renamed. Especially if it<br>
has small changes to it, such as "default n" becoming "default y" like I do when<br>
promoting commands out of pending. It's on the todo list...<br>
_______________________________________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net" target="_blank">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer" target="_blank">http://lists.landley.net/listinfo.cgi/toybox-landley.net</a><br>
</blockquote></div></div>