Reposurgeon: Difference between revisions
revert edits to fix search where character encoding was a problem |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| Line 21: | Line 21: | ||
grundlett@hq-1:~$ cat bin/reposurgeon-myheart.sh | grundlett@hq-1:~$ cat bin/reposurgeon-myheart.sh | ||
< | <syntaxhighlight lang="bash"> | ||
#!/bin/bash | #!/bin/bash | ||
PROJECT=myheart | PROJECT=myheart | ||
| Line 57: | Line 57: | ||
--prune-empty --tag-name-filter cat -- --all | --prune-empty --tag-name-filter cat -- --all | ||
</ | </syntaxhighlight> | ||
Why does reposurgeon generate .gitignore files<ref>http://www.catb.org/~esr/reposurgeon/dvcs-migration-guide.html</ref>? Partly because it converts <code>svn:ignore</code> properties. Partly because some tools ([[git-svn]]) introduce .gitignore files to the svn repo. I also believe it may have to do with empty directory commits.<ref>https://stackoverflow.com/questions/22822020/convert-an-svn-repository-to-git-with-reposurgeon-without-creating-gitignore-fi</ref> | Why does reposurgeon generate .gitignore files<ref>http://www.catb.org/~esr/reposurgeon/dvcs-migration-guide.html</ref>? Partly because it converts <code>svn:ignore</code> properties. Partly because some tools ([[git-svn]]) introduce .gitignore files to the svn repo. I also believe it may have to do with empty directory commits.<ref>https://stackoverflow.com/questions/22822020/convert-an-svn-repository-to-git-with-reposurgeon-without-creating-gitignore-fi</ref> | ||
| Line 72: | Line 72: | ||
<ul> | <ul> | ||
<li>drop all empty changesets | <li>drop all empty changesets | ||
< | <syntaxhighlight lang="bash"> | ||
git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' | git filter-branch --commit-filter 'git_commit_non_empty_tree "$@"' | ||
</ | </syntaxhighlight> | ||
</ul> | </ul> | ||
== Verification == | == Verification == | ||
List branches sorted by date | List branches sorted by date | ||
< | <syntaxhighlight lang="bash"> | ||
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | ||
</ | </syntaxhighlight> | ||
== Other == | == Other == | ||