From c8137b5eb0e78bb4c8b894c8d32756ff2379da2b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 30 Oct 2017 03:54:10 -0400 Subject: clean up gitconfig a bit --- bin/git/git-re-edit | 25 ------------------------- bin/git/git-treehash | 27 --------------------------- 2 files changed, 52 deletions(-) delete mode 100755 bin/git/git-re-edit delete mode 100755 bin/git/git-treehash (limited to 'bin/git') diff --git a/bin/git/git-re-edit b/bin/git/git-re-edit deleted file mode 100755 index 7172acd..0000000 --- a/bin/git/git-re-edit +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/perl -# -# Still fails when files may contain spaces -# -# Run the editor on all the files that have been modified from the -# current index. Useful to resume work when you left the working tree -# dirty. Useful following a "git reset HEAD^" to continue work on the -# stuff you were working on before. Useful following a failed merge. -# - -chomp(my @changed = qx{git status --porcelain}); -exit 1 unless $? == 0; -s/^.. // or die "<$_>???\n" for @changed; -die "Fucking shell, how does it work?\n" - if grep / /, @changed; - -@changed = qw(.) unless @changed; -chomp(my @lines = qx{find @changed -type f }); -exit 1 unless $? == 0; - -# maybe should use output of "git var GIT_EDITOR" here? -# But then I have to involve the !@&*!@*(&!@ shell -my $ed = $ENV{VISUAL} || $ENV{EDITOR} || "emacs"; -exec $ed, @lines; -die "exec $ed: $!\n"; diff --git a/bin/git/git-treehash b/bin/git/git-treehash deleted file mode 100755 index 8b2d1a4..0000000 --- a/bin/git/git-treehash +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/perl - -my %opt; -use Getopt::Std; -getopts("q", \%opt); - -@ARGV = qw(HEAD ORIG_HEAD) unless @ARGV; - -for my $rev (@ARGV) { - chomp(my $res = qx{git rev-parse $rev^{tree}}); - if ($?) { $BAD++ } - else { push @{$hash{$res}}, $rev } -} - -exit 2 if $BAD; -if (keys(%hash) == 1) { - my ($res) = keys %hash; - print "$res\n" unless $opt{"q"}; - exit 0; -} else { - unless ($opt{"q"}) { - for my $res (keys %hash) { - print $res, " ", join(" ", @{$hash{$res}}), "\n"; - } - } - exit 1; -} -- cgit v1.2.3-54-g00ecf