[ofa-general] [PATCH] ibutils: git-log calls have been changed to git log as git-xxx syntax is not working with latest git releases

Sasha Khapyorsky sashak at voltaire.com
Sun Apr 26 07:58:40 PDT 2009


On 17:44 Sun 26 Apr     , Yevgeny Kliteynik wrote:
>
> git_version.tcl : @MAINTAINER_MODE_TRUE@ FORCE
>        if test x$(GIT) != x ; then \
> -          gitver=`cd $(srcdir) ; git-log | head -1 | cut -f2 -d\  `; \
> +          gitver=`cd $(srcdir) ; rev-parse --verify HEAD`; \
>           changes=`cd $(srcdir) ; git diff . | grep ^diff | wc -l`; \

BTW here you are diffing against local index and not against git tree in
repository. So if somebody does changes and run 'git add changed_file'
you will not see any differences using just 'git diff .'.

Actually return status of:

  git diff --quiet HEAD

, or

  git diff-index --quiet HEAD

should be enough for local changes (any kind) detection.

Sasha



More information about the general mailing list