summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/metadata_scm.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 4f66011b0d..b3c06dd7f6 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -63,14 +63,14 @@ def base_get_metadata_svn_revision(path, d):
63 return revision 63 return revision
64 64
65def base_get_metadata_git_branch(path, d): 65def base_get_metadata_git_branch(path, d):
66 branch = os.popen('cd %s; git branch | grep "^* " | tr -d "* "' % path).read() 66 branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read()
67 67
68 if len(branch) != 0: 68 if len(branch) != 0:
69 return branch 69 return branch
70 return "<unknown>" 70 return "<unknown>"
71 71
72def base_get_metadata_git_revision(path, d): 72def base_get_metadata_git_revision(path, d):
73 rev = os.popen("cd %s; git log -n 1 --pretty=oneline --" % path).read().split(" ")[0] 73 rev = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path).read().split(" ")[0]
74 if len(rev) != 0: 74 if len(rev) != 0:
75 return rev 75 return rev
76 return "<unknown>" 76 return "<unknown>"