Code Monkey home page Code Monkey logo

git-redate's People

Contributors

4ndrej avatar aaronvasquez avatar agsdot avatar clagix avatar edmundmai avatar jordiprats avatar olivergg avatar prince-chrismc avatar t0r0x avatar udhos avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

loelkes

git-redate's Issues

Improve `is_git_repo()` function mechanism of checking git repo to support newest `git` behavior

Description:
If you run git redate inside directory owned by another user, git will exit with error and printing message like this:

fatal: unsafe repository ('/path/to/project/folder' is owned by someone else)
To add an exception for this directory, call:

        git config --global --add safe.directory /path/to/project/folder

- that's new behavior of git, more info:
https://github.blog/2022-04-12-git-security-vulnerability-announced/
https://stackoverflow.com/questions/71849415/i-cannot-add-the-parent-directory-to-safe-directory-in-git

Proposal:
Improve is_git_repo function to handle this type of error

git-redate/git-redate

Lines 6 to 13 in 0b4a12d

is_git_repo() {
git rev-parse --show-toplevel > /dev/null 2>&1
result=$?
if test $result != 0; then
>&2 echo 'Not a git repo!'
exit $result
fi
}

Ref to upstream repository's issue: PotatoLabs#35

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.