gitx
gitx copied to clipboard
Staging selected lines "index operation failed" error

Getting the above error when trying to stage certain lines. It happens most of the time.
Using this fork of gitx.
Am I doing something wrong or is this undesired? It's certainly undesirable for me.
Let me know if I can provide any more information to help resolve this issue.
Thanks :)
I've had this periodically, I tend to work around by setting the context slider to a minimum amount and staging chunks instead of individual lines. It typically clears itself up after a commit or restart; for me. I'd love to have any additional context you can add about how to reproduce this.
I have more details on how to reproduce in #85.
I've managed to reproduce with the details in #85 - but note that I could only do it if there was also no trailing newline (which I subconsciously added the first time I tried to reproduce).
I suspect then that this is an error in newline handling at some stage of the patch formatting.
A breakpoint in PBEasyPipe's + (NSString*) outputForCommand: withArgs: inDir: shows that the diff it is processing in this case is:
diff --git a/test b/test
index d163345..e1e286f 100644
--- a/test
+++ b/test
@@ -1 +1,4 @@
<%= render :partial => "login_form" %>
+
+
+Text
\ No newline at end of file
I've had some success with trying to strip that exact suffix from the diff; although I worry about it appearing naturally, I think it's far more likely that the newline is actually missing than that the diff ends with it as a context line.
I can still experience this bug in Version 0.15.1964 dev (0.15.1964)