Coder Social home page Coder Social logo

Comments (4)

mhagger avatar mhagger commented on May 28, 2024

That's strange. I think that the only time we use that option is when running

git -C . rev-parse --git-dir

The -C option seems to have been supported by git since very old versions. So my suspicion is that the thing that is getting run is not standard git itself but rather some wrapper script or something that doesn't handle that option.

Which version of git-sizer are you using?

What happens if you type which -a git in the repository directory? What version of Git does it find? Is it possibly a script or something that doesn't pass all arguments through? What happens if you run the above rev-parse command in the repository directory?

If none of those steps gives a clue, another possibility would be to run git-sizer under strace to see exactly what command execution is provoking the problem.

from git-sizer.

antonellagarzilli avatar antonellagarzilli commented on May 28, 2024

The output of which -a git is /usr/bin/git and version is git version 1.8.3.1. The version of git-sizer is git-sizer build v1.4.0.

I have run strace, I have only found epoll_pwait(4, error: couldn't open Git repository: git rev-parse failed: Unknown option: -C, I can show you the full output of strace if needed.

from git-sizer.

mhagger avatar mhagger commented on May 28, 2024

Thanks for the additional info.

I have run strace, I have only found epoll_pwait(4, error: couldn't open Git repository: git rev-parse failed: Unknown option: -C, I can show you the full output of strace if needed.

Make sure that you run strace with the -f option, in which case you should see an execve line something like

18575 execve("/usr/bin/git", ["/usr/bin/git", "-C", ".", "rev-parse", "--git-dir"], 0xc0000d8280 /* 73 vars */ <unfinished ...>

If I run that command in a non-bare repository directory, it succeeds like this:

$ /usr/bin/git -C . rev-parse --git-dir
.git

If I run that command in a bare repository directory, it succeeds like this:

$ /usr/bin/git -C . rev-parse --git-dir
.

Does the same command appear in the strace output for you? If so, what happens when you run it?

It's probably worth trying a more modern version of git. The version that you are using is from 2013. The current version is 2.32. But it would still be helpful if you would help diagnose this problem; maybe it's not version related and/or maybe it would be easy to get it working with older versions of git.

from git-sizer.

mhagger avatar mhagger commented on May 28, 2024

Please reopen this issue if you gather more information.

from git-sizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.