Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=1cdfc38a81a1b250d9663630fe6a5727383a34a4
commit 1cdfc38a81a1b250d9663630fe6a5727383a34a4
Author: VMiklos <[EMAIL PROTECTED]>
Date: Wed Sep 26 22:24:22 2007 +0200
dg: query the current branch, don't use just master
diff --git a/darcs-git.py b/darcs-git.py
index 91d91f4..b2d8438 100755
--- a/darcs-git.py
+++ b/darcs-git.py
@@ -75,6 +75,13 @@ def get_root():
sys.exit(0)
return root
+def get_branch():
+ sock = os.popen("git symbolic-ref HEAD")
+ branch = sock.read().strip()[11:]
+ if sock.close():
+ sys.exit(0)
+ return branch
+
def get_diff(files = ""):
sock = os.popen("git diff HEAD --binary %s" % files)
lines = sock.readlines()
@@ -552,7 +559,8 @@ Options:
options.gitopts = " ".join(argv[optind:])
if options.help:
usage(0)
- sock = os.popen("git log origin/master..master --no-merges 2>&1")
+ branch = get_branch()
+ sock = os.popen("git log origin/%s..%s --no-merges 2>&1" % (branch,
branch))
lines = sock.readlines()
ret = sock.close()
if not len(lines):
@@ -609,7 +617,8 @@ Options:
if options.help:
usage(0)
os.system("git fetch")
- sock = os.popen("git log master..origin/master --no-merges 2>&1")
+ branch = get_branch()
+ sock = os.popen("git log %s..origin/%s --no-merges 2>&1" % (branch,
branch))
lines = sock.readlines()
ret = sock.close()
if not len(lines):
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git