aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-push.txt4
-rw-r--r--Documentation/git-send-pack.txt4
-rw-r--r--Documentation/git-svn.txt11
-rw-r--r--Documentation/howto/update-hook-example.txt8
-rw-r--r--builtin-apply.c2
-rwxr-xr-xgit-svnimport.perl2
-rwxr-xr-xt/t4014-format-patch.sh7
-rwxr-xr-xt/t5400-send-pack.sh10
8 files changed, 31 insertions, 17 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 7b8e075c4..6bc559ddd 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -48,7 +48,7 @@ even if it does not result in a fast forward update.
Note: If no explicit refspec is found, (that is neither
on the command line nor in any Push line of the
corresponding remotes file---see below), then all the
-refs that exist both on the local side and on the remote
+heads that exist both on the local side and on the remote
side are updated.
+
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
@@ -61,7 +61,7 @@ the remote repository.
\--all::
Instead of naming each ref to push, specifies that all
- refs be pushed.
+ refs under `$GIT_DIR/refs/heads/` be pushed.
\--tags::
All refs under `$GIT_DIR/refs/tags` are pushed, in
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
index 205bfd2d2..3271e8818 100644
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -32,7 +32,7 @@ OPTIONS
\--all::
Instead of explicitly specifying which refs to update,
- update all refs that locally exist.
+ update all heads that locally exist.
\--force::
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
the remote side. You cannot specify any '<ref>' if you use
this flag.
-Without '--all' and without any '<ref>', the refs that exist
+Without '--all' and without any '<ref>', the heads that exist
both on the local side and on the remote side are updated.
When one or more '<ref>' are specified explicitly, it can be either a
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index be2e34eb8..e157c6ab5 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -478,11 +478,12 @@ previous commits in SVN.
DESIGN PHILOSOPHY
-----------------
Merge tracking in Subversion is lacking and doing branched development
-with Subversion is cumbersome as a result. git-svn does not do
-automated merge/branch tracking by default and leaves it entirely up to
-the user on the git side. git-svn does however follow copy
-history of the directory that it is tracking, however (much like
-how 'svn log' works).
+with Subversion can be cumbersome as a result. While git-svn can track
+copy history (including branches and tags) for repositories adopting a
+standard layout, it cannot yet represent merge history that happened
+inside git back upstream to SVN users. Therefore it is advised that
+users keep history as linear as possible inside git to ease
+compatibility with SVN (see the CAVEATS section below).
CAVEATS
-------
diff --git a/Documentation/howto/update-hook-example.txt b/Documentation/howto/update-hook-example.txt
index 3a33696f0..88765b557 100644
--- a/Documentation/howto/update-hook-example.txt
+++ b/Documentation/howto/update-hook-example.txt
@@ -158,11 +158,11 @@ This uses two files, $GIT_DIR/info/allowed-users and
allowed-groups, to describe which heads can be pushed into by
whom. The format of each file would look like this:
- refs/heads/master junio
+ refs/heads/master junio
refs/heads/cogito$ pasky
- refs/heads/bw/ linus
- refs/heads/tmp/ *
- refs/tags/v[0-9]* junio
+ refs/heads/bw/.* linus
+ refs/heads/tmp/.* .*
+ refs/tags/v[0-9].* junio
With this, Linus can push or create "bw/penguin" or "bw/zebra"
or "bw/panda" branches, Pasky can do only "cogito", and JC can
diff --git a/builtin-apply.c b/builtin-apply.c
index 05ce2205f..86d89a4a7 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -254,7 +254,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
if (name) {
char *cp = name;
while (p_value) {
- cp = strchr(name, '/');
+ cp = strchr(cp, '/');
if (!cp)
break;
cp++;
diff --git a/git-svnimport.perl b/git-svnimport.perl
index d3ad5b904..aa5b3b2c9 100755
--- a/git-svnimport.perl
+++ b/git-svnimport.perl
@@ -633,7 +633,7 @@ sub commit {
my $rev;
if($revision > $opt_s and defined $parent) {
- open(H,"git-rev-parse --verify $parent |");
+ open(H,'-|',"git-rev-parse","--verify",$parent);
$rev = <H>;
close(H) or do {
print STDERR "$revision: cannot find commit '$parent'!\n";
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index df969bb69..0a6fe5337 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -10,12 +10,15 @@ test_description='Format-patch skipping already incorporated patches'
test_expect_success setup '
for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file &&
- git add file &&
+ cat file >elif &&
+ git add file elif &&
git commit -m Initial &&
git checkout -b side &&
for i in 1 2 5 6 A B C 7 8 9 10; do echo "$i"; done >file &&
- git update-index file &&
+ chmod +x elif &&
+ git update-index file elif &&
+ git update-index --chmod=+x elif &&
git commit -m "Side changes #1" &&
for i in D E F; do echo "$i"; done >>file &&
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index 6c8767e1d..57c6397be 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -113,4 +113,14 @@ test_expect_success \
! git diff .git/refs/heads/master victim/.git/refs/heads/master
'
+test_expect_success \
+ 'pushing does not include non-head refs' '
+ mkdir parent && cd parent &&
+ git-init && touch file && git-add file && git-commit -m add &&
+ cd .. &&
+ git-clone parent child && cd child && git-push --all &&
+ cd ../parent &&
+ git-branch -a >branches && ! grep -q origin/master branches
+'
+
test_done