Git Product home page Git Product logo

Comments (2)

spenserblack avatar spenserblack commented on May 30, 2024

Would it be possible to read repository information from a bare git repository?

Not as long as we use tokei, since that uses the actual files in the repository's directory, not the files in the git history. Though we might switch to a tool that can read bare repos.

Though we're still figuring out what the "source" for the files should be after the switch (e.g. #1152 (comment)).

from onefetch.

spenserblack avatar spenserblack commented on May 30, 2024

Sorry, I got a bit tunnel-visioned, I just realized, besides building language stats, onefetch reads files from "non-bare" repositories for

  • Manifests (package.json, Cargo.toml)
  • License files

So, besides #1305 (supersedes #1152), we'd have to update those utilities to read from a git commit/index. I don't think these stats will break, but they won't be included until those are updated as well.

Also, if I'm not mistaken, our call to gix::ThreadSafeRepository::discover_opts doesn't currently support bare repos and would need to be updated:

onefetch/src/info/mod.rs

Lines 113 to 120 in 3cdc171

let mut repo = gix::ThreadSafeRepository::discover_opts(
&cli_options.input,
gix::discover::upwards::Options {
dot_git_only: true,
..Default::default()
},
Mapping::default(),
)?

from onefetch.

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.