Skip to content

Commit 89df580

Browse files
committed
Merge branch 'maint'
* maint: Fixed update-hook example allow-users format. Documentation/git-svn: updated design philosophy notes t/t4014: test "am -3" with mode-only change. Fix lapsus in builtin-apply.c git-push: documentation and tests for pushing only branches git-svnimport: Use separate arguments in the pipe for git-rev-parse
2 parents d288404 + 8ae6749 commit 89df580

File tree

8 files changed

+31
-17
lines changed

8 files changed

+31
-17
lines changed

Documentation/git-push.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ even if it does not result in a fast forward update.
4848
Note: If no explicit refspec is found, (that is neither
4949
on the command line nor in any Push line of the
5050
corresponding remotes file---see below), then all the
51-
refs that exist both on the local side and on the remote
51+
heads that exist both on the local side and on the remote
5252
side are updated.
5353
+
5454
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
@@ -61,7 +61,7 @@ the remote repository.
6161

6262
\--all::
6363
Instead of naming each ref to push, specifies that all
64-
refs be pushed.
64+
refs under `$GIT_DIR/refs/heads/` be pushed.
6565

6666
\--tags::
6767
All refs under `$GIT_DIR/refs/tags` are pushed, in

Documentation/git-send-pack.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ OPTIONS
3232

3333
\--all::
3434
Instead of explicitly specifying which refs to update,
35-
update all refs that locally exist.
35+
update all heads that locally exist.
3636

3737
\--force::
3838
Usually, the command refuses to update a remote ref that
@@ -70,7 +70,7 @@ With '--all' flag, all refs that exist locally are transferred to
7070
the remote side. You cannot specify any '<ref>' if you use
7171
this flag.
7272

73-
Without '--all' and without any '<ref>', the refs that exist
73+
Without '--all' and without any '<ref>', the heads that exist
7474
both on the local side and on the remote side are updated.
7575

7676
When one or more '<ref>' are specified explicitly, it can be either a

Documentation/git-svn.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,12 @@ previous commits in SVN.
478478
DESIGN PHILOSOPHY
479479
-----------------
480480
Merge tracking in Subversion is lacking and doing branched development
481-
with Subversion is cumbersome as a result. git-svn does not do
482-
automated merge/branch tracking by default and leaves it entirely up to
483-
the user on the git side. git-svn does however follow copy
484-
history of the directory that it is tracking, however (much like
485-
how 'svn log' works).
481+
with Subversion can be cumbersome as a result. While git-svn can track
482+
copy history (including branches and tags) for repositories adopting a
483+
standard layout, it cannot yet represent merge history that happened
484+
inside git back upstream to SVN users. Therefore it is advised that
485+
users keep history as linear as possible inside git to ease
486+
compatibility with SVN (see the CAVEATS section below).
486487

487488
CAVEATS
488489
-------

Documentation/howto/update-hook-example.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
158158
allowed-groups, to describe which heads can be pushed into by
159159
whom. The format of each file would look like this:
160160

161-
refs/heads/master junio
161+
refs/heads/master junio
162162
refs/heads/cogito$ pasky
163-
refs/heads/bw/ linus
164-
refs/heads/tmp/ *
165-
refs/tags/v[0-9]* junio
163+
refs/heads/bw/.* linus
164+
refs/heads/tmp/.* .*
165+
refs/tags/v[0-9].* junio
166166

167167
With this, Linus can push or create "bw/penguin" or "bw/zebra"
168168
or "bw/panda" branches, Pasky can do only "cogito", and JC can

builtin-apply.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
254254
if (name) {
255255
char *cp = name;
256256
while (p_value) {
257-
cp = strchr(name, '/');
257+
cp = strchr(cp, '/');
258258
if (!cp)
259259
break;
260260
cp++;

git-svnimport.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ sub commit {
633633

634634
my $rev;
635635
if($revision > $opt_s and defined $parent) {
636-
open(H,"git-rev-parse --verify $parent |");
636+
open(H,'-|',"git-rev-parse","--verify",$parent);
637637
$rev = <H>;
638638
close(H) or do {
639639
print STDERR "$revision: cannot find commit '$parent'!\n";

t/t4014-format-patch.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ test_description='Format-patch skipping already incorporated patches'
1010
test_expect_success setup '
1111
1212
for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file &&
13-
git add file &&
13+
cat file >elif &&
14+
git add file elif &&
1415
git commit -m Initial &&
1516
git checkout -b side &&
1617
1718
for i in 1 2 5 6 A B C 7 8 9 10; do echo "$i"; done >file &&
18-
git update-index file &&
19+
chmod +x elif &&
20+
git update-index file elif &&
21+
git update-index --chmod=+x elif &&
1922
git commit -m "Side changes #1" &&
2023
2124
for i in D E F; do echo "$i"; done >>file &&

t/t5400-send-pack.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,14 @@ test_expect_success \
113113
! git diff .git/refs/heads/master victim/.git/refs/heads/master
114114
'
115115

116+
test_expect_success \
117+
'pushing does not include non-head refs' '
118+
mkdir parent && cd parent &&
119+
git-init && touch file && git-add file && git-commit -m add &&
120+
cd .. &&
121+
git-clone parent child && cd child && git-push --all &&
122+
cd ../parent &&
123+
git-branch -a >branches && ! grep -q origin/master branches
124+
'
125+
116126
test_done

0 commit comments

Comments
 (0)