git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Converting from svn to git

From
Sam Vilain <sam@vilain.net>
Date
Aug 17, 2008, 09:11 UTC
Message-ID
<1218964318.2149.3.camel@maia.lan>
In-Reply-To
<g8421k$qcs$1@ger.gmane.org>
On Fri, 2008-08-15 at 15:58 +0200, Michael J Gruber wrote:
Show 12 quoted lines
> 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.
Previous: Michael J Gruber
Message 8 of 8 in “Converting from svn to git”
  1. David NeuAug 10, 2008
  2. Miklos VajnaAug 10, 2008
  3. David NeuAug 10, 2008
  4. Michael J GruberAug 10, 2008
  5. David NeuAug 10, 2008
  6. David NeuAug 11, 2008
  7. Michael J GruberAug 15, 2008
  8. Sam VilainAug 17, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.