* measuring the % change between two commits
@ 2012-02-23 11:30 Sitaram Chamarty
2012-02-23 20:09 ` Junio C Hamano
2012-02-23 20:13 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Sitaram Chamarty @ 2012-02-23 11:30 UTC (permalink / raw)
To: Git Mailing List
I'm trying to come up with a % measure for the changes between two commits.
I don't mind how precisely it is calculated, since this is only for a
thresholding purpose where we can adjust the threshold if the way it
is calculated is not what we think it should be.
The logging options that put out a % figure only do so for
copied/renamed files. Merely modified files do not get a % figure
attached.
I could do a --numstat and then do a 'wc -l' on each file I guess, but
I was hoping to avoid that.
--dirstat gives you a percentage but does not count the top level directory.
Any ideas?
--
Sitaram
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: measuring the % change between two commits
2012-02-23 11:30 measuring the % change between two commits Sitaram Chamarty
@ 2012-02-23 20:09 ` Junio C Hamano
2012-02-23 20:13 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2012-02-23 20:09 UTC (permalink / raw)
To: Sitaram Chamarty; +Cc: Git Mailing List
Sitaram Chamarty <sitaramc@gmail.com> writes:
> I could do a --numstat and then do a 'wc -l' on each file I guess, but
> I was hoping to avoid that.
Either you do it or the git core does it, but I am not sure if the use
case is common enough to warrant additional code on the core side.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: measuring the % change between two commits
2012-02-23 11:30 measuring the % change between two commits Sitaram Chamarty
2012-02-23 20:09 ` Junio C Hamano
@ 2012-02-23 20:13 ` Junio C Hamano
2012-02-24 17:05 ` Sitaram Chamarty
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2012-02-23 20:13 UTC (permalink / raw)
To: Sitaram Chamarty; +Cc: Git Mailing List
Sitaram Chamarty <sitaramc@gmail.com> writes:
> I could do a --numstat and then do a 'wc -l' on each file I guess, but
> I was hoping to avoid that.
>
> --dirstat gives you a percentage but does not count the top level directory.
Note that dirstat is not about "how much damage was caused to the entire
codebase". It only measures "How is the damage this patch causes
distributed across directories it touches". It was unclear from your "a %
measure for the changes between two commits" which one you meant, but I am
guessing from your "--numstat and wc -l" reference that you are asking for
the former, e.g. we have 300,000 lines of code and between these two
commits 10,000 lines changed, hence we updated 3% of the codebase during
that period".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: measuring the % change between two commits
2012-02-23 20:13 ` Junio C Hamano
@ 2012-02-24 17:05 ` Sitaram Chamarty
0 siblings, 0 replies; 4+ messages in thread
From: Sitaram Chamarty @ 2012-02-24 17:05 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
On Fri, Feb 24, 2012 at 1:43 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Sitaram Chamarty <sitaramc@gmail.com> writes:
>
>> I could do a --numstat and then do a 'wc -l' on each file I guess, but
>> I was hoping to avoid that.
>>
>> --dirstat gives you a percentage but does not count the top level directory.
>
> Note that dirstat is not about "how much damage was caused to the entire
> codebase". It only measures "How is the damage this patch causes
> distributed across directories it touches". It was unclear from your "a %
> measure for the changes between two commits" which one you meant, but I am
> guessing from your "--numstat and wc -l" reference that you are asking for
> the former, e.g. we have 300,000 lines of code and between these two
> commits 10,000 lines changed, hence we updated 3% of the codebase during
> that period".
yes; I wanted an overall figure. Clearly I misunderstood dirstat
then. (Should have guessed from the "...may not total to 100%..."
comment somewhere.
Thanks
--
Sitaram
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-24 17:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 11:30 measuring the % change between two commits Sitaram Chamarty
2012-02-23 20:09 ` Junio C Hamano
2012-02-23 20:13 ` Junio C Hamano
2012-02-24 17:05 ` Sitaram Chamarty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox