mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
git-summary correctly displays project name
git-summary correctly displays project name when not executed in the top level directory of a repository. Fixes tj/git-extras#302. Uses the git-sh-setup script to find top level directory and then uses that directory name for the project name.
This commit is contained in:
parent
a618a56754
commit
bfeb897a6d
|
|
@ -1,5 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SUBDIRECTORY_OK=Yes
|
||||
source "$(git --exec-path)/git-sh-setup"
|
||||
cd_to_toplevel
|
||||
|
||||
commit=""
|
||||
test $# -ne 0 && commit=$@
|
||||
project=${PWD##*/}
|
||||
|
|
|
|||
Loading…
Reference in a new issue