From: Pat Notz <patnotz@gmail.com>
To: Git <git@vger.kernel.org>
Subject: Best way to get number of insertions and deletions from a diff?
Date: Wed, 13 Oct 2010 13:21:27 -0600 [thread overview]
Message-ID: <AANLkTinJuuxOZ2DvCSc2Nb0DAjwmJEyJXeGLHsLkyM1B@mail.gmail.com> (raw)
I'd like to probe various commits to see how many lines were added or
removed. For example,
$ git diff --shortstat HEAD HEAD^1
3 files changed, 5 insertions(+), 5 deletions(-)
That's great but I'd like to do this from a script and parse out those
numbers. Is there a more plumbing-level way to do this that would be
more robust? Or, should I just parse this output?
Thanks ~ Pat
next reply other threads:[~2010-10-13 19:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-13 19:21 Pat Notz [this message]
2010-10-13 19:37 ` Best way to get number of insertions and deletions from a diff? Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinJuuxOZ2DvCSc2Nb0DAjwmJEyJXeGLHsLkyM1B@mail.gmail.com \
--to=patnotz@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).