aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/feeds
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2016-11-02 14:36:19 +0100
committerJohn Crispin <john@phrozen.org>2016-11-08 11:17:11 +0100
commit0a6439154a384d2782b2da80116a589b67a95f5a (patch)
tree16d3550b8a4b39a1295655d7ce26ecb3e36d3f6a /scripts/feeds
parent4f7947dab82b3e3728cfc362e24eeaf55f3ba245 (diff)
downloadupstream-0a6439154a384d2782b2da80116a589b67a95f5a.tar.gz
upstream-0a6439154a384d2782b2da80116a589b67a95f5a.tar.bz2
upstream-0a6439154a384d2782b2da80116a589b67a95f5a.zip
scripts/feeds: use git rev-parse for getting revision
It provides simpler output so we don't need extra head and cut commands. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'scripts/feeds')
-rwxr-xr-xscripts/feeds6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/feeds b/scripts/feeds
index 45239af1a3..83007f5e16 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -130,19 +130,19 @@ my %update_method = (
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'update' => "git pull --ff",
'controldir' => ".git",
- 'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
+ 'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'src-git-full' => {
'init' => "git clone '%s' '%s'",
'init_branch' => "git clone --branch '%s' '%s' '%s'",
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'update' => "git pull --ff",
'controldir' => ".git",
- 'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
+ 'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'src-gitsvn' => {
'init' => "git svn clone -r HEAD '%s' '%s'",
'update' => "git svn rebase",
'controldir' => ".git",
- 'revision' => "git show --abbrev-commit HEAD | head -n 1 | cut -d ' ' -f 2 | tr -d '\n'"},
+ 'revision' => "git rev-parse --short HEAD | tr -d '\n'"},
'src-bzr' => {
'init' => "bzr checkout --lightweight '%s' '%s'",
'update' => "bzr update",