new git_info script reports on repository, added cygwindrive mounter function for...
authorChris Koeritz <fred@gruntose.com>
Fri, 6 Sep 2013 03:41:07 +0000 (22:41 -0500)
committerChris Koeritz <fred@gruntose.com>
Fri, 6 Sep 2013 03:41:07 +0000 (22:41 -0500)
scripts/core/functions.sh
scripts/rev_control/git_info.sh [new file with mode: 0644]

index 88f3d315032f2283bc5d24108606fec98be8bcb3..62e92d5b8fd543d66b0d68e5d63c743d49344aea 100644 (file)
@@ -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 (file)
index 0000000..4caf0f4
--- /dev/null
@@ -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