[PATCH] autoconfiscate.sh: Use proper command for revision count

From: "Eduardo Lima (Etrunko)" <eblima@br.ibm.com> Signed-off-by: Eduardo Lima (Etrunko) <eblima@br.ibm.com> --- autoconfiscate.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/autoconfiscate.sh b/autoconfiscate.sh index 8ea8a30..f0ef048 100755 --- a/autoconfiscate.sh +++ b/autoconfiscate.sh @@ -19,7 +19,7 @@ autoconf --force && if test -x $(which git); then git rev-parse --short HEAD > .changeset - git log | grep "^commit" | wc -l > .revision + git rev-list --count HEAD > .revision else echo "Unknown" > .changeset echo "0" > .revision -- 1.7.7.5

I like this better than the current hack, but the syntax does not seems correct. On RHEL 6.2: $ git rev-list --count HEAD usage: git rev-list [OPTION] <commit-id>... [ -- paths... ] limiting output: --max-count=nr --max-age=epoch --min-age=epoch --sparse --no-merges --remove-empty --all --branches --tags --remotes --stdin --quiet ordering output: --topo-order --date-order --reverse formatting output: --parents --children --objects | --objects-edge --unpacked --header | --pretty --abbrev=nr | --no-abbrev --abbrev-commit --left-right special purpose: --bisect --bisect-vars --bisect-all On 01/17/2012 11:58 AM, Eduardo Lima (Etrunko) wrote:
From: "Eduardo Lima (Etrunko)"<eblima@br.ibm.com>
Signed-off-by: Eduardo Lima (Etrunko)<eblima@br.ibm.com> --- autoconfiscate.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/autoconfiscate.sh b/autoconfiscate.sh index 8ea8a30..f0ef048 100755 --- a/autoconfiscate.sh +++ b/autoconfiscate.sh @@ -19,7 +19,7 @@ autoconf --force&&
if test -x $(which git); then git rev-parse --short HEAD> .changeset - git log | grep "^commit" | wc -l> .revision + git rev-list --count HEAD> .revision else echo "Unknown"> .changeset echo "0"> .revision
-- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent@linux.vnet.ibm.com

On 01/17/2012 03:06 PM, Chip Vincent wrote:
I like this better than the current hack, but the syntax does not seems correct. On RHEL 6.2:
So it seems git in RHEL is quite old. I don't know when it was added but you can use git rev-list HEAD | wc -l in this case. Can you check with "git rev-list --help" if it includes the --count option? Best regards, Etrunko -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima@br.ibm.com

On 01/17/2012 12:28 PM, Eduardo Lima (Etrunko) wrote:
git rev-list HEAD | wc -l This works as expected. I see '1179' in my current dev branch.
FWIW: I'm using git-1.7.1-2.el6_0.1.x86_64 -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent@linux.vnet.ibm.com

On 01/18/2012 02:20 PM, Chip Vincent wrote:
On 01/17/2012 12:28 PM, Eduardo Lima (Etrunko) wrote:
git rev-list HEAD | wc -l This works as expected. I see '1179' in my current dev branch.
FWIW: I'm using git-1.7.1-2.el6_0.1.x86_64
Ok, mine is version 1.7.7.5, which ships in fedora 16. Resending the patch right now. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima@br.ibm.com
participants (2)
-
Chip Vincent
-
Eduardo Lima (Etrunko)