chiark
/
gitweb
/
~ian
/
topbloke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20a1a23
)
implement check_clean_tree; $tiprefs, $baserefs
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 30 Jan 2012 23:29:19 +0000
(23:29 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 30 Jan 2012 23:29:19 +0000
(23:29 +0000)
Topbloke.pm
patch
|
blob
|
history
diff --git
a/Topbloke.pm
b/Topbloke.pm
index 33aec76b46b6c734e76b1021a0a2d9fca67e319b..7f535ebb2d2bf73e5a6d8a66b2116c3826eb5c5d 100644
(file)
--- a/
Topbloke.pm
+++ b/
Topbloke.pm
@@
-17,7
+17,7
@@
BEGIN {
$VERSION = 1.00;
@ISA = qw(Exporter);
$VERSION = 1.00;
@ISA = qw(Exporter);
- @EXPORT = qw(debug
+ @EXPORT = qw(debug
$tiprefs $baserefs
run_git run_git_1line run_git_check_nooutput
run_git_test_anyoutput git_get_object
git_config git_dir chdir_toplevel enable_reflog
run_git run_git_1line run_git_check_nooutput
run_git_test_anyoutput git_get_object
git_config git_dir chdir_toplevel enable_reflog
@@
-179,6
+179,13
@@
sub check_no_unwanted_metadata ($) {
qw(.topbloke));
}
qw(.topbloke));
}
+sub check_clean_tree ($) {
+ run_git_check_nooutput("operation requires working tree to be clean",
+ qw(diff --name-only HEAD --));
+ run_git_check_nooutput("operation cannot proceed with staged changes",
+ qw(diff --cached --name-only HEAD --));
+}
+
#----- configuring a tree -----
sub setup_config () {
#----- configuring a tree -----
sub setup_config () {
@@
-235,6
+242,9
@@
sub setup_config () {
#----- branch and patch specs and parsed patch names -----
#----- branch and patch specs and parsed patch names -----
+our $tiprefs = 'refs/topbloke-tips';
+our $baserefs = 'refs/topbloke-bases';
+
sub current_branch () {
open R, git_dir().'/HEAD' or die "open HEAD $!";
my $ref = <R>; defined $ref or die $!;
sub current_branch () {
open R, git_dir().'/HEAD' or die "open HEAD $!";
my $ref = <R>; defined $ref or die $!;