# Possible bug report

2 messages from 2013-04-26 to 2013-04-26. Participants: Pierre-François CLEMENT, Junio C Hamano.
Thread: https://gitlist.dev/t/33620

## Pierre-François CLEMENT, 2013-04-26 15:59

Subject: Possible bug report
Message-ID: <CANWD=rVdAVP0KSdai-tQf9VtVj7bOLMrENiG_fx-mD_R2f8SnQ@mail.gmail.com>
URL: https://gitlist.dev/e/CANWD%3DrVdAVP0KSdai-tQf9VtVj7bOLMrENiG_fx-mD_R2f8SnQ%40mail.gmail.com

```
Hi guys, I get strange result when running the following command:

$ git diff develop..HEAD --shortstat --cumulative
 27 files changed, 886 insertions(+), 101 deletions(-)
   9.2% apps/frontend/modules/conversionspecs/actions/
  35.2% apps/frontend/modules/conversionspecs/templates/
  45.0% apps/frontend/modules/conversionspecs/
  45.2% apps/frontend/
   8.7% config/doctrine/
   4.8% lib/filter/doctrine/
   8.1% lib/form/doctrine/
  21.9% lib/migration/doctrine/
  10.0% lib/model/doctrine/
  44.9% lib/
  12.9% apps/frontend/modules/conversionspecs/actions/
  37.1% apps/frontend/modules/conversionspecs/templates/
  50.6% apps/frontend/modules/conversionspecs/
  50.7% apps/frontend/
   6.6% config/doctrine/
   3.2% lib/filter/doctrine/
   9.1% lib/form/doctrine/
  20.6% lib/migration/doctrine/
   8.5% lib/model/doctrine/
  41.5% lib/

As you can see, the --cumulative lines seem to be duplicated, though
the computed stats aren't exactly the same... It appears when you
combine the --cumulative option with either --stat, --numstat or
--shortstat (but not --dirstat) on any local or remote branches EXCEPT
on both master and origin/master.

I use git-flow and git v1.7.9.5 on Ubuntu 12.04 LTS.
Let me know if you need any further informations.
--
Pierre-François CLEMENT
Self-employed web developer
Application developer @ Upcast Social
Phone number (FR): +336.827.331.89
Phone number (UK): +447.449.508.188
http://www.linkedin.com/in/likeyn/en
http://www.doyoubuzz.com/pierre-francois-clement/

```

## Junio C Hamano, 2013-04-26 17:24

Subject: Re: Possible bug report
Message-ID: <7vli85xl0c.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vli85xl0c.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CANWD=rVdAVP0KSdai-tQf9VtVj7bOLMrENiG_fx-mD_R2f8SnQ@mail.gmail.com>

```
Pierre-François CLEMENT <likeyn@gmail.com> writes:

> As you can see, the --cumulative lines seem to be duplicated, though
> the computed stats aren't exactly the same... It appears when you
> combine the --cumulative option with either --stat, --numstat or
> --shortstat (but not --dirstat) ...

Thanks for a report.

I do not think the deprecated --cumulative command line option was
ever designed to be used with anything but --dirstat.

It was a UI mistake to make it look like an independent option,
which was corrected with 333f3fb0c530 (Refactor --dirstat parsing;
deprecate --cumulative and --dirstat-by-file, 2011-04-29) and the
fix shipped back in v1.7.6. Since that release we do not even
mention the option in the manual.

These days, the right way to spell it is as an option parameter to
the --dirstat option itself (e.g. --dirstat=cumulative).

The parser to parse --cumulative as a command line argument was kept
so that people who were used to "--dirstat --cumulative" do not have
to see an error from the command line parser.  We could have made
"--cumulative" with other kind of "stat" an error back then, but we
didn't. I suspect that we thought it would be sufficient to not
document --cumulative as a standalone option, but I do not recall
the details.

```
