Permalink
Browse files

add -c command-line flag for git-re-edit

  • Loading branch information...
1 parent 0e7ce08 commit ab8df452b856942b8e486a421690b26b9f433e54 Mark Dominus committed Jan 1, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 git-re-edit
View
@@ -10,8 +10,10 @@
use Getopt::Std;
my %opt = ( e => $ENV{VISUAL} || $ENV{EDITOR} || "emacs",
+ c => 0
);
-getopts('e:', \%opt) or usage();
+getopts('e:c', \%opt) or usage();
+$opt{e} = "/bin/echo" if $opt{c};
chomp(my @changed = grep !/^\?\? /, qx{git status --porcelain});
exit 1 unless $? == 0;

0 comments on commit ab8df45

Please sign in to comment.