@matheusbsbs / matheus-bagliano / commits / 3289e86e1e
Fork 0

git-svn: rename 'commit' command to 'set-tree'

'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>

Eric Wong committed Dec 15, 2006 at 23:58 UTC 3289e86e1eb4f38b5c8dfd2f44b4486d2755d6d6
5 files changed +29 -29
Documentation/git-svn.txt
+10 -10
@@ -64,7 +64,7 @@ manually joining branches on commit.
64 against the latest changes in the SVN repository.
65 An optional command-line argument may be specified as an
66 alternative to HEAD.
67 - This is advantageous over 'commit' (below) because it produces
67 + This is advantageous over 'set-tree' (below) because it produces
68 cleaner, more linear history.
69
70 'log'::
@@ -89,7 +89,7 @@ manually joining branches on commit.
89
90 Any other arguments are passed directly to `git log'
91
92 -'commit'::
92 +'set-tree'::
93 You should consider using 'dcommit' instead of this command.
94 Commit specified commit or tree objects to SVN. This relies on
95 your imported fetch data being up-to-date. This makes
@@ -172,7 +172,7 @@ This can allow you to make partial mirrors when running fetch.
172 -::
173 --stdin::
174
175 -Only used with the 'commit' command.
175 +Only used with the 'set-tree' command.
176
177 Read a list of commits from stdin and commit them in reverse
178 order. Only the leading sha1 is read from each line, so
@@ -180,7 +180,7 @@ git-rev-list --pretty=oneline output can be used.
180
181 --rmdir::
182
183 -Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
183 +Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
184
185 Remove directories from the SVN tree if there are no files left
186 behind. SVN can version empty directories, and they are not
@@ -193,7 +193,7 @@ repo-config key: svn.rmdir
193 -e::
194 --edit::
195
196 -Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
196 +Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
197
198 Edit the commit message before committing to SVN. This is off by
199 default for objects that are commits, and forced on when committing
@@ -204,7 +204,7 @@ repo-config key: svn.edit
204 -l<num>::
205 --find-copies-harder::
206
207 -Only used with the 'dcommit', 'commit' and 'commit-diff' commands.
207 +Only used with the 'dcommit', 'set-tree' and 'commit-diff' commands.
208
209 They are both passed directly to git-diff-tree see
210 gitlink:git-diff-tree[1] for more information.
@@ -276,7 +276,7 @@ ADVANCED OPTIONS
276
277 -b<refname>::
278 --branch <refname>::
279 -Used with 'fetch', 'dcommit' or 'commit'.
279 +Used with 'fetch', 'dcommit' or 'set-tree'.
280
281 This can be used to join arbitrary git branches to remotes/git-svn
282 on new commits where the tree object is equivalent.
@@ -392,11 +392,11 @@ REBASE VS. PULL
392 ---------------
393
394 Originally, git-svn recommended that the remotes/git-svn branch be
395 -pulled from. This is because the author favored 'git-svn commit B'
396 -to commit a single head rather than the 'git-svn commit A..B' notation
395 +pulled from. This is because the author favored 'git-svn set-tree B'
396 +to commit a single head rather than the 'git-svn set-tree A..B' notation
397 to commit multiple commits.
398
399 -If you use 'git-svn commit A..B' to commit several diffs and you do not
399 +If you use 'git-svn set-tree A..B' to commit several diffs and you do not
400 have the latest remotes/git-svn merged into my-branch, you should use
401 'git rebase' to update your work branch instead of 'git pull'. 'pull'
402 can cause non-linear history to be flattened when committing into SVN,
git-svn.perl
+6 -6
@@ -107,7 +107,12 @@ my %cmd = (
107 init => [ \&init, "Initialize a repo for tracking" .
108 " (requires URL argument)",
109 \%init_opts ],
110 - commit => [ \&commit, "Commit git revisions to SVN",
110 + dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
111 + { 'merge|m|M' => \$_merge,
112 + 'strategy|s=s' => \$_strategy,
113 + 'dry-run|n' => \$_dry_run,
114 + %cmt_opts } ],
115 + 'set-tree' => [ \&commit, "Set an SVN repository to a git tree-ish",
116 { 'stdin|' => \$_stdin, %cmt_opts, %fc_opts, } ],
117 'show-ignore' => [ \&show_ignore, "Show svn:ignore listings",
118 { 'revision|r=i' => \$_revision } ],
@@ -150,11 +155,6 @@ my %cmd = (
155 'file|F=s' => \$_file,
156 'revision|r=s' => \$_revision,
157 %cmt_opts } ],
153 - dcommit => [ \&dcommit, 'Commit several diffs to merge with upstream',
154 - { 'merge|m|M' => \$_merge,
155 - 'strategy|s=s' => \$_strategy,
156 - 'dry-run|n' => \$_dry_run,
157 - %cmt_opts } ],
158 );
159
160 my $cmd;
t/t9100-git-svn-basic.sh
+11 -11
@@ -56,7 +56,7 @@ git update-index --add --remove dir/a/b/c/d/e/file dir/file file
56 git commit -m "$name"
57
58 test_expect_success "$name" \
59 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch &&
59 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch &&
60 svn up $SVN_TREE &&
61 test -d $SVN_TREE/dir && test ! -d $SVN_TREE/dir/a"
62
@@ -70,7 +70,7 @@ git update-index --add dir/file/file
70 git commit -m "$name"
71
72 test_expect_failure "$name" \
73 - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch' \
73 + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch' \
74 || true
75
76
@@ -85,7 +85,7 @@ git update-index --add -- bar
85 git commit -m "$name"
86
87 test_expect_failure "$name" \
88 - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
88 + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch2' \
89 || true
90
91
@@ -100,7 +100,7 @@ git-update-index --add bar/zzz/yyy
100 git commit -m "$name"
101
102 test_expect_failure "$name" \
103 - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
103 + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch3' \
104 || true
105
106
@@ -115,7 +115,7 @@ git update-index --add -- dir
115 git commit -m "$name"
116
117 test_expect_failure "$name" \
118 - 'git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
118 + 'git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch4' \
119 || true
120
121
@@ -127,7 +127,7 @@ git update-index exec.sh
127 git commit -m "$name"
128
129 test_expect_success "$name" \
130 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
130 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
131 svn up $SVN_TREE &&
132 test ! -x $SVN_TREE/exec.sh"
133
@@ -138,7 +138,7 @@ git update-index exec.sh
138 git commit -m "$name"
139
140 test_expect_success "$name" \
141 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
141 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
142 svn up $SVN_TREE &&
143 test -x $SVN_TREE/exec.sh"
144
@@ -153,7 +153,7 @@ then
153 git commit -m "$name"
154
155 test_expect_success "$name" \
156 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
156 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
157 svn up $SVN_TREE &&
158 test -L $SVN_TREE/exec.sh"
159
@@ -164,7 +164,7 @@ then
164 git commit -m "$name"
165
166 test_expect_success "$name" \
167 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
167 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
168 svn up $SVN_TREE &&
169 test -x $SVN_TREE/bar/zzz &&
170 test -L $SVN_TREE/exec-2.sh"
@@ -177,7 +177,7 @@ then
177 git commit -m "$name"
178
179 test_expect_success "$name" \
180 - "git-svn commit --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
180 + "git-svn set-tree --find-copies-harder --rmdir remotes/git-svn..mybranch5 &&
181 svn up $SVN_TREE &&
182 test -f $SVN_TREE/exec-2.sh &&
183 test ! -L $SVN_TREE/exec-2.sh &&
@@ -192,7 +192,7 @@ then
192 git update-index exec-2.sh
193 git commit -m 'éï∏'
194 export LC_ALL="$GIT_SVN_LC_ALL"
195 - test_expect_success "$name" "git-svn commit HEAD"
195 + test_expect_success "$name" "git-svn set-tree HEAD"
196 unset LC_ALL
197 else
198 echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
t/t9101-git-svn-props.sh
+1 -1
@@ -74,7 +74,7 @@ test_expect_success "$name" \
74 'git checkout -b mybranch remotes/git-svn &&
75 echo Hi again >> kw.c &&
76 git commit -a -m "test keywoards ignoring" &&
77 - git-svn commit remotes/git-svn..mybranch &&
77 + git-svn set-tree remotes/git-svn..mybranch &&
78 git pull . remotes/git-svn'
79
80 expect='/* $Id$ */'
t/t9102-git-svn-deep-rmdir.sh
+1 -1
@@ -21,7 +21,7 @@ test_expect_success 'mirror via git-svn' "
21 test_expect_success 'Try a commit on rmdir' "
22 git rm -f deeply/nested/directory/number/2/another &&
23 git commit -a -m 'remove another' &&
24 - git-svn commit --rmdir HEAD &&
24 + git-svn set-tree --rmdir HEAD &&
25 svn ls -R $svnrepo | grep ^deeply/nested/directory/number/1
26 "
27