GithubHelp home page GithubHelp logo

Comments (5)

nulltoken avatar nulltoken commented on May 18, 2024

Hey David, this issue looks very similar to #25. Would it be a duplicate?

from libgit2sharp.

tclem avatar tclem commented on May 18, 2024

This is similar, but not exactly the same as #25. I think what @davidebbo is asking for here is to look into a single directory for a .git dir. #25 is asking for a feature that traverses up to find a parent directory that contains a .git dir.

@davidebbo - I'm all for this and actually implemented something very similar in the objective-c bindings. Might be helpful to look at if you are thinking about implementing.

from libgit2sharp.

nulltoken avatar nulltoken commented on May 18, 2024

From what I've read in the libgit2 code (libgit2/libgit2@793545e#L4R501), git_repository_discover does the following: search for a sub .git folder, tries to consider current path as a bare repo, then browse upward the tree structure repeating the same pattern. It even supports the gitdir: redirect.

So, best of both worlds?

from libgit2sharp.

davidebbo avatar davidebbo commented on May 18, 2024

I think the primary use case is indeed when passing the root of the working folder. Having it work on any sub-folder of the working folder would match the git command line behavior, though from an API point of view it would be less likely to be useful. My take is that the caller always knows the root working dir folder, and passing that is easier than having to append "./git" to it.

Anyway, for the most part this is indeed a dup of the other bug, with some slight nuances that probably don't justify tracking separately.

from libgit2sharp.

nulltoken avatar nulltoken commented on May 18, 2024

As the discussion moved toward #25, I'm closing this one.

from libgit2sharp.

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.