Use `rev-parse` instead of `show-ref` (#1958)

* Use `rev-parse` instead of `show-ref`

* Dev builds currently use masters commit ref and makes it difficult to determine which version is really installed with About → Help. Use the current HEAD when generating the `Makefile`s for `DGIT_REVISION`

**NOTES**
* The bash scripts are somewhat duplicated with the unused `--short` parameter but omitted at this time in case a long hash is wanted.
* `make distclean` is still needed since those defines are hard-coded into those affected `Makefile`s

* Keep current abstract as per @nowrep

* Remove some known unneeded bash pipes
remotes/origin/falkon
Marti Martz 10 years ago committed by David Rosca
parent 8332705fc9
commit c0026af63e
  1. 2
      git_hooks/post-checkout
  2. 2
      git_hooks/post-commit
  3. 2
      git_hooks/post-merge
  4. 2
      scripts/getrevision.sh

@ -2,4 +2,4 @@
#
# Writes git revision into git_revision file
#
git show-ref refs/heads/master | cut -d " " -f 1 > git_revision
git rev-parse HEAD > git_revision

@ -2,4 +2,4 @@
#
# Writes git revision into git_revision file
#
git show-ref refs/heads/master | cut -d " " -f 1 > git_revision
git rev-parse HEAD > git_revision

@ -2,4 +2,4 @@
#
# Writes git revision into git_revision file
#
git show-ref refs/heads/master | cut -d " " -f 1 > git_revision
git rev-parse HEAD > git_revision

@ -3,7 +3,7 @@
REV=""
if [ -e "/usr/bin/git" ] && ([ -e ".git" ] || [ -e "../.git" ]); then
REV=`git show-ref refs/heads/master | cut -d " " -f 1`
REV=`git rev-parse HEAD`
elif [ -e "git_revision" ]; then
REV=`cat git_revision`
fi

Loading…
Cancel
Save