-
Notifications
You must be signed in to change notification settings - Fork 317
git add --interactive fails on subdir #182
Comments
Maybe running it after setting the environment variable |
Everything done in the msysgit/git repository.
Passing a relative and absolute directory works. |
With the help of some debugging diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 32c2f9c..45b21a4 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -169,6 +169,7 @@ my %patch_modes = (
my %patch_mode_flavour = %{$patch_modes{stage}};
sub run_cmd_pipe {
+ print "args: @_\n";
if ($^O eq 'MSWin32') {
my @invalid = grep {m/[":*]/} @_;
die "$^O does not support: @invalid\n" if @invalid;
I found out that |
You are right. git status shows a long path from some changes. git add -i . on subdir with that paths fails, other subdirs with short paths works well, Is again bad windows file length design coming to bitting us? |
I'm also seeing this issue with 1.9.4.msysgit.0 @albfan I don't think it's the Windows file name max length causing an issue. The command that fails appears to be calling "git diff-index --cached --numstat --summary HEAD -- {Every_Filename}" where {Every _Filename} is a lot of files. I'm noticing the failure with ~40K of data. A quick Google search suggests the limit is 8K-1 (but might be out of date... anecdotally, I'd say the limit on Win7 might be more like 32K-1). How feasible would it be to write all the filenames into a temp file or pass them via stdin rather than on the command line? |
If you know perl it should be quite easy. What I'm actually asking myself is, why does upstream does not suffer from this bug? Okay the length limit on *nix is much longer (xargs --show-limits gives 2091634 on debian stable), but it is still no indefinite. |
The common strategy in Git is to pass arguments via |
See msysgit#182 for more details This implementation is not checked. It was created from @PhilipDavis proposal https://gist.github.com/PhilipDavis/a7e8843dad39493a698c
@dscho That doesn't seem to work here... maybe I'm doing something wrong. For instance, the following command fails with fatal: bad revision 'filename':
As far as I can tell, even when I hack the source to return the correct tracked list subset (as opposed to the entire repo tracked list), git diff-index is ignoring or failing when I pass the filenames on stdin... |
@PhilipDavis
So you have to pass a revision before the paths. |
FYI: Still reproducible with Git 2.1 built from msysgit by hand |
For anyone still interested on this thread, I just posted "a patch for a patch" (a new update to @PhilipDavis's August 2014 work). You can see it here: #218 (comment) Now "git add -p SOME_DIR" works for me 100% of the time again, no matter whether the SOME_DIR subfolder contains a dozen files or several hundred. (using today's patch) I searched my error on google many times and never found this thread. In the future I will know to come straight to github and search the issues here. However, for the sake of others, I will post my error here in the hopes that it will help somebody else find their way to this issue tracker:
(Other search terms for the SEO of this page: folder, subdirectory, directory, git add --patch pathspec, microsoft windows 7, win32, msys, bash, options) (i was always searching with "git add -p". it seems that only @juliankrispel mentioned that exact invocation on msysgit/msysgit#203) Notes about reproducing this: git add -p SmallFolder/ # succeeds In my case, here are the statistics for my FOLDER_WITH_HUGE_CONTENT:
Anyway, i hope that others can take today's patch (#218 (comment)) and run it in their msysgit environment and experience the same relief from this issue as i have! |
This will be fixed in Git for Windows 2.x via git-for-windows#305. |
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This fixes msysgit#182. Inspired by Pull Request 218 using code from @PhilipDavis. [jes: simplified code quite a bit] Signed-off-by: Kelly Heller <kkheller@cedrus.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Filtering on a path, to add interactively only files from subdir
it is a perl script. I checked I'm using perl from msysgit installation.
My version of git is the latest 1.9.2
>git --version git version 1.9.2.msysgit.0
The text was updated successfully, but these errors were encountered: