Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Junio C Hamano committed Sep 19, 2007
2 parents d288404 + 8ae6749 commit 89df580
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>`.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Documentation/git-send-pack.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions Documentation/git-svn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand Down
8 changes: 4 additions & 4 deletions Documentation/howto/update-hook-example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builtin-apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down
2 changes: 1 addition & 1 deletion git-svnimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 5 additions & 2 deletions t/t4014-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
10 changes: 10 additions & 0 deletions t/t5400-send-pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 89df580

Please sign in to comment.