git-p4 debug doesn't need a git repository
Signed-off-by: Simon Hausmann <hausmann@kde.org>maint
parent
e20a9e530a
commit
8910ac0e88
|
@ -107,6 +107,7 @@ def gitBranchExists(branch):
|
||||||
class Command:
|
class Command:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.usage = "usage: %prog [options]"
|
self.usage = "usage: %prog [options]"
|
||||||
|
self.needsGit = True
|
||||||
|
|
||||||
class P4Debug(Command):
|
class P4Debug(Command):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -114,6 +115,7 @@ class P4Debug(Command):
|
||||||
self.options = [
|
self.options = [
|
||||||
]
|
]
|
||||||
self.description = "A tool to debug the output of p4 -G."
|
self.description = "A tool to debug the output of p4 -G."
|
||||||
|
self.needsGit = False
|
||||||
|
|
||||||
def run(self, args):
|
def run(self, args):
|
||||||
for output in p4CmdList(" ".join(args)):
|
for output in p4CmdList(" ".join(args)):
|
||||||
|
@ -1031,6 +1033,7 @@ if len(options) > 0:
|
||||||
|
|
||||||
(cmd, args) = parser.parse_args(sys.argv[2:], cmd);
|
(cmd, args) = parser.parse_args(sys.argv[2:], cmd);
|
||||||
|
|
||||||
|
if cmd.needsGit:
|
||||||
gitdir = cmd.gitdir
|
gitdir = cmd.gitdir
|
||||||
if len(gitdir) == 0:
|
if len(gitdir) == 0:
|
||||||
gitdir = ".git"
|
gitdir = ".git"
|
||||||
|
|
Loading…
Reference in New Issue