Thread (6 messages) flat view 6 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 5/5] hg-to-git: use git rev-parse instead of git show

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:44:53
Subsystem: the rest · Maintainer: Linus Torvalds

'show' is a high-level command, scripts are better if they use
'rev-parse'.

Signed-off-by: Miklos Vajna <redacted>
---
 contrib/hg-to-git/hg-to-git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/contrib/hg-to-git/hg-to-git.py b/contrib/hg-to-git/hg-to-git.py
index 7b03204..0ecb38b 100755
--- a/contrib/hg-to-git/hg-to-git.py
+++ b/contrib/hg-to-git/hg-to-git.py
@@ -233,7 +233,7 @@ for cset in range(int(tip) + 1):
         os.system('git branch -d %s' % otherbranch)
 
     # retrieve and record the version
-    vvv = os.popen('git show --quiet --pretty=format:%H').read()
+    vvv = os.popen('git rev-parse HEAD').read()
     print 'record', cset, '->', vvv
     hgvers[str(cset)] = vvv
 
-- 
1.5.6.1.322.ge904b.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help