2

I've been trying to git archive a new version of the system I'm currently working on, but, suddenly, the git archive command, which I used to use, stopped working.

I use the git archive followed by the git diff + filters, that is necessary only to get the diff between the tagged versions.

Right now, I can't generate the archive (a zip package) containing the version changes because of this error: sh.exe": /bin/git: Bad file number

I tried the git diff + filters (ACMRT and stuff) and it shows me the correct diff, so, I discarted the problem with the diff. Later, I tried the `git archive only, with a test file, and it worked aswell. But if I use both together, it gives me the error.

Have anyone seen anything like this?

Thanks!

Armando Freire
  • 417
  • 2
  • 7
  • 19
  • Which Os (Linux I presume) and git version are you using? I always see that message `Bad file number` in relation with connection issues (ssh mostly or https). I have only see it in a different contaxt once: http://git.661346.n2.nabble.com/Challenge-with-Git-Bash-td5306355.html – VonC Sep 18 '13 at 05:50
  • @VonC I'm using Windows 8 x64 and for git --version: `git version 1.8.3.msysgit.0` – Armando Freire Sep 18 '13 at 13:28
  • Can you quickly check if the issue persists with a msysgit 1.8.4? – VonC Sep 18 '13 at 13:51
  • @VonC still the same issue. As far as I remember, I also upgraded to 1.8.3 thinking that maybe the bug could be solved (if it's even a bug, idk). I've checked the commited files (afaik the files should not have empty spaces in its names), corrupted files, folders, and stuff, and I found nothing weird... – Armando Freire Sep 18 '13 at 14:05
  • Quite strange... Any chance to reset the process with a full archive, and see if future archive+diff work better, starting after that new full archive? – VonC Sep 18 '13 at 14:10
  • Yeah, since the last version I had to generate a standalone package for upgrading, but it causes an unnecessary upgrading proccess: sometimes just one or two modules were updated and the whole system has to be replaced. I wonder what could I do in order to reset the git archive process (if it is possible) to make it ignore completely the oldest versions and pick only the difference between the tags. Actually this is exactly what Git should be doing. EDIT: Is there a limited number of files to use git archive? I realized that I moved a bunch of files many times, on the previous versions. – Armando Freire Sep 18 '13 at 14:21
  • No limit that I know of. – VonC Sep 18 '13 at 14:23
  • I see... I found some answers, but they're all related to connection problems when getting this error. Perharps I should open a Ticket Bug on Git forums. – Armando Freire Sep 18 '13 at 15:00
  • Yes, that would be wise. I mentioned the connection errors in my first comment above. – VonC Sep 18 '13 at 15:02

1 Answers1

0

The exact command that triggered the error was:

git archive -o ./TAGver.zip TAGver $(git diff --name-only startTAGver endTAGver --diff-filter [AMCRT])

Git says nothing usefull, except a bunch of weird commands that results in the same error: Bad File Number.
As I mentioned, both commands must be used together, as I was using before, in order to package the correct files.

You had a similar error here and here.

I did not reproduce the issue with more recent version of Git (2.18/2.19-rc0).
Plus, there is now the option to run Git for Linux on Windows with WSL.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250