Issue 2389 in tortoisegit: Bad file number problem

14 views
Skip to first unread message

torto...@googlecode.com

unread,
Dec 24, 2014, 3:11:43 AM12/24/14
to tortois...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2389 by luoyongg...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

Sometimes, when use tortoisegit to pull things, it's always raising the
following error:

git.exe pull -v --no-rebase --progress "origin"

/usr/libexec/git-core/git-sh-setup: line 83: /usr/bin/sed: Bad file number
From https://ksobj-gitserver.kingsoft.cn/r/bolt
= [up to date] master -> origin/master
C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 268:
/usr/bin/tr: Bad file number
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.


git did not exit cleanly (exit code 1) (1123 ms @ 2014/12/24 16:06:01)


Solution:
解决 TortoiseGit 诡异的 Bad file number 问题
http://blog.csdn.net/renfufei/article/details/41648061


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

torto...@googlecode.com

unread,
Dec 24, 2014, 7:41:31 AM12/24/14
to tortois...@googlegroups.com

Comment #1 on issue 2389 by yuelinho...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

I have reviewed that link, also reviewed this link
https://github.com/cncounter/translation/blob/master/tiemao_2014/GitHelp/05_BadFileNumber.md

I have tried to pull from a local bare repo, but can not reproduce it.
I have tried to pull from a GitHub testing repo, but can not reproduce it.

@luoyonggang
Could you please try to provide some testing repo?

torto...@googlecode.com

unread,
Dec 24, 2014, 9:18:29 AM12/24/14
to tortois...@googlegroups.com

Comment #2 on issue 2389 by luoyongg...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

That's really bad, It's not reproduciable, because for the SAME repo, I
clone it again,
The problem is apprear in my computer, but it's will gone in other computer,
This is a sudden problem, and we can not reproduce it with specific
repository.

torto...@googlecode.com

unread,
Dec 25, 2014, 9:00:34 AM12/25/14
to tortois...@googlegroups.com

Comment #3 on issue 2389 by yuelinho...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

@luoyonggang

1.
What version of TortoiseGit and Git for Windwo(msysgit) are you using?
Is Git for window 1.9.5?

2.
Is Git for window installed at defalut path?

3.
Could you please save/backup the following files to somewhere:
C:\Program Files (x86)\Git\libexec\git-core\git-pull
C:\Program Files (x86)\Git\libexec\git-core\git-sh-setup
C:\Program Files (x86)\Git\bin\sed.exe
C:\Program Files (x86)\Git\bin\tr.exe

Then, install Git for Window 1.9.5 (if it is already 1.9.5, then install
again)
Compare above files with new files. Check if they are identical.

---

Currently, the last test I did:
1. create a fake sed.exe
which files size is 0
(C:\Program Files (x86)\Git\bin\sed-fake.exe)

2. create a fake tr.exe
which files size is 0
(C:\Program Files (x86)\Git\bin\tr-fake.exe)

3. modify line 83 of "git-sh-setup"
sed -> sed-fake

4. modify line 268 of "git-pull"
tr -> tr-fake

then, the following message is created:

git.exe pull -v --no-rebase --progress "origin"

/libexec/git-core/git-sh-setup: line 83: /bin/sed-fake: Bad file number
From D:\TGit\_Issue\i2389\Remote
= [up to date] master -> origin/master
= [up to date] test -> origin/test
C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 268:
/bin/tr-fake: Bad file number
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.


git did not exit cleanly (exit code 1) (26208 ms @ 2014-12-25 21:46:11)


So, "Bad file number" might be the key.

torto...@googlecode.com

unread,
Dec 25, 2014, 11:55:37 AM12/25/14
to tortois...@googlegroups.com

Comment #4 on issue 2389 by yuelinho...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

Does the git bash "git.exe pull -v --no-rebase --progress "origin"" work?

torto...@googlecode.com

unread,
Jan 31, 2015, 8:19:30 AM1/31/15
to tortois...@googlegroups.com
Updates:
Status: Invalid

Comment #5 on issue 2389 by sstrickr...@googlemail.com: Bad file number
problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

No response for a long time. If this issue is still valid for you please
add a new comment with the requested information.

torto...@googlecode.com

unread,
Jan 31, 2015, 9:38:44 PM1/31/15
to tortois...@googlegroups.com

Comment #6 on issue 2389 by yuelinho...@gmail.com: Bad file number problem
https://code.google.com/p/tortoisegit/issues/detail?id=2389

@sstrickroth
I did some search(maybe month ago).
and got 4 occurrences:
1. 2014-10-14 - V2EX (http://www.v2ex.com/t/138824)
2. 2014-11-11 - ITeye (http://lhdst-163-com.iteye.com/blog/2154480)
3. 2014-11-13 - 京东代码库
(http://bbs.zone.jd.com/forum.php?mod=viewthread&tid=4476)
4. 2014-11-25 - 不羁虫 (http://www.bujichong.com/m/68#comment-76)

I contact one of them, did some test. unforturnally, no much info.
Reply all
Reply to author
Forward
0 new messages