-
Notifications
You must be signed in to change notification settings - Fork 315
workaround for issue 182 (git add -p or git add -i with a subdirectory) #354
Conversation
inspired by pull request 218 using code from @PhilipDavis
The initial content of this pull request (commit 5fd4faa) has some changes compared to my original patch (original: #218 (comment)). On the line that called I used the Lastly, after testing on 3 different computers, I found that 2 of them needed Disclaimer: I am woefully unfamiliar with the source code of git (both the perl code and the c code). This patch was arrived at only because I encountered the older pull request #218 and then desperately poked at it until I could use "git add -p SUBDIR" again (which is by far my most-used git command on any given day). |
Just in case, I will once again note the conditions of the large repo that led me into the "git add -p" failure in the first place: git add -p SmallFolder/ # succeeds the statistics for my FOLDER_WITH_HUGE_CONTENT: find FOLDER_WITH_HUGE_CONTENT/ | wc -l produces a line count of 505. find FOLDER_WITH_HUGE_CONTENT/ | wc -c produces a char count of 21734. |
To anyone interested: i am happy to add you as a "collaborator" (granted push access) to my forked repo that was forked for the sole purpose of making this pull request. This way others can continue editing this same request. You can add more commits by pushing to the msysgit_issues_182 branch on kkheller/git. Anyone interested: just ask! I will grant. (@dscho is already added as collaborator.) |
MSysGit - the development behind Git for Windows » git #282 SUCCESS |
Yep, I think quoting is a good thing, we probably need to handle file names containing quotes, too, though. How about a completely different strategy, though? Most of Git tries to separate input to BTW I think you also need to pass the And yes, I think you always need |
I guess the main two concerns are:
|
…ince that is all we need it for. also closing the file handle.
Three things I did today:
@dscho was right: we need to verify that a Good news: the guarantee appears to be solid. I only see calls to Wherever
There are two exceptions, but that is ok (explanation follows). The two exceptions are:
Those are ok, because for the code in this patch to be executed, the following has to be true: |
MSysGit - the development behind Git for Windows » git #283 SUCCESS |
Sorry to let this slip for so long! |
Moving to git-for-windows#305, as Git for Windows 1.x was retired and enjoys playing with the grand children now. |
inspired by pull request 218 using code from @PhilipDavis