mirror of
https://github.com/NaomiAmethyst/dots.git
synced 2025-04-13 09:30:06 +00:00
simplify git-info
This commit is contained in:
parent
d5bb612daa
commit
19465cd61c
1 changed files with 2 additions and 7 deletions
9
git-info
9
git-info
|
@ -1,18 +1,13 @@
|
|||
#! /bin/sh
|
||||
# based on a script by Duane Johnson with some simplifications
|
||||
|
||||
CDPATH=`git rev-parse --show-cdup`
|
||||
GIT_DIR=`git rev-parse --git-dir`
|
||||
|
||||
# not a valid git repo? leave
|
||||
if [ $? -ne 0 ] ; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# switch to the directory holding .git
|
||||
if [ -n "${CDPATH}" ] ; then
|
||||
cd "${CDPATH}"
|
||||
fi
|
||||
|
||||
# Show various information about this git directory
|
||||
echo "== Remote URL: `git remote -v`"
|
||||
|
||||
|
@ -25,7 +20,7 @@ git branch
|
|||
echo
|
||||
|
||||
echo "== Configuration (.git/config)"
|
||||
cat .git/config
|
||||
cat "${GIT_DIR}/config"
|
||||
echo
|
||||
|
||||
echo "== Most Recent Commit"
|
||||
|
|
Loading…
Add table
Reference in a new issue