Skip to content

Commit 0f3d855

Browse files
committed
Merge branch 'master' of git://git.bogomips.org/git-svn
* 'master' of git://git.bogomips.org/git-svn: git-svn: allow --version to work anywhere git-svn: document svn.authorsProg in config
2 parents b830783 + c0071ae commit 0f3d855

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

Documentation/git-svn.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,9 @@ config key: svn.authorsfile
625625
with the committer name as the first argument. The program is
626626
expected to return a single line of the form "Name <email>",
627627
which will be treated as if included in the authors file.
628+
+
629+
[verse]
630+
config key: svn.authorsProg
628631

629632
-q::
630633
--quiet::

git-svn.perl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ sub term_init {
339339
die "failed to open $ENV{GIT_DIR}: $!\n";
340340
$ENV{GIT_DIR} = $1 if <$fh> =~ /^gitdir: (.+)$/;
341341
}
342-
} else {
342+
} elsif ($cmd) {
343343
my ($git_dir, $cdup);
344344
git_cmd_try {
345345
$git_dir = command_oneline([qw/rev-parse --git-dir/]);
@@ -356,7 +356,7 @@ sub term_init {
356356

357357
my %opts = %{$cmd{$cmd}->[2]} if (defined $cmd);
358358

359-
read_git_config(\%opts);
359+
read_git_config(\%opts) if $ENV{GIT_DIR};
360360
if ($cmd && ($cmd eq 'log' || $cmd eq 'blame')) {
361361
Getopt::Long::Configure('pass_through');
362362
}

t/t9100-git-svn-basic.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ case "$GIT_SVN_LC_ALL" in
1919
;;
2020
esac
2121

22+
deepdir=nothing-above
23+
ceiling=$PWD
24+
25+
test_expect_success 'git svn --version works anywhere' '
26+
mkdir -p "$deepdir" && (
27+
export GIT_CEILING_DIRECTORIES="$ceiling" &&
28+
cd "$deepdir" &&
29+
git svn --version
30+
)
31+
'
32+
33+
test_expect_success 'git svn help works anywhere' '
34+
mkdir -p "$deepdir" && (
35+
export GIT_CEILING_DIRECTORIES="$ceiling" &&
36+
cd "$deepdir" &&
37+
git svn help
38+
)
39+
'
40+
2241
test_expect_success \
2342
'initialize git svn' '
2443
mkdir import &&

0 commit comments

Comments
 (0)