Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Pull Fatal Error #318

Closed
Solanar opened this issue Aug 25, 2015 · 8 comments
Closed

Git Pull Fatal Error #318

Solanar opened this issue Aug 25, 2015 · 8 comments
Labels

Comments

@Solanar
Copy link

Solanar commented Aug 25, 2015

This is a fresh install of Git For Windows: Git-2.5.0-64-bit.exe on Windows 10 (64 bit)

git --version: git version 2.5.0.windows1

When I run git pull (both outside and inside repos) I get the following message:

fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?

I have traced it to . git-sh-setup specifically:

eval "$(
    echo "$OPTIONS_SPEC" |
        git rev-parse --parseopt $parseopt_extra -- "$@" ||
    echo exit $?
)"

@dscho requested I insert set -x before that line which outputs:

+++ echo 'git pull [options] [<repository> [<refspec>...]]

Fetch one or more remote refs and integrate it/them with the current HEAD.
--
v,verbose                  be more verbose
q,quiet                    be more quiet
progress                   force progress reporting

  Options related to merging
r,rebase?false|true|preserve incorporate changes by rebasing rather than merging
n!                         do not show a diffstat at the end of the merge
stat                       show a diffstat at the end of the merge
summary                    (synonym to --stat)
log?n                      add (at most <n>) entries from shortlog to merge commit message
squash                     create a single commit instead of doing a merge
commit                     perform a commit if the merge succeeds (default)
e,edit                       edit message before committing
ff                         allow fast-forward
ff-only!                   abort if fast-forward is not possible
+++ git rev-parse --parseopt --stuck-long --
verify-signatures          verify that the named commit has a valid GPG signature
s,strategy=strategy        merge strategy to use
X,strategy-option=option   option for selected merge strategy
S,gpg-sign?key-id          GPG sign commit

  Options related to fetching
all                        fetch from all remotes
a,append                   append to .git/FETCH_HEAD instead of overwriting
upload-pack=path           path to upload pack on remote end
f,force                    force overwrite of local branch
t,tags                     fetch all tags and associated objects
p,prune                    prune remote-tracking branches no longer on remote
recurse-submodules?on-demand control recursive fetching of submodules
dry-run                    dry run
k,keep                     keep downloaded pack
depth=depth                deepen history of shallow clone
unshallow                  convert to a complete repository
update-shallow             accept refs that update .git/shallow
refmap=refmap              specify fetch refmap
'
+++ echo exit 127
++ eval 'exit 127'
+++ exit 127
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
@dscho
Copy link
Member

dscho commented Aug 26, 2015

Thank you. Could you also insert a type git.exe before the eval line? (You can remove the set -x now...)

@Solanar
Copy link
Author

Solanar commented Aug 26, 2015

type git.exe before the eval:

git.exe is /mingw64/libexec/git-core/git.exe
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?

@dscho
Copy link
Member

dscho commented Aug 26, 2015

Hmm. This is bad. Exit code 127 means that the command cannot be found... But yours is found.

Can you execute /mingw64/libexec/git-core/git.exe rev-parse --parseopt --stuck-long -- manually?

@dscho
Copy link
Member

dscho commented Aug 26, 2015

Actually, you probably want to pipe something into it:

echo 123 | /mingw64/libexec/git-core/git.exe rev-parse --parseopt --stuck-long --

It outputs fatal: premature end of input here.

@Solanar
Copy link
Author

Solanar commented Aug 26, 2015

I get the same output with echo 123: fatal: premature end of input
If I put a decent git help example:

test [output]\

--
h       help
echo "test [options]\

--
h       help" | git rev-parse --parseopt --stuck-long --

I get: set -- --
or

echo "test [options]\

--
h       help" | git rev-parse --parseopt --stuck-long -- ""

I get: set -- -- ''

echo "test [options]\

--
h       help" | git rev-parse --parseopt --stuck-long -- "-h"

Output:

cat <<\EOF
usage: test [options]

       -h                                help
EOF

@dscho dscho added the unclear label Aug 26, 2015
@dscho
Copy link
Member

dscho commented Aug 26, 2015

Is there any chance I could get access to your machine to debug this issue?

@Solanar
Copy link
Author

Solanar commented Aug 26, 2015

When it comes down to it this is a work machine and I don't think I can get away with that. I can skype and share screens and enter commands you tell me to. I know that can be frustrating though.

@dscho
Copy link
Member

dscho commented Aug 27, 2015

FWIW I tried again on Windows 10 (x86) and could not reproduce the issue, either.

I can skype and share screens and enter commands you tell me to

Let's do that, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants