summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 162f412)
raw | patch | inline | side by side (parent: 162f412)
author | Eric Wong <normalperson@yhbt.net> | |
Fri, 28 Apr 2006 10:42:38 +0000 (03:42 -0700) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 16 Jun 2006 10:04:20 +0000 (03:04 -0700) |
This should make life easier for all those who type:
`git-rev-parse --symbolic --all | xargs -n1 echo -b`
every time they run git-svn fetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
`git-rev-parse --symbolic --all | xargs -n1 echo -b`
every time they run git-svn fetch.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
contrib/git-svn/git-svn.perl | patch | blob | history |
index 089d597d25d86ce389be225c152fc2c81e3dbdf3..c91160d37f08a1c57448187e04c7c9edbab078c8 100755 (executable)
my $sha1_short = qr/[a-f\d]{4,40}/;
my ($_revision,$_stdin,$_no_ignore_ext,$_no_stop_copy,$_help,$_rmdir,$_edit,
$_find_copies_harder, $_l, $_cp_similarity,
- $_version, $_upgrade, $_authors);
+ $_version, $_upgrade, $_authors, $_branch_all_refs);
my (@_branch_from, %tree_map, %users);
my ($_svn_co_url_revs, $_svn_pg_peg_revs);
my %fc_opts = ( 'no-ignore-externals' => \$_no_ignore_ext,
'branch|b=s' => \@_branch_from,
+ 'branch-all-refs|B' => \$_branch_all_refs,
'authors-file|A=s' => \$_authors );
# yes, 'native' sets "\n". Patches to fix this for non-*nix systems welcome:
version() if $_version;
usage(1) unless defined $cmd;
load_authors() if $_authors;
+load_all_refs() if $_branch_all_refs;
svn_compat_check();
$cmd{$cmd}->[0]->(@ARGV);
exit 0;
}
}
+sub load_all_refs {
+ if (@_branch_from) {
+ print STDERR '--branch|-b parameters are ignored when ',
+ "--branch-all-refs|-B is passed\n";
+ }
+
+ # don't worry about rev-list on non-commit objects/tags,
+ # it shouldn't blow up if a ref is a blob or tree...
+ chomp(@_branch_from = `git-rev-parse --symbolic --all`);
+}
+
# '<svn username> = real-name <email address>' mapping based on git-svnimport:
sub load_authors {
open my $authors, '<', $_authors or die "Can't open $_authors $!\n";