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>
This commit is contained in:
parent
4f7947dab8
commit
0a6439154a
1 changed files with 3 additions and 3 deletions
|
@ -130,19 +130,19 @@ my %update_method = (
|
||||||
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
||||||
'update' => "git pull --ff",
|
'update' => "git pull --ff",
|
||||||
'controldir' => ".git",
|
'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' => {
|
'src-git-full' => {
|
||||||
'init' => "git clone '%s' '%s'",
|
'init' => "git clone '%s' '%s'",
|
||||||
'init_branch' => "git clone --branch '%s' '%s' '%s'",
|
'init_branch' => "git clone --branch '%s' '%s' '%s'",
|
||||||
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
|
||||||
'update' => "git pull --ff",
|
'update' => "git pull --ff",
|
||||||
'controldir' => ".git",
|
'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' => {
|
'src-gitsvn' => {
|
||||||
'init' => "git svn clone -r HEAD '%s' '%s'",
|
'init' => "git svn clone -r HEAD '%s' '%s'",
|
||||||
'update' => "git svn rebase",
|
'update' => "git svn rebase",
|
||||||
'controldir' => ".git",
|
'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' => {
|
'src-bzr' => {
|
||||||
'init' => "bzr checkout --lightweight '%s' '%s'",
|
'init' => "bzr checkout --lightweight '%s' '%s'",
|
||||||
'update' => "bzr update",
|
'update' => "bzr update",
|
||||||
|
|
Loading…
Reference in a new issue