mirror of
https://github.com/git/git.git
synced 2025-01-20 14:34:11 +08:00
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:
commit
89df580d0a
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
-------
|
||||
|
@ -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
|
||||
|
@ -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++;
|
||||
|
@ -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";
|
||||
|
@ -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 &&
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user