{"thread":{"id":"29707","subject":"measuring the % change between two commits","startedAt":"2012-02-23T11:30:40Z","lastAt":"2012-02-24T17:05:07Z","messageCount":4,"participants":["Sitaram Chamarty","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"185263","messageId":"CAMK1S_gXQaE+RZxe4S7vqAyPka9N9PAoe+557FaLO+JJoJFshA@mail.gmail.com","threadId":"29707","inReplyTo":null,"subject":"measuring the % change between two commits","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2012-02-23T11:30:40Z","receivedAt":"2012-02-23T11:30:40Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"I'm trying to come up with a % measure for the changes between two commits.\n\nI don't mind how precisely it is calculated, since this is only for a\nthresholding purpose where we can adjust the threshold if the way it\nis calculated is not what we think it should be.\n\nThe logging options that put out a % figure only do so for\ncopied/renamed files.  Merely modified files do not get a % figure\nattached.\n\nI could do a --numstat and then do a 'wc -l' on each file I guess, but\nI was hoping to avoid that.\n\n--dirstat gives you a percentage but does not count the top level directory.\n\nAny ideas?\n\n-- \nSitaram\n"},{"id":"185296","messageId":"7vty2h2txt.fsf@alter.siamese.dyndns.org","threadId":"29707","inReplyTo":"CAMK1S_gXQaE+RZxe4S7vqAyPka9N9PAoe+557FaLO+JJoJFshA@mail.gmail.com","subject":"Re: measuring the % change between two commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-23T20:09:18Z","receivedAt":"2012-02-23T20:09:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> I could do a --numstat and then do a 'wc -l' on each file I guess, but\n> I was hoping to avoid that.\n\nEither you do it or the git core does it, but I am not sure if the use\ncase is common enough to warrant additional code on the core side.\n"},{"id":"185297","messageId":"7vpqd52tqr.fsf@alter.siamese.dyndns.org","threadId":"29707","inReplyTo":"CAMK1S_gXQaE+RZxe4S7vqAyPka9N9PAoe+557FaLO+JJoJFshA@mail.gmail.com","subject":"Re: measuring the % change between two commits","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-23T20:13:32Z","receivedAt":"2012-02-23T20:13:32Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> I could do a --numstat and then do a 'wc -l' on each file I guess, but\n> I was hoping to avoid that.\n>\n> --dirstat gives you a percentage but does not count the top level directory.\n\nNote that dirstat is not about \"how much damage was caused to the entire\ncodebase\".  It only measures \"How is the damage this patch causes\ndistributed across directories it touches\".  It was unclear from your \"a %\nmeasure for the changes between two commits\" which one you meant, but I am\nguessing from your \"--numstat and wc -l\" reference that you are asking for\nthe former, e.g. we have 300,000 lines of code and between these two\ncommits 10,000 lines changed, hence we updated 3% of the codebase during\nthat period\".\n"},{"id":"185341","messageId":"CAMK1S_hHCQ2SxhD=GiyHTzd=rgZF5aT7XdWn5-HEv1Xsr_+KvQ@mail.gmail.com","threadId":"29707","inReplyTo":"7vpqd52tqr.fsf@alter.siamese.dyndns.org","subject":"Re: measuring the % change between two commits","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2012-02-24T17:05:07Z","receivedAt":"2012-02-24T17:05:07Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On Fri, Feb 24, 2012 at 1:43 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Sitaram Chamarty <sitaramc@gmail.com> writes:\n>\n>> I could do a --numstat and then do a 'wc -l' on each file I guess, but\n>> I was hoping to avoid that.\n>>\n>> --dirstat gives you a percentage but does not count the top level directory.\n>\n> Note that dirstat is not about \"how much damage was caused to the entire\n> codebase\".  It only measures \"How is the damage this patch causes\n> distributed across directories it touches\".  It was unclear from your \"a %\n> measure for the changes between two commits\" which one you meant, but I am\n> guessing from your \"--numstat and wc -l\" reference that you are asking for\n> the former, e.g. we have 300,000 lines of code and between these two\n> commits 10,000 lines changed, hence we updated 3% of the codebase during\n> that period\".\n\nyes; I wanted an overall figure.  Clearly I misunderstood dirstat\nthen.  (Should have guessed from the \"...may not total to 100%...\"\ncomment somewhere.\n\nThanks\n\n-- \nSitaram\n"}]}