Home > Enterprise >  Can't use "Git add -i"
Can't use "Git add -i"

Time:10-28

Trying to patch a file to last commit, so I run "git add -p" and "git add -i", but received the following error:

Output

That is:

D:\Working\test>git add-i
      0 [main] perl 375 child_copy: stack write copy failed, 6xFFFFC480..8x10000000e, done 6444523849, windows pid 15080, Win32 error 5
      [main] perl 375 child_copy: stack write copy failed, exFFFFC480..9x1000eeeee, done 6444523049, windows pid 15880, Win32 error 5
    481 [main) perl 375 dofork: child 376 - pid 13800, exitval ex183, errno 11 
     Can't fork, trying again in 5 seconds at C:/Program Files/Git/ming64/share/per15/Git.pm line 1647.
     main) perl 375 dofork: child 377 pid 4888, exitval ex103, errno 11 Can't fork, trying again in 5 seconds at C:/Program Files/Git/mingw64/share/per15/Git.pm line 1647.

D:\Working\test>git add -p
    0 [main] perl 9 child_copy: stack write copy failed, exFFFFC460..ex1eeeeeeee, done 6444523849, windows pid 7892, Min32 error S ses [main] perl 9 dofork: child 10 pid 11876, exitval ex183, errno 11
    Can't fork, trying again in 5 seconds at C:/Program Files/Git/mingw64/share/per15/Git.pm line 1647. 5033325 [main] perl 9 child 
     copy: stack write copy failed, exFFFFC460..9x100000000, done 6444523849, windows pid 7892, Win32 error 5 5033826 [main] perl 9 dofork: child 11 - pid 12220, exitval ex103, errno 11 Can't fork, trying again in 5 seconds at C:/Program Files/Git/ming 64/share/per15/it.pm line 1647.

Tried to uninstall and install Git, but the issue still persist.

CodePudding user response:

Thanks to comment of @torek, I managed to use the commands after installing Per

You should not have.

  1. The latest versions of Git for Windows no longer use Perl for git add (mingw64/libexec/git-core/git-add.exe). This is rewritten in C since Git 2.25, Q1 2020.
  2. perl.exe is part of the Git for Windows distribution: make sure your %PATH% includes C:\path\to\Git\usr\bin

There is no need to install Perl for Git to run.

  • Related