]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
10 years agofetch: add --update-shallow to accept refs that update .git/shallow
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:42 +0000 (20:02 +0700)] 
fetch: add --update-shallow to accept refs that update .git/shallow

The same steps are done as in when --update-shallow is not given. The
only difference is we now add all shallow commits in "ours" and
"theirs" to .git/shallow (aka "step 8").

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoupload-pack: make sure deepening preserves shallow roots
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:41 +0000 (20:02 +0700)] 
upload-pack: make sure deepening preserves shallow roots

When "fetch --depth=N" where N exceeds the longest chain of history in
the source repo, usually we just send an "unshallow" line to the
client so full history is obtained.

When the source repo is shallow we need to make sure to "unshallow"
the current shallow point _and_ "shallow" again when the commit
reaches its shallow bottom in the source repo.

This should fix both cases: large <N> and --unshallow.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofetch: support fetching from a shallow repository
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:40 +0000 (20:02 +0700)] 
fetch: support fetching from a shallow repository

This patch just put together pieces from the 8 steps patch. We stop at
step 7 and reject refs that require new shallow commits.

Note that, by rejecting refs that require new shallow commits, we
leave dangling objects in the repo, which become "object islands" by
the next "git fetch" of the same source.

If the first fetch our "ours" set is zero and we do practically
nothing at step 7, "ours" is full at the next fetch and we may need to
walk through commits for reachability test. Room for improvement.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoclone: support remote shallow repository
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:39 +0000 (20:02 +0700)] 
clone: support remote shallow repository

Cloning from a shallow repository does not follow the "8 steps for new
.git/shallow" because if it does we need to get through step 6 for all
refs. That means commit walking down to the bottom.

Instead the rule to create .git/shallow is simpler and, more
importantly, cheap: if a shallow commit is found in the pack, it's
probably used (i.e. reachable from some refs), so we add it. Others
are dropped.

One may notice this method seems flawed by the word "probably". A
shallow commit may not be reachable from any refs at all if it's
attached to an object island (a group of objects that are not
reachable by any refs).

If that object island is not complete, a new fetch request may send
more objects to connect it to some ref. At that time, because we
incorrectly installed the shallow commit in this island, the user will
not see anything after that commit (fsck is still ok). This is not
desired.

Given that object islands are rare (C Git never sends such islands for
security reasons) and do not really harm the repository integrity, a
tradeoff is made to surprise the user occasionally but work faster
everyday.

A new option --strict could be added later that follows exactly the 8
steps. "git prune" can also learn to remove dangling objects _and_ the
shallow commits that are attached to them from .git/shallow.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofetch-pack.h: one statement per bitfield declaration
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:38 +0000 (20:02 +0700)] 
fetch-pack.h: one statement per bitfield declaration

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofetch-pack.c: move shallow update code out of fetch_pack()
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:37 +0000 (20:02 +0700)] 
fetch-pack.c: move shallow update code out of fetch_pack()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoshallow.c: steps 6 and 7 to select new commits for .git/shallow
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:36 +0000 (20:02 +0700)] 
shallow.c: steps 6 and 7 to select new commits for .git/shallow

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoshallow.c: the 8 steps to select new commits for .git/shallow
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:35 +0000 (20:02 +0700)] 
shallow.c: the 8 steps to select new commits for .git/shallow

Suppose a fetch or push is requested between two shallow repositories
(with no history deepening or shortening). A pack that contains
necessary objects is transferred over together with .git/shallow of
the sender. The receiver has to determine whether it needs to update
.git/shallow if new refs needs new shallow comits.

The rule here is avoid updating .git/shallow by default. But we don't
want to waste the received pack. If the pack contains two refs, one
needs new shallow commits installed in .git/shallow and one does not,
we keep the latter and reject/warn about the former.

Even if .git/shallow update is allowed, we only add shallow commits
strictly necessary for the former ref (remember the sender can send
more shallow commits than necessary) and pay attention not to
accidentally cut the receiver history short (no history shortening is
asked for)

So the steps to figure out what ref need what new shallow commits are:

1. Split the sender shallow commit list into "ours" and "theirs" list
   by has_sha1_file. Those that exist in current repo in "ours", the
   remaining in "theirs".

2. Check the receiver .git/shallow, remove from "ours" the ones that
   also exist in .git/shallow.

3. Fetch the new pack. Either install or unpack it.

4. Do has_sha1_file on "theirs" list again. Drop the ones that fail
   has_sha1_file. Obviously the new pack does not need them.

5. If the pack is kept, remove from "ours" the ones that do not exist
   in the new pack.

6. Walk the new refs to answer the question "what shallow commits,
   both ours and theirs, are required in .git/shallow in order to add
   this ref?". Shallow commits not associated to any refs are removed
   from their respective list.

7. (*) Check reachability (from the current refs) of all remaining
   commits in "ours". Those reachable are removed. We do not want to
   cut any part of our (reachable) history. We only check up
   commits. True reachability test is done by
   check_everything_connected() at the end as usual.

8. Combine the final "ours" and "theirs" and add them all to
   .git/shallow. Install new refs. The case where some hook rejects
   some refs on a push is explained in more detail in the push
   patches.

Of these steps, #6 and #7 are expensive. Both require walking through
some commits, or in the worst case all commits. And we rather avoid
them in at least common case, where the transferred pack does not
contain any shallow commits that the sender advertises. Let's look at
each scenario:

1) the sender has longer history than the receiver

   All shallow commits from the sender will be put into "theirs" list
   at step 1 because none of them exists in current repo. In the
   common case, "theirs" becomes empty at step 4 and exit early.

2) the sender has shorter history than the receiver

   All shallow commits from the sender are likely in "ours" list at
   step 1. In the common case, if the new pack is kept, we could empty
   "ours" and exit early at step 5.

   If the pack is not kept, we hit the expensive step 6 then exit
   after "ours" is emptied. There'll be only a handful of objects to
   walk in fast-forward case. If it's forced update, we may need to
   walk to the bottom.

3) the sender has same .git/shallow as the receiver

   This is similar to case 2 except that "ours" should be emptied at
   step 2 and exit early.

A fetch after "clone --depth=X" is case 1. A fetch after "clone" (from
a shallow repo) is case 3. Luckily they're cheap for the common case.

A push from "clone --depth=X" falls into case 2, which is expensive.
Some more work may be done at the sender/client side to avoid more
work on the server side: if the transferred pack does not contain any
shallow commits, send-pack should not send any shallow commits to the
receive-pack, effectively turning it into a normal push and avoid all
steps.

This patch implements all steps except #3, already handled by
fetch-pack and receive-pack, #6 and #7, which has their own patch due
to their size.

(*) in previous versions step 7 was put before step 3. I reorder it so
    that the common case that keeps the pack does not need to walk
    commits at all. In future if we implement faster commit
    reachability check (maybe with the help of pack bitmaps or commit
    cache), step 7 could become cheap and be moved up before 6 again.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoshallow.c: extend setup_*_shallow() to accept extra shallow commits
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:34 +0000 (20:02 +0700)] 
shallow.c: extend setup_*_shallow() to accept extra shallow commits

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoconnect.c: teach get_remote_heads to parse "shallow" lines
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:33 +0000 (20:02 +0700)] 
connect.c: teach get_remote_heads to parse "shallow" lines

No callers pass a non-empty pointer as shallow_points at this
stage. As a result, all clients still refuse to talk to shallow
repository on the other end.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomake the sender advertise shallow commits to the receiver
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:32 +0000 (20:02 +0700)] 
make the sender advertise shallow commits to the receiver

If either receive-pack or upload-pack is called on a shallow
repository, shallow commits (*) will be sent after the ref
advertisement (but before the packet flush), so that the receiver has
the full "shape" of the sender's commit graph. This will be needed for
the receiver to update its .git/shallow if necessary.

This breaks the protocol for all clients trying to push to a shallow
repo, or fetch from one. Which is basically the same end result as
today's "is_repository_shallow() && die()" in receive-pack and
upload-pack. New clients will be made aware of shallow upstream and
can make use of this information.

The sender must send all shallow commits that are sent in the
following pack. It may send more shallow commits than necessary.

upload-pack for example may choose to advertise no shallow commits if
it knows in advance that the pack it's going to send contains no
shallow commits. But upload-pack is the server, so we choose the
cheaper way, send full .git/shallow and let the client deal with it.

Smart HTTP is not affected by this patch. Shallow support on
smart-http comes later separately.

(*) A shallow commit is a commit that terminates the revision
    walker. It is usually put in .git/shallow in order to keep the
    revision walker from going out of bound because there is no
    guarantee that objects behind this commit is available.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoclone: prevent --reference to a shallow repository
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:31 +0000 (20:02 +0700)] 
clone: prevent --reference to a shallow repository

If we borrow objects from another repository, we should also pay
attention to their $GIT_DIR/shallow (and even info/grafts). But
current alternates code does not.

Reject alternate repos that are shallow because we do not do it
right. In future the alternate code may be updated to check
$GIT_DIR/shallow properly so that this restriction could be lifted.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosend-pack: forbid pushing from a shallow repository
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:30 +0000 (20:02 +0700)] 
send-pack: forbid pushing from a shallow repository

send-pack can send a pack with loose ends to the server.  receive-pack
before 6d4bb38 (fetch: verify we have everything we need before
updating our ref - 2011-09-01) does not detect this and keeps the pack
anyway, which corrupts the repository, at least from fsck point of
view.

send-pack will learn to safely push from a shallow repository later.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoremote.h: replace struct extra_have_objects with struct sha1_array
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:29 +0000 (20:02 +0700)] 
remote.h: replace struct extra_have_objects with struct sha1_array

The latter can do everything the former can and is used in many more
places.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotransport.h: remove send_pack prototype, already defined in send-pack.h
Nguyễn Thái Ngọc Duy [Thu, 5 Dec 2013 13:02:28 +0000 (20:02 +0700)] 
transport.h: remove send_pack prototype, already defined in send-pack.h

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5 v1.8.5
Junio C Hamano [Wed, 27 Nov 2013 20:14:45 +0000 (12:14 -0800)] 
Git 1.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with maint
Junio C Hamano [Wed, 27 Nov 2013 20:13:29 +0000 (12:13 -0800)] 
Sync with maint

* maint:
  remote-hg: don't decode UTF-8 paths into Unicode objects

10 years agoremote-hg: don't decode UTF-8 paths into Unicode objects
Richard Hansen [Mon, 18 Nov 2013 04:12:42 +0000 (23:12 -0500)] 
remote-hg: don't decode UTF-8 paths into Unicode objects

The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rh/remote-hg-bzr-updates' (early part)
Junio C Hamano [Mon, 25 Nov 2013 16:20:02 +0000 (08:20 -0800)] 
Merge branch 'rh/remote-hg-bzr-updates' (early part)

Unbreaks a recent breakage due to use of unquote-c-style.

This may need to be cherry-picked down to 1.8.4.x series.

* 'rh/remote-hg-bzr-updates' (early part):
  remote-hg: don't decode UTF-8 paths into Unicode objects

10 years agoGit 1.8.5-rc3 v1.8.5-rc3
Junio C Hamano [Wed, 20 Nov 2013 19:18:25 +0000 (11:18 -0800)] 
Git 1.8.5-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoSync with 1.8.4.4
Junio C Hamano [Wed, 20 Nov 2013 19:26:59 +0000 (11:26 -0800)] 
Sync with 1.8.4.4

10 years agoGit 1.8.4.4 v1.8.4.4
Junio C Hamano [Wed, 20 Nov 2013 19:26:08 +0000 (11:26 -0800)] 
Git 1.8.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'mb/relnotes-1.8.5-fix'
Junio C Hamano [Wed, 20 Nov 2013 19:15:25 +0000 (11:15 -0800)] 
Merge branch 'mb/relnotes-1.8.5-fix'

* mb/relnotes-1.8.5-fix:
  RelNotes: spelling & grammar fixes

10 years agoRelNotes: spelling & grammar fixes
Marc Branchaud [Thu, 14 Nov 2013 17:01:13 +0000 (12:01 -0500)] 
RelNotes: spelling & grammar fixes

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'nd/literal-pathspecs'
Junio C Hamano [Mon, 18 Nov 2013 22:31:29 +0000 (14:31 -0800)] 
Merge branch 'nd/literal-pathspecs'

Fixes a regression on 'master' since v1.8.4.

* nd/literal-pathspecs:
  pathspec: stop --*-pathspecs impact on internal parse_pathspec() uses

10 years agoremote-hg: don't decode UTF-8 paths into Unicode objects
Richard Hansen [Mon, 18 Nov 2013 04:12:42 +0000 (23:12 -0500)] 
remote-hg: don't decode UTF-8 paths into Unicode objects

The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'maint'
Junio C Hamano [Mon, 18 Nov 2013 20:25:28 +0000 (12:25 -0800)] 
Merge branch 'maint'

Hotfix for recent regression while talking to upload-pack
in a repository with many symbolic refs.

* maint:
  Revert "upload-pack: send non-HEAD symbolic refs"

10 years agoMerge branch 'jx/branch-vv-always-compare-with-upstream'
Junio C Hamano [Mon, 18 Nov 2013 20:24:49 +0000 (12:24 -0800)] 
Merge branch 'jx/branch-vv-always-compare-with-upstream'

Hot-fix for a regression.

* jx/branch-vv-always-compare-with-upstream:
  branch: fix --verbose output column alignment

10 years agobranch: fix --verbose output column alignment
Torstein Hegge [Thu, 14 Nov 2013 18:18:01 +0000 (19:18 +0100)] 
branch: fix --verbose output column alignment

Commit f2e0873 (branch: report invalid tracking branch as gone) removed
an early return from fill_tracking_info() in the path taken when 'git
branch -v' lists a branch in sync with its upstream. This resulted in an
unconditionally added space in front of the subject line:

    $ git branch -v
    * master f5eb3da  commit pushed to upstream
      topic  f935eb6 unpublished topic

Instead, only add the trailing space if a decoration have been added.

To catch this kind of whitespace breakage in the tests, be a bit less
smart when filtering the output through sed.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoRevert "upload-pack: send non-HEAD symbolic refs"
Junio C Hamano [Mon, 18 Nov 2013 18:15:45 +0000 (10:15 -0800)] 
Revert "upload-pack: send non-HEAD symbolic refs"

This reverts commit 5e7dcad771cb873e278a0571b46910d7c32e2f6c; there
may be unbounded number of symbolic refs in the repository, but the
capability header line in the on-wire protocol has a rather low
length limit.

10 years agoGit 1.8.5-rc2 v1.8.5-rc2
Junio C Hamano [Wed, 13 Nov 2013 20:59:31 +0000 (12:59 -0800)] 
Git 1.8.5-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 12 Nov 2013 19:26:11 +0000 (11:26 -0800)] 
Merge git://github.com/git-l10n/git-po

* git://github.com/git-l10n/git-po:
  l10n: de.po: improve error message when pushing to unknown upstream
  l10n: de.po: translate 68 new messages
  po/TEAMS: update Thomas Rast's email address
  l10n: Update Swedish translation (2194t0f0u)
  l10n: fr.po 2194/1294 messages translated
  l10n: zh_CN.po: translate 68 messages (2194t0f0u)
  l10n: vi.po (2194t): Update and minor fix
  l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)

10 years agoCorrect word usage of "timezone" in "Documentation" directory
Jason St. John [Sat, 9 Nov 2013 00:48:52 +0000 (19:48 -0500)] 
Correct word usage of "timezone" in "Documentation" directory

"timezone" is two words, not one (i.e. "time zone" is correct).

Correct this in these files:
-- date-formats.txt
-- git-blame.txt
-- git-cvsimport.txt
-- git-fast-import.txt
-- git-svn.txt
-- gitweb.conf.txt
-- rev-list-options.txt

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agol10n: de.po: improve error message when pushing to unknown upstream
Ralf Thielow [Fri, 8 Nov 2013 19:34:35 +0000 (20:34 +0100)] 
l10n: de.po: improve error message when pushing to unknown upstream

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
10 years agol10n: de.po: translate 68 new messages
Ralf Thielow [Sat, 2 Nov 2013 17:58:52 +0000 (18:58 +0100)] 
l10n: de.po: translate 68 new messages

Translate 68 new messages came from git.pot update in 727b957
(l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
10 years agopo/TEAMS: update Thomas Rast's email address
Ralf Thielow [Sat, 2 Nov 2013 17:56:14 +0000 (18:56 +0100)] 
po/TEAMS: update Thomas Rast's email address

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <tr@thomasrast.ch>
10 years agoMerge remote-tracking branch 'sv/nafmo/master'
Jiang Xin [Sun, 10 Nov 2013 00:48:23 +0000 (08:48 +0800)] 
Merge remote-tracking branch 'sv/nafmo/master'

* sv/nafmo/master:
  l10n: Update Swedish translation (2194t0f0u)

10 years agol10n: Update Swedish translation (2194t0f0u)
Peter Krefting [Tue, 2 Jul 2013 12:09:37 +0000 (13:09 +0100)] 
l10n: Update Swedish translation (2194t0f0u)

And fix a typo.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
10 years agol10n: fr.po 2194/1294 messages translated
Jean-Noel Avila [Fri, 1 Nov 2013 14:35:08 +0000 (15:35 +0100)] 
l10n: fr.po 2194/1294 messages translated

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Sebastien Helleu <flashcode@flashtux.org>
10 years agoSync with 1.8.4.3
Junio C Hamano [Fri, 8 Nov 2013 20:08:43 +0000 (12:08 -0800)] 
Sync with 1.8.4.3

10 years agoGit 1.8.4.3 v1.8.4.3
Junio C Hamano [Fri, 8 Nov 2013 20:06:19 +0000 (12:06 -0800)] 
Git 1.8.4.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jn/test-prereq-perl-doc' into maint
Junio C Hamano [Fri, 8 Nov 2013 20:01:58 +0000 (12:01 -0800)] 
Merge branch 'jn/test-prereq-perl-doc' into maint

The interaction between use of Perl in our test suite and NO_PERL
has been clarified a bit.

* jn/test-prereq-perl-doc:
  t/README: tests can use perl even with NO_PERL

10 years agoMerge branch 'ap/remote-hg-unquote-cquote' into maint
Junio C Hamano [Fri, 8 Nov 2013 20:01:13 +0000 (12:01 -0800)] 
Merge branch 'ap/remote-hg-unquote-cquote' into maint

A fast-import stream expresses a pathname with funny characters by
quoting them in C style; remote-hg remote helper (in contrib/)
forgot to unquote such a path.

* ap/remote-hg-unquote-cquote:
  remote-hg: unquote C-style paths when exporting

10 years agoMerge branch 'jc/upload-pack-send-symref' into maint
Junio C Hamano [Fri, 8 Nov 2013 19:38:00 +0000 (11:38 -0800)] 
Merge branch 'jc/upload-pack-send-symref' into maint

One long-standing flaw in the pack transfer protocol used by "git
clone" was that there was no way to tell the other end which branch
"HEAD" points at, and the receiving end needed to guess.  A new
capability has been defined in the pack protocol to convey this
information so that cloning from a repository with more than one
branches pointing at the same commit where the HEAD is at now
reliably sets the initial branch in the resulting repository.

* jc/upload-pack-send-symref:
  t5570: Update for clone-progress-to-stderr branch
  t5570: Update for symref capability
  clone: test the new HEAD detection logic
  connect: annotate refs with their symref information in get_remote_head()
  connect.c: make parse_feature_value() static
  upload-pack: send non-HEAD symbolic refs
  upload-pack: send symbolic ref information as capability
  upload-pack.c: do not pass confusing cb_data to mark_our_ref()
  t5505: fix "set-head --auto with ambiguous HEAD" test

10 years agoMerge branch 'jk/http-auth-redirects' into maint
Junio C Hamano [Fri, 8 Nov 2013 19:37:25 +0000 (11:37 -0800)] 
Merge branch 'jk/http-auth-redirects' into maint

We did not handle cases where http transport gets redirected during
the authorization request (e.g. from http:// to https://).

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes

10 years agoSync with maint
Junio C Hamano [Thu, 7 Nov 2013 22:41:25 +0000 (14:41 -0800)] 
Sync with maint

* maint:
  Start preparing for 1.8.4.3
  gitignore.txt: fix documentation of "**" patterns

10 years agoStart preparing for 1.8.4.3
Junio C Hamano [Thu, 7 Nov 2013 22:39:47 +0000 (14:39 -0800)] 
Start preparing for 1.8.4.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'sc/doc-howto-dumb-http' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:37:39 +0000 (14:37 -0800)] 
Merge branch 'sc/doc-howto-dumb-http' into maint

An ancient How-To on serving Git repositories on an HTTP server
lacked a warning that it has been mostly superseded with more
modern way.

* sc/doc-howto-dumb-http:
  doc/howto: warn about (dumb)http server document being too old

10 years agoMerge branch 'vd/doc-unpack-objects' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:37:35 +0000 (14:37 -0800)] 
Merge branch 'vd/doc-unpack-objects' into maint

The synopsis section of "git unpack-objects" documentation has been
clarified a bit.

* vd/doc-unpack-objects:
  Documentation: "pack-file" is not literal in unpack-objects
  Documentation: restore a space in unpack-objects usage

10 years agoMerge branch 'jk/subtree-install-fix' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:37:17 +0000 (14:37 -0800)] 
Merge branch 'jk/subtree-install-fix' into maint

We did not generate HTML version of documentation to "git subtree"
in contrib/.

* jk/subtree-install-fix:
  subtree: add makefile target for html docs

10 years agoMerge branch 'hn/log-graph-color-octopus' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:37:11 +0000 (14:37 -0800)] 
Merge branch 'hn/log-graph-color-octopus' into maint

Coloring around octopus merges in "log --graph" output was screwy.

* hn/log-graph-color-octopus:
  graph: fix coloring around octopus merges

10 years agoMerge branch 'mm/checkout-auto-track-fix' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:36:59 +0000 (14:36 -0800)] 
Merge branch 'mm/checkout-auto-track-fix' into maint

"git checkout topic", when there is not yet a local "topic" branch
but there is a unique remote-tracking branch for a remote "topic"
branch, pretended as if "git checkout -t -b topic remote/$r/topic"
(for that unique remote $r) was run. This hack however was not
implemented for "git checkout topic --".

* mm/checkout-auto-track-fix:
  checkout: proper error message on 'git checkout foo bar --'
  checkout: allow dwim for branch creation for "git checkout $branch --"

10 years agoMerge branch 'sg/prompt-svn-remote-fix' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:36:45 +0000 (14:36 -0800)] 
Merge branch 'sg/prompt-svn-remote-fix' into maint

Bash prompting code to deal with an SVN remote as an upstream
were coded in a way not supported by older Bash versions (3.x).

* sg/prompt-svn-remote-fix:
  bash prompt: don't use '+=' operator in show upstream code path

10 years agoMerge branch 'jk/split-broken-ident' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:34:51 +0000 (14:34 -0800)] 
Merge branch 'jk/split-broken-ident' into maint

The fall-back parsing of commit objects with broken author or
committer lines were less robust than ideal in picking up the
timestamps.

* jk/split-broken-ident:
  split_ident: parse timestamp from end of line

10 years agoMerge branch 'jc/revision-range-unpeel' into maint
Junio C Hamano [Thu, 7 Nov 2013 22:34:14 +0000 (14:34 -0800)] 
Merge branch 'jc/revision-range-unpeel' into maint

"git rev-list --objects ^v1.0^ v1.0" gave v1.0 tag itself in the
output, but "git rev-list --objects v1.0^..v1.0" did not.

* jc/revision-range-unpeel:
  revision: do not peel tags used in range notation

10 years agogitignore.txt: fix documentation of "**" patterns
Karsten Blees [Thu, 7 Nov 2013 16:30:47 +0000 (17:30 +0100)] 
gitignore.txt: fix documentation of "**" patterns

"**" means bold in ASCIIDOC, so we need to escape it.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5-rc1 v1.8.5-rc1
Junio C Hamano [Wed, 6 Nov 2013 22:35:19 +0000 (14:35 -0800)] 
Git 1.8.5-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'fc/trivial'
Junio C Hamano [Wed, 6 Nov 2013 22:34:43 +0000 (14:34 -0800)] 
Merge branch 'fc/trivial'

A random collection of style fixes and minor doc updates.

* fc/trivial:
  setup: trivial style fixes
  run-command: trivial style fixes
  diff: trivial style fix
  revision: trivial style fixes
  pretty: trivial style fix
  describe: trivial style fixes
  transport-helper: trivial style fix
  sha1-name: trivial style cleanup
  branch: trivial style fix
  revision: add missing include
  doc/pull: clarify the illustrations
  t: replace pulls with merges
  merge: simplify ff-only option

10 years agoUpdate draft release notes to 1.8.5
Junio C Hamano [Mon, 4 Nov 2013 23:05:08 +0000 (15:05 -0800)] 
Update draft release notes to 1.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'bw/solaris-sed-tr-test-portability'
Junio C Hamano [Mon, 4 Nov 2013 22:58:19 +0000 (14:58 -0800)] 
Merge branch 'bw/solaris-sed-tr-test-portability'

* bw/solaris-sed-tr-test-portability:
  t4015: simplify sed command that is not even seen by sed
  Avoid difference in tr semantics between System V and BSD
  Change sed i\ usage to something Solaris' sed can handle

10 years agoMerge branch 'vd/doc-unpack-objects'
Junio C Hamano [Mon, 4 Nov 2013 22:58:15 +0000 (14:58 -0800)] 
Merge branch 'vd/doc-unpack-objects'

* vd/doc-unpack-objects:
  Documentation: "pack-file" is not literal in unpack-objects
  Documentation: restore a space in unpack-objects usage

10 years agoMerge branch 'jk/duplicate-objects-in-packs'
Junio C Hamano [Mon, 4 Nov 2013 22:58:10 +0000 (14:58 -0800)] 
Merge branch 'jk/duplicate-objects-in-packs'

Test fixup to a topic recently graduated.

* jk/duplicate-objects-in-packs:
  Fix '\%o' for printf from coreutils

10 years agoMerge branch 'jk/subtree-install-fix'
Junio C Hamano [Mon, 4 Nov 2013 22:58:08 +0000 (14:58 -0800)] 
Merge branch 'jk/subtree-install-fix'

* jk/subtree-install-fix:
  subtree: add makefile target for html docs

10 years agoMerge branch 'ak/cvsserver-stabilize-use-of-hash-keys'
Junio C Hamano [Mon, 4 Nov 2013 22:58:05 +0000 (14:58 -0800)] 
Merge branch 'ak/cvsserver-stabilize-use-of-hash-keys'

* ak/cvsserver-stabilize-use-of-hash-keys:
  cvsserver: Determinize output to combat Perl 5.18 hash randomization

10 years agoMerge branch 'jk/wrap-perl-used-in-tests'
Junio C Hamano [Mon, 4 Nov 2013 22:58:01 +0000 (14:58 -0800)] 
Merge branch 'jk/wrap-perl-used-in-tests'

* jk/wrap-perl-used-in-tests:
  t: use perl instead of "$PERL_PATH" where applicable
  t: provide a perl() function which uses $PERL_PATH

10 years agoMerge branch 'sc/doc-howto-dumb-http'
Junio C Hamano [Mon, 4 Nov 2013 22:57:57 +0000 (14:57 -0800)] 
Merge branch 'sc/doc-howto-dumb-http'

* sc/doc-howto-dumb-http:
  doc/howto: warn about (dumb)http server document being too old

10 years agoMerge branch 'jn/test-prereq-perl-doc'
Junio C Hamano [Mon, 4 Nov 2013 22:57:53 +0000 (14:57 -0800)] 
Merge branch 'jn/test-prereq-perl-doc'

* jn/test-prereq-perl-doc:
  t/README: tests can use perl even with NO_PERL

10 years agot4015: simplify sed command that is not even seen by sed
Junio C Hamano [Mon, 4 Nov 2013 18:11:15 +0000 (10:11 -0800)] 
t4015: simplify sed command that is not even seen by sed

Noticed by Andreas Schwab; \<LF> inside a double quotes pair is
eaten by the shell to become an empty string and is not doing
anything.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agol10n: zh_CN.po: translate 68 messages (2194t0f0u)
Jiang Xin [Tue, 17 Sep 2013 15:37:05 +0000 (23:37 +0800)] 
l10n: zh_CN.po: translate 68 messages (2194t0f0u)

Translate 68 new messages came from git.pot update in 727b957
(l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)).

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
10 years agol10n: vi.po (2194t): Update and minor fix
Tran Ngoc Quan [Sat, 2 Nov 2013 06:21:55 +0000 (13:21 +0700)] 
l10n: vi.po (2194t): Update and minor fix

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
10 years agol10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)
Jiang Xin [Sat, 2 Nov 2013 00:08:26 +0000 (08:08 +0800)] 
l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)

Generate po/git.pot from v1.8.5-rc0-23-gaa27064 for git v1.8.5
l10n round 1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
10 years agoDocumentation: "pack-file" is not literal in unpack-objects
Vivien Didelot [Fri, 1 Nov 2013 15:42:43 +0000 (11:42 -0400)] 
Documentation: "pack-file" is not literal in unpack-objects

Make it clear that "pack-file" is not to be spelled as is in the
unpack-objects usage.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoUpdate draft release notes to 1.8.5
Junio C Hamano [Fri, 1 Nov 2013 15:14:52 +0000 (08:14 -0700)] 
Update draft release notes to 1.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'sb/refs-code-cleanup'
Junio C Hamano [Fri, 1 Nov 2013 14:38:58 +0000 (07:38 -0700)] 
Merge branch 'sb/refs-code-cleanup'

* sb/refs-code-cleanup:
  cache: remove unused function 'have_git_dir'
  refs: remove unused function invalidate_ref_cache

10 years agoMerge branch 'rs/web-browse-xdg-open'
Junio C Hamano [Fri, 1 Nov 2013 14:38:56 +0000 (07:38 -0700)] 
Merge branch 'rs/web-browse-xdg-open'

* rs/web-browse-xdg-open:
  web--browse: Add support for xdg-open

10 years agoMerge branch 'js/tests-windows-port-fix'
Junio C Hamano [Fri, 1 Nov 2013 14:38:54 +0000 (07:38 -0700)] 
Merge branch 'js/tests-windows-port-fix'

* js/tests-windows-port-fix:
  tests: undo special treatment of CRLF for Windows
  Windows: a test_cmp that is agnostic to random LF <> CRLF conversions
  t5300-pack-object: do not compare binary data using test_cmp

10 years agoMerge branch 'js/test-help-format-windows-port-fix'
Junio C Hamano [Fri, 1 Nov 2013 14:38:51 +0000 (07:38 -0700)] 
Merge branch 'js/test-help-format-windows-port-fix'

* js/test-help-format-windows-port-fix:
  t3200: do not open a HTML manual page when DEFAULT_MAN_FORMAT is html

10 years agoMerge branch 'jk/reset-p-current-head-fix'
Junio C Hamano [Fri, 1 Nov 2013 14:38:49 +0000 (07:38 -0700)] 
Merge branch 'jk/reset-p-current-head-fix'

"git reset -p HEAD" has codepath to special case it from resetting
to contents of other commits, but recent change broke it.

* jk/reset-p-current-head-fix:
  reset: pass real rev name to add--interactive
  add-interactive: handle unborn branch in patch mode

10 years agoMerge branch 'jk/pack-corruption-post-mortem'
Junio C Hamano [Fri, 1 Nov 2013 14:38:46 +0000 (07:38 -0700)] 
Merge branch 'jk/pack-corruption-post-mortem'

* jk/pack-corruption-post-mortem:
  howto: add article on recovering a corrupted object

10 years agoMerge branch 'jk/for-each-ref-skip-parsing'
Junio C Hamano [Fri, 1 Nov 2013 14:38:41 +0000 (07:38 -0700)] 
Merge branch 'jk/for-each-ref-skip-parsing'

* jk/for-each-ref-skip-parsing:
  for-each-ref: avoid loading objects to print %(objectname)

10 years agoMerge branch 'ap/remote-hg-unquote-cquote'
Junio C Hamano [Fri, 1 Nov 2013 14:38:35 +0000 (07:38 -0700)] 
Merge branch 'ap/remote-hg-unquote-cquote'

A fast-import stream expresses a pathname with funny characters by
quoting them in C style; remote-hg remote helper forgot to unquote
such a path.

* ap/remote-hg-unquote-cquote:
  remote-hg: unquote C-style paths when exporting

10 years agoMerge branch 'jl/submodule-mv'
Junio C Hamano [Fri, 1 Nov 2013 14:38:26 +0000 (07:38 -0700)] 
Merge branch 'jl/submodule-mv'

Moving a regular file in a repository with a .gitmodules file was
producing a warning 'Could not find section in .gitmodules where
path=<filename>'.

* jl/submodule-mv:
  mv: Fix spurious warning when moving a file in presence of submodules

10 years agoDocumentation: restore a space in unpack-objects usage
Vivien Didelot [Thu, 31 Oct 2013 21:41:11 +0000 (17:41 -0400)] 
Documentation: restore a space in unpack-objects usage

The commit 87b7b84 removed a space in the unpack-objects usage, which
makes the synopsis a bit confusing. This patch simply restores it.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosetup: trivial style fixes
Felipe Contreras [Thu, 31 Oct 2013 09:25:46 +0000 (03:25 -0600)] 
setup: trivial style fixes

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorun-command: trivial style fixes
Felipe Contreras [Thu, 31 Oct 2013 09:25:45 +0000 (03:25 -0600)] 
run-command: trivial style fixes

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodiff: trivial style fix
Felipe Contreras [Thu, 31 Oct 2013 09:25:44 +0000 (03:25 -0600)] 
diff: trivial style fix

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorevision: trivial style fixes
Felipe Contreras [Thu, 31 Oct 2013 09:25:43 +0000 (03:25 -0600)] 
revision: trivial style fixes

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopretty: trivial style fix
Felipe Contreras [Thu, 31 Oct 2013 09:25:42 +0000 (03:25 -0600)] 
pretty: trivial style fix

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodescribe: trivial style fixes
Felipe Contreras [Thu, 31 Oct 2013 09:25:41 +0000 (03:25 -0600)] 
describe: trivial style fixes

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotransport-helper: trivial style fix
Felipe Contreras [Thu, 31 Oct 2013 09:25:40 +0000 (03:25 -0600)] 
transport-helper: trivial style fix

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosha1-name: trivial style cleanup
Felipe Contreras [Thu, 31 Oct 2013 09:25:39 +0000 (03:25 -0600)] 
sha1-name: trivial style cleanup

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agobranch: trivial style fix
Felipe Contreras [Thu, 31 Oct 2013 09:25:38 +0000 (03:25 -0600)] 
branch: trivial style fix

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agorevision: add missing include
Felipe Contreras [Thu, 31 Oct 2013 09:25:36 +0000 (03:25 -0600)] 
revision: add missing include

Otherwise we might not have 'struct diff_options'.

[jc: needs a matching follow-up patch to remove inclusion of diff.h
from *.c files that do not themselves use anything from diff.h]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agodoc/pull: clarify the illustrations
Junio C Hamano [Thu, 31 Oct 2013 20:43:35 +0000 (13:43 -0700)] 
doc/pull: clarify the illustrations

The second illustration that shows the history after "git pull"
spelled the remote-tracking branch with "remotes/" prefix, which
is not necessary.  Drop it.

To match the assumption that a remote-tracking branch is used to
keep track of the advancement of the master at the origin, update
the first illustration that shows the history before "git pull"
to show the distinction between the master currently at origin and
the stale origin/master remote-tracking branch.

Noticed-by: Felipe Contreras <felipe.contreras@gmail.com>
Helped-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot: replace pulls with merges
Felipe Contreras [Thu, 31 Oct 2013 09:25:33 +0000 (03:25 -0600)] 
t: replace pulls with merges

This is what the code intended.

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomerge: simplify ff-only option
Felipe Contreras [Thu, 31 Oct 2013 09:25:32 +0000 (03:25 -0600)] 
merge: simplify ff-only option

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoFix '\%o' for printf from coreutils
Kacper Kornet [Thu, 31 Oct 2013 11:51:32 +0000 (12:51 +0100)] 
Fix '\%o' for printf from coreutils

The printf utility provided by coreutils when interpreting '\%o' format
does not recognize %o as formatting directive. For example
printf '\%o 0 returns \%o and warning: ignoring excess arguments,
starting with ‘0’, which results in failed tests in
t5309-pack-delta-cycles.sh. In most shells the test ends with success as
the printf is a builtin utility.

Fix it by using '\\%o' which is interpreted consistently in all versions
of printf.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoweb--browse: Add support for xdg-open
Rüdiger Sonderfeld [Sat, 26 Oct 2013 17:43:54 +0000 (19:43 +0200)] 
web--browse: Add support for xdg-open

xdg-open is a tool similar to git-web--browse.  It opens a file or URL in the
user's preferred application.  It could probably be made default at least on
Linux with a graphical environment.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agot3200: do not open a HTML manual page when DEFAULT_MAN_FORMAT is html
Johannes Sixt [Sat, 26 Oct 2013 18:48:46 +0000 (20:48 +0200)] 
t3200: do not open a HTML manual page when DEFAULT_MAN_FORMAT is html

We have the build configuration option DEFAULT_MAN_FORMAT to choose a
format different from man pages to be used by 'git help' when no format
is requested explicitly. Since 65db0443 (Set the default help format to
html for msys builds, 2013-06-04) we use html on Windows by default.

There is one test in t3200-branch.sh that invokes a help page. The
intent of the redirections applied to the command invocation is to avoid
that the man page viewer interferes with the automated test. But when
the default format is not "man", this does not have the intended effect,
and the HTML manual page is opened during the test run. Request "man"
format explicitly to keep the test silent.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoGit 1.8.5-rc0 v1.8.5-rc0
Junio C Hamano [Wed, 30 Oct 2013 19:17:47 +0000 (12:17 -0700)] 
Git 1.8.5-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>