All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: git <git@vger.kernel.org>
Subject: Re: Salvaging borked project history
Date: Wed, 04 Mar 2015 15:49:25 +0100	[thread overview]
Message-ID: <54F71B75.7000104@free.fr> (raw)
In-Reply-To: <54EF814D.1020105@free.fr>

Mason wrote:

> I was planning to write 'git diff -q commit^ commit'
> to test for empty commits. Looks like I'll be needing
> 'git diff commit^ commit | wc -l' instead?

I wrote a script to generate the list of empty commits.

git log --format="%h" --reverse 413cb08.. | while read H
do
   if git diff --quiet $H^ $H; then echo $H; fi
done >empty_commits

But it turns out all this is unnecessary, as git-rebase
will automatically filter empty commits! :-)
Unless given the --keep-empty option, I presume.

Thanks to everyone involved in making this great tool.

Regards.

      parent reply	other threads:[~2015-03-04 14:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 17:05 Salvaging borked project history Mason
2015-02-23 19:36 ` Junio C Hamano
2015-02-26 11:54   ` Mason
2015-02-26 18:56     ` Junio C Hamano
2015-02-26 20:25       ` Mason
2015-02-26 21:28         ` Junio C Hamano
2015-02-26 23:47           ` Mason
2015-02-26 23:54             ` Junio C Hamano
2015-03-04 14:49         ` Mason [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F71B75.7000104@free.fr \
    --to=slash.tmp@free.fr \
    --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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.