summaryrefslogtreecommitdiff
path: root/git-import-orig
diff options
context:
space:
mode:
Diffstat (limited to 'git-import-orig')
-rwxr-xr-xgit-import-orig8
1 files changed, 7 insertions, 1 deletions
diff --git a/git-import-orig b/git-import-orig
index 44319c5e..642f9b72 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -24,7 +24,7 @@ import re
import glob
from optparse import OptionParser
from git_buildpackage import *
-
+from git_buildpackage.utils import is_repository_clean
# Used GIT Commands
gitCheckoutUpstream=GitCheckoutBranch('upstream')
@@ -88,6 +88,12 @@ def main():
parser.print_help()
return 1
+ (ret, out) = is_repository_clean('.')
+ if not ret:
+ print >>sys.stderr, "Repository has uncommitted changes, commit them first: "
+ print >>sys.stderr, out
+ return 1
+
tmpdir=unpackOrig(tgz)
if not tmpdir:
return 1