* git-describe hash length
@ 2009-01-22 11:26 Martin Pirker
2009-01-22 12:34 ` Tomas Carnecky
0 siblings, 1 reply; 4+ messages in thread
From: Martin Pirker @ 2009-01-22 11:26 UTC (permalink / raw)
To: git
Hi!
john@doe:/workspace$ git version
git version 1.6.1
john@doe:/workspace$ git describe
fatal: cannot describe '7aee61cc635a923e70b74091486742481ee0928b'
john@doe:/workspace$ git describe --always
7aee61c
john@doe:/workspace$ git describe --always --abbrev=8
7aee61cc
man git-describe:
--abbrev=<n>
Instead of using the default 8 hexadecimal digits as the
abbreviated object name, use <n> digits.
There is one character missing from default or what am I missing?
Thanks,
Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-describe hash length
2009-01-22 11:26 git-describe hash length Martin Pirker
@ 2009-01-22 12:34 ` Tomas Carnecky
2009-01-22 18:26 ` [PATCH] Fix Documentation for git-describe Boyd Stephen Smith Jr.
0 siblings, 1 reply; 4+ messages in thread
From: Tomas Carnecky @ 2009-01-22 12:34 UTC (permalink / raw)
To: Martin Pirker; +Cc: git
On 01/22/2009 12:26 PM, Martin Pirker wrote:
> Hi!
>
>
> john@doe:/workspace$ git version
> git version 1.6.1
> john@doe:/workspace$ git describe
> fatal: cannot describe '7aee61cc635a923e70b74091486742481ee0928b'
> john@doe:/workspace$ git describe --always
> 7aee61c
> john@doe:/workspace$ git describe --always --abbrev=8
> 7aee61cc
>
>
> man git-describe:
>
> --abbrev=<n>
> Instead of using the default 8 hexadecimal digits as the
> abbreviated object name, use<n> digits.
>
>
>
> There is one character missing from default or what am I missing?
The man page is wrong:
cache.h:#define DEFAULT_ABBREV 7
builtin-describe.c:static int abbrev = DEFAULT_ABBREV;
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Fix Documentation for git-describe
2009-01-22 12:34 ` Tomas Carnecky
@ 2009-01-22 18:26 ` Boyd Stephen Smith Jr.
2009-01-23 9:36 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Boyd Stephen Smith Jr. @ 2009-01-22 18:26 UTC (permalink / raw)
To: Tomas Carnecky; +Cc: Martin Pirker, git, Junio C Hamano
The documentation for git-describe says the default abbreviation is 8
hexadecimal digits while cache.c clearly shows DEFAULT_ABBREV set to 7.
This patch corrects the documentation.
Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net>
---
On Thursday 2009 January 22 06:34:06 Tomas Carnecky wrote:
>On 01/22/2009 12:26 PM, Martin Pirker wrote:
>> john@doe:/workspace$ git version
>> git version 1.6.1
>> john@doe:/workspace$ git describe
>> fatal: cannot describe '7aee61cc635a923e70b74091486742481ee0928b'
>> john@doe:/workspace$ git describe --always
>> 7aee61c
>> john@doe:/workspace$ git describe --always --abbrev=8
>> 7aee61cc
>>
>> man git-describe:
>> --abbrev=<n>
>> Instead of using the default 8 hexadecimal digits as the
>> abbreviated object name, use<n> digits.
>>
>> There is one character missing from default or what am I missing?
>
>The man page is wrong:
>
>cache.h:#define DEFAULT_ABBREV 7
>builtin-describe.c:static int abbrev = DEFAULT_ABBREV;
Let's fix it then! This is a patch against maint.
Is there any way to include values from the source as text in the ascidoc
other than copy-and-paste? It would be nice if we don't have to do this fix
again in the future.
I did a quick scan of 'git grep 8 -- Documentation' and didn't see
anywhere else this needed fixing.
Documentation/git-describe.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt
index 3d79f05..a30c5ac 100644
--- a/Documentation/git-describe.txt
+++ b/Documentation/git-describe.txt
@@ -43,7 +43,7 @@ OPTIONS
Automatically implies --tags.
--abbrev=<n>::
- Instead of using the default 8 hexadecimal digits as the
+ Instead of using the default 7 hexadecimal digits as the
abbreviated object name, use <n> digits.
--candidates=<n>::
--
1.6.0.2
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-23 9:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 11:26 git-describe hash length Martin Pirker
2009-01-22 12:34 ` Tomas Carnecky
2009-01-22 18:26 ` [PATCH] Fix Documentation for git-describe Boyd Stephen Smith Jr.
2009-01-23 9:36 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).