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
This commit is contained in:
@ -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
|
Note: If no explicit refspec is found, (that is neither
|
||||||
on the command line nor in any Push line of the
|
on the command line nor in any Push line of the
|
||||||
corresponding remotes file---see below), then all 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.
|
side are updated.
|
||||||
+
|
+
|
||||||
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
|
`tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
|
||||||
@ -61,7 +61,7 @@ the remote repository.
|
|||||||
|
|
||||||
\--all::
|
\--all::
|
||||||
Instead of naming each ref to push, specifies that all
|
Instead of naming each ref to push, specifies that all
|
||||||
refs be pushed.
|
refs under `$GIT_DIR/refs/heads/` be pushed.
|
||||||
|
|
||||||
\--tags::
|
\--tags::
|
||||||
All refs under `$GIT_DIR/refs/tags` are pushed, in
|
All refs under `$GIT_DIR/refs/tags` are pushed, in
|
||||||
|
@ -32,7 +32,7 @@ OPTIONS
|
|||||||
|
|
||||||
\--all::
|
\--all::
|
||||||
Instead of explicitly specifying which refs to update,
|
Instead of explicitly specifying which refs to update,
|
||||||
update all refs that locally exist.
|
update all heads that locally exist.
|
||||||
|
|
||||||
\--force::
|
\--force::
|
||||||
Usually, the command refuses to update a remote ref that
|
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
|
the remote side. You cannot specify any '<ref>' if you use
|
||||||
this flag.
|
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.
|
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
|
When one or more '<ref>' are specified explicitly, it can be either a
|
||||||
|
@ -478,11 +478,12 @@ previous commits in SVN.
|
|||||||
DESIGN PHILOSOPHY
|
DESIGN PHILOSOPHY
|
||||||
-----------------
|
-----------------
|
||||||
Merge tracking in Subversion is lacking and doing branched development
|
Merge tracking in Subversion is lacking and doing branched development
|
||||||
with Subversion is cumbersome as a result. git-svn does not do
|
with Subversion can be cumbersome as a result. While git-svn can track
|
||||||
automated merge/branch tracking by default and leaves it entirely up to
|
copy history (including branches and tags) for repositories adopting a
|
||||||
the user on the git side. git-svn does however follow copy
|
standard layout, it cannot yet represent merge history that happened
|
||||||
history of the directory that it is tracking, however (much like
|
inside git back upstream to SVN users. Therefore it is advised that
|
||||||
how 'svn log' works).
|
users keep history as linear as possible inside git to ease
|
||||||
|
compatibility with SVN (see the CAVEATS section below).
|
||||||
|
|
||||||
CAVEATS
|
CAVEATS
|
||||||
-------
|
-------
|
||||||
|
@ -160,9 +160,9 @@ whom. The format of each file would look like this:
|
|||||||
|
|
||||||
refs/heads/master junio
|
refs/heads/master junio
|
||||||
refs/heads/cogito$ pasky
|
refs/heads/cogito$ pasky
|
||||||
refs/heads/bw/ linus
|
refs/heads/bw/.* linus
|
||||||
refs/heads/tmp/ *
|
refs/heads/tmp/.* .*
|
||||||
refs/tags/v[0-9]* junio
|
refs/tags/v[0-9].* junio
|
||||||
|
|
||||||
With this, Linus can push or create "bw/penguin" or "bw/zebra"
|
With this, Linus can push or create "bw/penguin" or "bw/zebra"
|
||||||
or "bw/panda" branches, Pasky can do only "cogito", and JC can
|
or "bw/panda" branches, Pasky can do only "cogito", and JC can
|
||||||
|
@ -254,7 +254,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
|
|||||||
if (name) {
|
if (name) {
|
||||||
char *cp = name;
|
char *cp = name;
|
||||||
while (p_value) {
|
while (p_value) {
|
||||||
cp = strchr(name, '/');
|
cp = strchr(cp, '/');
|
||||||
if (!cp)
|
if (!cp)
|
||||||
break;
|
break;
|
||||||
cp++;
|
cp++;
|
||||||
|
@ -633,7 +633,7 @@ sub commit {
|
|||||||
|
|
||||||
my $rev;
|
my $rev;
|
||||||
if($revision > $opt_s and defined $parent) {
|
if($revision > $opt_s and defined $parent) {
|
||||||
open(H,"git-rev-parse --verify $parent |");
|
open(H,'-|',"git-rev-parse","--verify",$parent);
|
||||||
$rev = <H>;
|
$rev = <H>;
|
||||||
close(H) or do {
|
close(H) or do {
|
||||||
print STDERR "$revision: cannot find commit '$parent'!\n";
|
print STDERR "$revision: cannot find commit '$parent'!\n";
|
||||||
|
@ -10,12 +10,15 @@ test_description='Format-patch skipping already incorporated patches'
|
|||||||
test_expect_success setup '
|
test_expect_success setup '
|
||||||
|
|
||||||
for i in 1 2 3 4 5 6 7 8 9 10; do echo "$i"; done >file &&
|
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 commit -m Initial &&
|
||||||
git checkout -b side &&
|
git checkout -b side &&
|
||||||
|
|
||||||
for i in 1 2 5 6 A B C 7 8 9 10; do echo "$i"; done >file &&
|
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" &&
|
git commit -m "Side changes #1" &&
|
||||||
|
|
||||||
for i in D E F; do echo "$i"; done >>file &&
|
for i in D E F; do echo "$i"; done >>file &&
|
||||||
|
@ -113,4 +113,14 @@ test_expect_success \
|
|||||||
! git diff .git/refs/heads/master victim/.git/refs/heads/master
|
! 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
|
test_done
|
||||||
|
Reference in New Issue
Block a user