Giter VIP home page Giter VIP logo

Comments (2)

jaraco avatar jaraco commented on August 11, 2024

Replacing

#!python

if not os.path.exists(os.path.join(root, '.git')):
        return

with

#!python


    from subprocess import call, STDOUT
    import os
    if call(["git", "status"], stderr=STDOUT, stdout=open(os.devnull, 'w')) != 0:
        return

should be an appropriate fix.


Original comment by: Amit Ambasta

from setuptools_scm.

jaraco avatar jaraco commented on August 11, 2024

the intent is to quickly skip if one is not in a git related directory at all

if there is a .git folder but it invalid it will bail out as the revparse as intended

so unless there is something huge i have overseen the check works as intended right now

feel free to reopen with an direct example detailing why the check should be done as you lined out (its perfectly valid, but invokes a fork+exec instead of a stat which is what i wanted to avoid)


Original comment by: Ronny Pfannschmidt

from setuptools_scm.

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.