Fakerr / git-recall

An interactive way to peruse your git history from the terminal
MIT License
2.12k stars 47 forks source link

Allow operation in a subdirectory of a repository #7

Closed Teszko closed 7 years ago

Teszko commented 7 years ago

The script exited if you ran it in a sub-directory of a repository, but git allows for the execution of commands in sub-directories. This patch adds a check to see if any parent directory contains a repository and allows to proceed if that is the case. For comparison, git's bash_completion is handled similarly. fixes #9

rgenoud commented 7 years ago

This patch also permits git-recall to work with submodules. (In submodules, .git is not a directory, it's a file). But I think the output of git rev-parse should go to /dev/null since there's nothing done with it.

Teszko commented 7 years ago

@rgenoud That's true. PR adjusted.

Fakerr commented 7 years ago

Thanks for the PR @Teszko. Merged.