Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

started git-get with git get current-branch-name

  • Loading branch information...
commit 3a15b83c2792939de00c7e9bcb1be3ce16e316dc 1 parent 2f58934
@mjdominus authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 git-get
View
28 git-get
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+my ($what, @args) = @ARGV;
+
+die "Usage: git-get what [args...]\n" unless defined $what;
+
+$what =~ tr/-/_/;
+
+if (defined &$what) { $what->(@args) }
+else {
+ die "Don't know how to get '$what'; aborting";
+}
+
+sub current_branch_name {
+ exec("git rev-parse --symbolic-full-name --abbrev-ref HEAD");
+ die "Couldn't run git-rev-parse: $!";
+}
+
+sub working_tree_dirty {
+ my ($arg) = @_;
+ die "Unimplemented\n";
+# git rev-parse --verify HEAD > /dev/null &&
+# git update-index --ignore-submodules --refresh &&
+# git diff-files --quiet --ignore-submodules &&
+# git diff-index --cached --quiet HEAD --ignore-submodules -- ||
+# die "Working tree is dirty"
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.