summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9c8518)
raw | patch | inline | side by side (parent: b9c8518)
author | Eric Wong <normalperson@yhbt.net> | |
Sat, 16 Dec 2006 07:58:08 +0000 (23:58 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 16 Dec 2006 13:17:56 +0000 (05:17 -0800) |
'set-tree' probably accurately describes what the command
formerly known as 'commit' does.
I'm not entirely sure that 'dcommit' should be renamed to 'commit'
just yet... Perhaps 'push' or 'push-changes'?
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
formerly known as 'commit' does.
I'm not entirely sure that 'dcommit' should be renamed to 'commit'
just yet... Perhaps 'push' or 'push-changes'?
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index c589a9863064ef3e5f12876d40174fb991cf3b59..f5f57e8f87d4271a634f13f33d6b33af43909473 100644 (file)
against the latest changes in the SVN repository.
An optional command-line argument may be specified as an
alternative to HEAD.
- This is advantageous over 'commit' (below) because it produces
+ This is advantageous over 'set-tree' (below) because it produces
cleaner, more linear history.
'log'::
Any other arguments are passed directly to `git log'
-'commit'::
+'set-tree'::
You should consider using 'dcommit' instead of this command.
Commit specified commit or tree objects to SVN. This relies on
your imported fetch data being up-to-date. This makes
-::
--stdin::
-Only used with the 'commit' command.
+Only used with the 'set-tree' command.
Read a list of commits from stdin and commit them in reverse
order. Only the leading sha1 is read from each line, so
--rmdir::
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
Remove directories from the SVN tree if there are no files left
behind. SVN can version empty directories, and they are not
-e::
--edit::
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
Edit the commit message before committing to SVN. This is off by
default for objects that are commits, and forced on when committing
-l<num>::
--find-copies-harder::
-Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
+Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
They are both passed directly to git-diff-tree see
gitlink:git-diff-tree[1] for more information.
-b<refname>::
--branch <refname>::
-Used with 'fetch', 'dcommit' or 'commit'.
+Used with 'fetch', 'dcommit' or 'set-tree'.
This can be used to join arbitrary git branches to remotes/git-svn
on new commits where the tree object is equivalent.
---------------
Originally, git-svn recommended that the remotes/git-svn branch be
-pulled from. This is because the author favored 'git-svn commit B'
-to commit a single head rather than the 'git-svn commit A..B' notation
+pulled from. This is because the author favored 'git-svn set-tree B'
+to commit a single head rather than the 'git-svn set-tree A..B' notation
to commit multiple commits.
-If you use 'git-svn commit A..B' to commit several diffs and you do not
+If you use 'git-svn set-tree A..B' to commit several diffs and you do not
have the latest remotes/git-svn merged into my-branch, you should use
'git rebase' to update your work branch instead of 'git pull'. 'pull'
can cause non-linear history to be flattened when committing into SVN,
diff --git a/git-svn.perl b/git-svn.perl
index 077e9200be632e5a84dbe10ac58744ad0a130ced..07748bc3e3f4091613c8e78647a471ac21ee46d2 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
init => [ \&init, "Initialize a repo for tracking" .
" (requires URL argument)",
\%init_opts ],
- commit => [ \&commit, "Commit git revisions to SVN",
+ dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
+ { 'merge|m|M' => \$_merge,
+ 'strategy|s=s' => \$_strategy,
+ 'dry-run|n' => \$_dry_run,
+ %cmt_opts } ],
+ 'set-tree' => [ \&commit, "Set an SVN repository to a git tree-ish",
{ 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
'show-ignore' => [ \&show_ignore, "Show svn:ignore listings",
{ 'revision|r=i' => \$_revision } ],
'file|F=s' => \$_file,
'revision|r=s' => \$_revision,
%cmt_opts } ],
- dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
- { 'merge|m|M' => \$_merge,
- 'strategy|s=s' => \$_strategy,
- 'dry-run|n' => \$_dry_run,
- %cmt_opts } ],
);
my $cmd;
index 0fc462e5fe99e520717f35266a337a777eb6fde6..0edf19e48d20bf03dc567a3be73a03892f143632 100755 (executable)
--- a/t/t9100-git-svn-basic.sh
+++ b/t/t9100-git-svn-basic.sh
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch &&
svn up $SVN_TREE &&
test -d $SVN_TREE/dir && test ! -d $SVN_TREE/dir/a"
git commit -m "$name"
test_expect_failure "$name" \
- 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch' \
+ 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch' \
|| true
git commit -m "$name"
test_expect_failure "$name" \
- 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
+ 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
|| true
git commit -m "$name"
test_expect_failure "$name" \
- 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
+ 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
|| true
git commit -m "$name"
test_expect_failure "$name" \
- 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
+ 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
|| true
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up $SVN_TREE &&
test ! -x $SVN_TREE/exec.sh"
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up $SVN_TREE &&
test -x $SVN_TREE/exec.sh"
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up $SVN_TREE &&
test -L $SVN_TREE/exec.sh"
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up $SVN_TREE &&
test -x $SVN_TREE/bar/zzz &&
test -L $SVN_TREE/exec-2.sh"
git commit -m "$name"
test_expect_success "$name" \
- "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
+ "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
svn up $SVN_TREE &&
test -f $SVN_TREE/exec-2.sh &&
test ! -L $SVN_TREE/exec-2.sh &&
git update-index exec-2.sh
git commit -m 'éï∏'
export LC_ALL="$GIT_SVN_LC_ALL"
- test_expect_success "$name" "git-svn commit HEAD"
+ test_expect_success "$name" "git-svn set-tree HEAD"
unset LC_ALL
else
echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
index a5a235f100709f503887e9a69c5b510e0b04534f..5543b07f16d54bb5aa6fab6ab9cde79837a3e68b 100755 (executable)
--- a/t/t9101-git-svn-props.sh
+++ b/t/t9101-git-svn-props.sh
'git checkout -b mybranch remotes/git-svn &&
echo Hi again >> kw.c &&
git commit -a -m "test keywoards ignoring" &&
- git-svn commit remotes/git-svn..mybranch &&
+ git-svn set-tree remotes/git-svn..mybranch &&
git pull . remotes/git-svn'
expect='/* $Id$ */'
index d693d183c8e41a4c1e948e690f42a55c985543b3..572aaedc06986505ff7b16b5553632051dfa2c58 100755 (executable)
test_expect_success 'Try a commit on rmdir' "
git rm -f deeply/nested/directory/number/2/another &&
git commit -a -m 'remove another' &&
- git-svn commit --rmdir HEAD &&
+ git-svn set-tree --rmdir HEAD &&
svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1
"