From 9a3f9b98d7c820bbbfe093c13784694c05f1659d Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Thu, 5 Sep 2013 22:41:07 -0500 Subject: [PATCH] new git_info script reports on repository, added cygwindrive mounter function for windows. --- scripts/core/functions.sh | 6 +++++ scripts/rev_control/git_info.sh | 40 +++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 scripts/rev_control/git_info.sh diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 88f3d315..62e92d5b 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -319,6 +319,12 @@ if [ -z "$skip_all" ]; then regenerate } + function add_cygwin_drive_mounts() { + for i in c d e f g h q z ; do + ln -s /cygdrive/$i $i + done + } + function function_sentinel() { return 0; } if [ ! -z "$SHELL_DEBUG" ]; then echo function definitions end....; fi diff --git a/scripts/rev_control/git_info.sh b/scripts/rev_control/git_info.sh new file mode 100644 index 00000000..4caf0f49 --- /dev/null +++ b/scripts/rev_control/git_info.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# author: Duane Johnson +# email: duane.johnson@gmail.com +# date: 2008 Jun 12 +# license: MIT +# +# Based on discussion at http://kerneltrap.org/mailarchive/git/2007/11/12/406496 + +pushd . >/dev/null + +# Find base of git directory +while [ ! -d .git ] && [ ! `pwd` = "/" ]; do cd ..; done + +# Show various information about this git directory +if [ -d .git ]; then +echo "== Remote URL: `git remote -v`" + +echo "== Remote Branches: " +git branch -r +echo + +echo "== Local Branches:" +git branch +echo + +echo "== Configuration (.git/config)" +cat .git/config +echo + +echo "== Most Recent Commit" +git --no-pager log --max-count=1 +echo + +echo "Type 'git log' for more commits, or 'git show' for full commit details." +else +echo "Not a git repository." +fi + +popd >/dev/null -- 2.34.1