Giter VIP home page Giter VIP logo

Comments (2)

tony avatar tony commented on June 18, 2024

Git

Git.status: GitStatus :

Unitialized - this repo has no `.git/, it'd raise:

❯ git status
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

If checking git repo, raise GitFatal, suggest they run .init()

Also raise:

fatal: not a git repository: 'another-place'

Git.init

Including Git.init(bare=True)

Test idea: Git.init

Use Git.init(bare=True) when creating git repos to pull / push from

Example

git = Git(dir='path/to/my-project')
maybe: git.ensure_dir() - create directory if not exist, recursively

/tmp/test on master ❯ git --git-dir /tmp/deep/test/dir init
fatal: Invalid path '/tmp/deep': No such file or directory

Idea, use --git-dir for all Git objects

`git = Git(git_dir='myproject/.git')

git = Git(dir='myproject') implies git_dir=myproject/.git

git = Git() - requires dir or git_dir

git = Git(git_dir='/tmp/myproject')
git.init(bare=True)
git.log()
git = Git(dir='/tmp/myproject')  # Would be for `/tmp/myproject/.git`

git.log, etc. Allow formatted / structured output

Allow returning in custom formats?

from libvcs.

tony avatar tony commented on June 18, 2024

#319

from libvcs.

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.