All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Vilain <sam@vilain.net>
To: Michael J Gruber <michaeljgruber+gmane@fastmail.fm>
Cc: git@vger.kernel.org
Subject: Re: Converting from svn to git
Date: Sun, 17 Aug 2008 21:11:58 +1200	[thread overview]
Message-ID: <1218964318.2149.3.camel@maia.lan> (raw)
In-Reply-To: <g8421k$qcs$1@ger.gmane.org>

On Fri, 2008-08-15 at 15:58 +0200, Michael J Gruber wrote:
> A while ago I "complained" that rebase would skip empty commits. You 
> might experiment with that. Alternatively, the following works for me:
> 
> git filter-branch --commit-filter 'cmd="git commit-tree"; test `git show 
> --pretty=oneline $GIT_COMMIT|wc -l` = 1 && cmd="skip_commit"; $cmd "$@"' 
> -- --all
> 
> This skips all commits which introduce no diff. It will not remove 
> branches or tags which are related only to those subdirs.
> 
> I am sure there will be more elegant ways to do that (esp. the test with 
> wc).

something like this should work:

  --commit-filter 'if [ "$1" = `git rev-parse HEAD^{tree}` ]; then
skip_commit "$@"; else git commit-tree "$@"; fi'

Sam.

      reply	other threads:[~2008-08-17  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-10 13:11 Converting from svn to git David Neu
2008-08-10 13:24 ` Miklos Vajna
2008-08-10 14:54   ` David Neu
2008-08-10 15:32     ` Michael J Gruber
2008-08-10 15:48       ` David Neu
2008-08-11 17:46         ` David Neu
2008-08-15 13:58           ` Michael J Gruber
2008-08-17  9:11             ` Sam Vilain [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=1218964318.2149.3.camel@maia.lan \
    --to=sam@vilain.net \
    --cc=git@vger.kernel.org \
    --cc=michaeljgruber+gmane@fastmail.fm \
    /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.