# inconsistency with --abbrev=0

3 messages from 2009-05-31 to 2009-06-01. Participants: Markus Heidelberg, Sverre Rabbelier.
Thread: https://gitlist.dev/t/19618

## Markus Heidelberg, 2009-05-31 15:48

Subject: inconsistency with --abbrev=0
Message-ID: <200905311748.00782.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200905311748.00782.markus.heidelberg%40web.de

```
The minimum (>=4) number of chars is shown by

  git log|show|whatchanged --abbrev-commit --raw --abbrev=0
  git rev-list --abbrev-commit --abbrev=0 HEAD
  git show-ref --abbrev=0
  and the various diff commands

All 40 are shown by

  git branch -v --abbrev=0
  git ls-files --stage --abbrev=0
  git ls-tree --abbrev=0 HEAD

The latter group uses parse-options and doesn't set abbrev to 4 in this
case. This is needed for git-describe to omit the output of the commit.

What should --abbrev=0 behave like?

Markus

```

## Sverre Rabbelier, 2009-05-31 17:46

Subject: Re: inconsistency with --abbrev=0
Message-ID: <fabb9a1e0905311046t1cd45b2cj4f889313c7781b38@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0905311046t1cd45b2cj4f889313c7781b38%40mail.gmail.com
In-Reply-To: <200905311748.00782.markus.heidelberg@web.de>

```
Heya,

On Sun, May 31, 2009 at 17:48, Markus Heidelberg
<markus.heidelberg@web.de> wrote:
> What should --abbrev=0 behave like?

If the minimum is 4, then --abbrev=n with n < 4 should give an error
saying that it should be >= 4, no?

-- 
Cheers,

Sverre Rabbelier

```

## Markus Heidelberg, 2009-06-01 10:36

Subject: Re: inconsistency with --abbrev=0
Message-ID: <200906011236.51289.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200906011236.51289.markus.heidelberg%40web.de
In-Reply-To: <fabb9a1e0905311046t1cd45b2cj4f889313c7781b38@mail.gmail.com>

```
Sverre Rabbelier, 31.05.2009:
> Heya,
> 
> On Sun, May 31, 2009 at 17:48, Markus Heidelberg
> <markus.heidelberg@web.de> wrote:
> > What should --abbrev=0 behave like?
> 
> If the minimum is 4, then --abbrev=n with n < 4 should give an error
> saying that it should be >= 4, no?

This would break existing workflows. Currently --abbrev=[1-3] (and also
--abbrev=-n (negative numbers)) always display >=4 chars in all
commands. So you don't have to remind git's lower limit of 4, if you
just want to display as few chars as possible.
Only --abbrev=0 is different.

Markus

```
