threads / bug / 33620

Possible bug report

Subject: Possible bug report

## tl;dr

2 messages between Apr 26, 2013 and Apr 26, 2013.

replies: 1people: 2as markdown or json

Pierre-François CLEMENT· Apr 26, 2013, 15:59 UTC · lore
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· Apr 26, 2013, 17:24 UTC · re: Pierre-François CLEMENT · lore

Re: Possible bug report

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.

← back to recent threads