gitweb.git
Merge branch 'nd/doc-ignore'Junio C Hamano Wed, 10 Oct 2012 21:57:02 +0000 (14:57 -0700)

Merge branch 'nd/doc-ignore'

* nd/doc-ignore:
gitignore.txt: suggestions how to get literal # or ! at the beginning

Merge branch 'jc/doc-long-options'Junio C Hamano Wed, 10 Oct 2012 21:56:52 +0000 (14:56 -0700)

Merge branch 'jc/doc-long-options'

* jc/doc-long-options:
gitcli: parse-options lets you omit tail of long options

Sync with maintJunio C Hamano Wed, 10 Oct 2012 21:54:25 +0000 (14:54 -0700)

Sync with maint

* maint:
attr: a note about the order of .gitattributes lookup

Merge git://bogomips.org/git-svnJunio C Hamano Wed, 10 Oct 2012 20:53:56 +0000 (13:53 -0700)

Merge git://bogomips.org/git-svn

* git://bogomips.org/git-svn:
svn test: escape peg revision separator using empty peg rev
git svn: work around SVN 1.7 mishandling of svn:special changes

svn test: escape peg revision separator using empty... Jonathan Nieder Tue, 9 Oct 2012 08:41:45 +0000 (01:41 -0700)

svn test: escape peg revision separator using empty peg rev

This test script uses "svn cp" to create a branch with an @-sign in
its name:

svn cp "pr ject/trunk" "pr ject/branches/not-a@{0}reflog"

That sets up for later tests that fetch the branch and check that git
svn mangles the refname appropriately.

Unfortunately, modern svn versions interpret path arguments with an
@-sign as an example of path@revision syntax (which pegs a path to a
particular revision) and truncate the path or error out with message
"svn: E205000: Syntax error parsing peg revision '{0}reflog'".

When using subversion 1.6.x, escaping the @ sign as %40 avoids trouble
(see 08fd28bb, 2010-07-08). Newer versions are stricter:

$ svn cp "$repo/pr ject/trunk" "$repo/pr ject/branches/not-a%40{reflog}"
svn: E205000: Syntax error parsing peg revision '%7B0%7Dreflog'

The recommended method for escaping a literal @ sign in a path passed
to subversion is to add an empty peg revision at the end of the path
("branches/not-a@{0}reflog@"). Do that.

Pre-1.6.12 versions of Subversion probably treat the trailing @ as
another literal @-sign (svn issue 3651). Luckily ever since
v1.8.0-rc0~155^2~7 (t9118: workaround inconsistency between SVN
versions, 2012-07-28) the test can survive that.

Tested with Debian Subversion 1.6.12dfsg-6 and 1.7.5-1 and r1395837
of Subversion trunk (1.8.x).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git svn: work around SVN 1.7 mishandling of svn:special... Jonathan Nieder Tue, 9 Oct 2012 10:12:39 +0000 (03:12 -0700)

git svn: work around SVN 1.7 mishandling of svn:special changes

Subversion represents symlinks as ordinary files with content starting
with "link " and the svn:special property set to "*". Thus a file can
switch between being a symlink and a non-symlink simply by toggling
its svn:special property, and new checkouts will automatically write a
file of the appropriate type. Likewise, in subversion 1.6 and older,
running "svn update" would notice changes in filetype and update the
working copy appropriately.

Starting in subversion 1.7 (issue 4091), changes to the svn:special
property trip an assertion instead:

$ svn up svn-tree
Updating 'svn-tree':
svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' \
line 1583: assertion failed (action == svn_wc_conflict_action_edit \
|| action == svn_wc_conflict_action_delete || action == \
svn_wc_conflict_action_replace)

Revisions prepared with ordinary svn commands ("svn add" and not "svn
propset") don't trip this because they represent these filetype
changes using a replace operation, which is approximately equivalent
to removal followed by adding a new file and works fine. Follow suit.

Noticed using t9100. After this change, git-svn's file-to-symlink
changes are sent in a format that modern "svn update" can handle and
tests t9100.11-13 pass again.

[ew: s,git-svn\.perl,perl/Git/SVN/Editor.pm,g]

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

MALLOC_CHECK: Allow checking to be disabled from config.makRamsay Jones Sat, 6 Oct 2012 17:33:08 +0000 (18:33 +0100)

MALLOC_CHECK: Allow checking to be disabled from config.mak

The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
variable, either from the environment or command line of an
'make test' invocation. In order to allow the malloc checks to be
disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
to the environment using an export directive.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr: a note about the order of .gitattributes lookupNguyen Thai Ngoc Duy Wed, 10 Oct 2012 13:55:52 +0000 (20:55 +0700)

attr: a note about the order of .gitattributes lookup

This is the documentation part of

1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: honor grep.* configurationJunio C Hamano Tue, 9 Oct 2012 23:49:57 +0000 (16:49 -0700)

log: honor grep.* configuration

Now the grep_config() callback is reusable from other configuration
callbacks, call it from git_log_config() so that grep.patterntype
and friends can be used with the commands in the "git log" family.

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

log --grep: accept --basic-regexp and --perl-regexpJunio C Hamano Wed, 3 Oct 2012 22:01:34 +0000 (15:01 -0700)

log --grep: accept --basic-regexp and --perl-regexp

When we added the "--perl-regexp" option (or "-P") to "git grep", we
should have done the same for the commands in the "git log" family,
but somehow we forgot to do so. This corrects it, but we will
reserve the short-and-sweet "-P" option for something else for now.

Also introduce the "--basic-regexp" option for completeness, so that
the "last one wins" principle can be used to defeat an earlier -E
option, e.g. "git log -E --basic-regexp --grep='<bre>'". Note that
it cannot have the short "-G" option as the option is to grep in the
patch text in the context of "log" family.

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

log --grep: use the same helper to set -E/-F options... Junio C Hamano Wed, 3 Oct 2012 21:50:51 +0000 (14:50 -0700)

log --grep: use the same helper to set -E/-F options as "git grep"

The command line option parser for "git log -F -E --grep='<ere>'"
did not flip the "fixed" bit, violating the general "last option
wins" principle among conflicting options.

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

revisions: initialize revs->grep_filter using grep_init()Junio C Hamano Tue, 9 Oct 2012 23:40:03 +0000 (16:40 -0700)

revisions: initialize revs->grep_filter using grep_init()

Instead of using the hand-rolled initialization sequence,
use grep_init() to populate the necessary bits. This opens
the door to allow the calling commands to optionally read
grep.* configuration variables via git_config() if they
want to.

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

grep: move pattern-type bits support to top-level grep... Junio C Hamano Wed, 3 Oct 2012 21:47:48 +0000 (14:47 -0700)

grep: move pattern-type bits support to top-level grep.[ch]

Switching between -E/-G/-P/-F correctly needs a lot more than just
flipping opt->regflags bit these days, and we have a nice helper
function buried in builtin/grep.c for the sole use of "git grep".

Extract it so that "log --grep" family can also use it.

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

grep: move the configuration parsing logic to grep... Junio C Hamano Tue, 9 Oct 2012 23:17:50 +0000 (16:17 -0700)

grep: move the configuration parsing logic to grep.[ch]

The configuration handling is a library-ish part of this program,
that is not specific to "git grep" command. It should be reusable
by "log" and others.

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

builtin/grep.c: make configuration callback more reusableJunio C Hamano Tue, 9 Oct 2012 23:04:12 +0000 (16:04 -0700)

builtin/grep.c: make configuration callback more reusable

The grep_config() function takes one instance of grep_opt as its
callback parameter, and populates it by running git_config().

This has three practical implications:

- You have to have an instance of grep_opt already when you call
the configuration, but that is not necessarily always true. You
may be trying to initialize the grep_filter member of rev_info,
but are not ready to call init_revisions() on it yet.

- It is not easy to enhance grep_config() in such a way to make it
cascade to other callback functions to grab other variables in
one call of git_config(); grep_config() can be cascaded into from
other callbacks, but it has to be at the leaf level of a cascade.

- If you ever need to use more than one instance of grep_opt, you
will have to open and read the configuration file(s) every time
you initialize them.

Rearrange the configuration mechanism and model it after how diff
configuration variables are handled. An early call to git_config()
reads and remembers the values taken from the configuration in the
default "template", and a separate call to grep_init() uses this
template to instantiate a grep_opt.

The next step will be to move some of this out of this file so that
the other user of the grep machinery (i.e. "log") can use it.

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

Merge branch 'maint'Junio C Hamano Tue, 9 Oct 2012 21:23:45 +0000 (14:23 -0700)

Merge branch 'maint'

* maint:
l10n: de.po: fix a few minor typos

configure.ac: Add missing comma to CC_LD_DYNPATHØyvind A. Holm Tue, 9 Oct 2012 14:26:11 +0000 (16:26 +0200)

configure.ac: Add missing comma to CC_LD_DYNPATH

40bfbde ("build: don't duplicate substitution of make variables",
2012-09-11) by mistake removed a necessary comma at the end of
"CC_LD_DYNPATH=-Wl,rpath," in line 414.

When executing "./configure --with-zlib=PATH", this resulted in

[...]
CC xdiff/xhistogram.o
AR xdiff/lib.a
LINK git-credential-store
/usr/bin/ld: bad -rpath option
collect2: ld returned 1 exit status
make: *** [git-credential-store] Error 1
$

during make.

Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint' of git://github.com/git-l10n/git... Junio C Hamano Tue, 9 Oct 2012 18:48:53 +0000 (11:48 -0700)

Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

* 'maint' of git://github.com/git-l10n/git-po:
l10n: de.po: fix a few minor typos

tests: "cp -a" is a GNUismBen Walton Mon, 8 Oct 2012 08:08:01 +0000 (09:08 +0100)

tests: "cp -a" is a GNUism

These tests just want a bit-for-bit identical copy; they do not need
even -H (there is no symbolic link involved) nor -p (there is no
funny permission or ownership issues involved).

Just use "cp -R" instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git url doc: mark ftp/ftps as read-only and deprecate... Ramkumar Ramachandra Mon, 8 Oct 2012 17:26:53 +0000 (10:26 -0700)

Git url doc: mark ftp/ftps as read-only and deprecate them

It is not even worth mentioning their removal; just discourage
people from using them.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.0-rc1 v1.8.0-rc1Junio C Hamano Mon, 8 Oct 2012 18:45:41 +0000 (11:45 -0700)

Git 1.8.0-rc1

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

Merge branch 'jc/maint-t1450-fsck-order-fix'Junio C Hamano Mon, 8 Oct 2012 18:43:10 +0000 (11:43 -0700)

Merge branch 'jc/maint-t1450-fsck-order-fix'

The fsck test assumed too much on what kind of error it will
detect. The only important thing is the inconsistency is detected
as an error.

* jc/maint-t1450-fsck-order-fix:
t1450: the order the objects are checked is undefined

Merge branch 'jc/merge-bases-paint-fix'Junio C Hamano Mon, 8 Oct 2012 18:42:15 +0000 (11:42 -0700)

Merge branch 'jc/merge-bases-paint-fix'

"git fmt-merge-msg" (an internal helper reduce_heads() it uses) had
a severe performance regression; an empty "git pull" took forever to
finish as the result.

* jc/merge-bases-paint-fix:
paint_down_to_common(): parse commit before relying on its timestamp

Sync with 1.7.12.3Junio C Hamano Mon, 8 Oct 2012 18:41:21 +0000 (11:41 -0700)

Sync with 1.7.12.3

Git 1.7.12.3 v1.7.12.3Junio C Hamano Mon, 8 Oct 2012 18:40:43 +0000 (11:40 -0700)

Git 1.7.12.3

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

Merge branch 'os/commit-submodule-ignore' into maintJunio C Hamano Mon, 8 Oct 2012 18:34:34 +0000 (11:34 -0700)

Merge branch 'os/commit-submodule-ignore' into maint

"git status" honored the ignore=dirty settings in .gitmodules but
"git commit" didn't.

* os/commit-submodule-ignore:
commit: pay attention to submodule.$name.ignore in .gitmodules

Merge branch 'jk/receive-pack-unpack-error-to-pusher... Junio C Hamano Mon, 8 Oct 2012 18:34:19 +0000 (11:34 -0700)

Merge branch 'jk/receive-pack-unpack-error-to-pusher' into maint

"git receive-pack" (the counterpart to "git push") did not give
progress output while processing objects it received to the puser
when run over the smart-http protocol.

* jk/receive-pack-unpack-error-to-pusher:
receive-pack: drop "n/a" on unpacker errors
receive-pack: send pack-processing stderr over sideband
receive-pack: redirect unpack-objects stdout to /dev/null

Merge branch 'rt/maint-clone-single' into maintJunio C Hamano Mon, 8 Oct 2012 18:34:02 +0000 (11:34 -0700)

Merge branch 'rt/maint-clone-single' into maint

A repository created with "git clone --single" had its fetch
refspecs set up just like a clone without "--single", leading the
subsequent "git fetch" to slurp all the other branches, defeating
the whole point of specifying "only this branch".

* rt/maint-clone-single:
clone --single: limit the fetch refspec to fetched branch

Merge branch 'jc/blame-follows-renames' into maintJunio C Hamano Mon, 8 Oct 2012 18:33:35 +0000 (11:33 -0700)

Merge branch 'jc/blame-follows-renames' into maint

It was unclear in the documentation for "git blame" that it is
unnecessary for users to use the "--follow" option.

* jc/blame-follows-renames:
git blame: document that it always follows origin across whole-file renames

Merge branch 'lt/mailinfo-handle-attachment-more-sanely... Junio C Hamano Mon, 8 Oct 2012 18:32:59 +0000 (11:32 -0700)

Merge branch 'lt/mailinfo-handle-attachment-more-sanely' into maint

A patch attached as application/octet-stream (e.g. not text/*) were
mishandled, not correctly honoring Content-Transfer-Encoding
(e.g. base64).

* lt/mailinfo-handle-attachment-more-sanely:
mailinfo: don't require "text" mime type for attachments

gitignore.txt: suggestions how to get literal # or... Nguyễn Thái Ngọc Duy Sun, 7 Oct 2012 03:13:54 +0000 (10:13 +0700)

gitignore.txt: suggestions how to get literal # or ! at the beginning

We support backslash escape, but we hide the details behind the phrase
"a shell glob suitable for consumption by fnmatch(3)". So it may not
be obvious how one can get literal # or ! at the beginning of pattern.
Add a few lines on how to work around the magic characters.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a test script for remote-svnFlorian Achleitner Wed, 19 Sep 2012 15:21:30 +0000 (17:21 +0200)

Add a test script for remote-svn

Use svnrdump_sim.py to emulate svnrdump without an svn server.
Tests fetching, incremental fetching, fetching from file://,
and the regeneration of fast-import's marks file.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-svn: add marks-file regenerationFlorian Achleitner Wed, 19 Sep 2012 15:21:29 +0000 (17:21 +0200)

remote-svn: add marks-file regeneration

fast-import mark files are stored outside the object database and are
therefore not fetched and can be lost somehow else. marks provide a
svn revision --> git sha1 mapping, while the notes that are attached
to each commit when it is imported provide a git sha1 --> svn revision
mapping.

If the marks file is not available or not plausible, regenerate it by
walking through the notes tree. , i.e. The plausibility check tests
if the highest revision in the marks file matches the revision of the
top ref. It doesn't ensure that the mark file is completely correct.
This could only be done with an effort equal to unconditional
regeneration.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a svnrdump-simulator replaying a dump file for... Florian Achleitner Wed, 19 Sep 2012 15:21:28 +0000 (17:21 +0200)

Add a svnrdump-simulator replaying a dump file for testing

To ease testing without depending on a reachable svn server, this
compact python script mimics parts of svnrdumps behaviour. It
requires the remote url to start with sim://.

Start and end revisions are evaluated. If the requested revision
doesn't exist, as it is the case with incremental imports, if no new
commit was added, it returns 1 (like svnrdump).

To allow using the same dump file for simulating multiple incremental
imports, the highest revision can be limited by setting the environment
variable SVNRMAX to that value. This simulates the situation where
higher revs don't exist yet.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-svn: add incremental importFlorian Achleitner Wed, 19 Sep 2012 15:21:27 +0000 (17:21 +0200)

remote-svn: add incremental import

Search for a note attached to the ref to update and read it's
'Revision-number:'-line. Start import from the next svn revision.

If there is no next revision in the svn repo, svnrdump terminates with
a message on stderr an non-zero return value. This looks a little
weird, but there is no other way to know whether there is a new
revision in the svn repo.

On the start of an incremental import, the parent of the first commit
in the fast-import stream is set to the branch name to update. All
following commits specify their parent by a mark number. Previous mark
files are currently not reused.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-svn: Activate import/export-marks for fast-importFlorian Achleitner Wed, 19 Sep 2012 15:21:26 +0000 (17:21 +0200)

remote-svn: Activate import/export-marks for fast-import

Enable import and export of a marks file by sending the appropriate
feature commands to fast-import before sending data.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Create a note for every imported commit containing... Florian Achleitner Wed, 19 Sep 2012 15:21:25 +0000 (17:21 +0200)

Create a note for every imported commit containing svn metadata

To provide metadata from svn dumps for further processing, e.g.
branch detection, attach a note to each imported commit that stores
additional information. The notes are currently hard-coded in
refs/notes/svn/revs. Currently the following lines from the svn dump
are directly accumulated in the note. This can be refined as needed.

- "Revision-number"
- "Node-path"
- "Node-kind"
- "Node-action"
- "Node-copyfrom-path"
- "Node-copyfrom-rev"

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

vcs-svn: add fast_export_note to create notesDmitry Ivankov Wed, 19 Sep 2012 15:21:24 +0000 (17:21 +0200)

vcs-svn: add fast_export_note to create notes

fast_export lacked a method to writes notes to fast-import stream.
Add two new functions fast_export_note which is similar to
fast_export_modify. And also add fast_export_buf_to_data to be able to
write inline blobs that don't come from a line_buffer or from delta
application.

To be used like this:

fast_export_begin_commit("refs/notes/somenotes", ...)
fast_export_note("refs/heads/master", "inline")
fast_export_buf_to_data(&data)

or maybe

fast_export_note("refs/heads/master", sha1)

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow reading svn dumps from files via file:// urlsFlorian Achleitner Wed, 19 Sep 2012 15:21:23 +0000 (17:21 +0200)

Allow reading svn dumps from files via file:// urls

For testing as well as for importing large, already available dumps,
it's useful to bypass svnrdump and replay the svndump from a file
directly.

Add support for file:// urls in the remote url, e.g.

svn::file:///path/to/dump

When the remote helper finds an url starting with file:// it tries to
open that file instead of invoking svnrdump.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-svn, vcs-svn: Enable fetching to private refsFlorian Achleitner Wed, 19 Sep 2012 15:21:22 +0000 (17:21 +0200)

remote-svn, vcs-svn: Enable fetching to private refs

The reference to update by the fast-import stream is hard-coded. When
fetching from a remote the remote-helper shall update refs in a
private namespace, i.e. a private subdir of refs/. This namespace is
defined by the 'refspec' capability, that the remote-helper advertises
as a reply to the 'capabilities' command.

Extend svndump and fast-export to allow passing the target ref.
Update svn-fe to be compatible.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

When debug==1, start fast-import with "--stats" instead... Florian Achleitner Wed, 19 Sep 2012 15:21:21 +0000 (17:21 +0200)

When debug==1, start fast-import with "--stats" instead of "--quiet"

fast-import prints statistics that could be interesting to the
developer of remote helpers.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add documentation for the 'bidi-import' capability... Florian Achleitner Wed, 19 Sep 2012 15:21:20 +0000 (17:21 +0200)

Add documentation for the 'bidi-import' capability of remote-helpers

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Connect fast-import to the remote-helper via pipe,... Florian Achleitner Wed, 19 Sep 2012 15:21:19 +0000 (17:21 +0200)

Connect fast-import to the remote-helper via pipe, adding 'bidi-import' capability

The fast-import commands 'cat-blob' and 'ls' can be used by
remote-helpers to retrieve information about blobs and trees that
already exist in fast-import's memory. This requires a channel from
fast-import to the remote-helper.

remote-helpers that use these features shall advertise the new
'bidi-import' capability to signal that they require the communication
channel. When forking fast-import in transport-helper.c connect it to
a dup of the remote-helper's stdin-pipe. The additional file
descriptor is passed to fast-import via its command line
(--cat-blob-fd). It follows that git and fast-import are connected to
the remote-helpers's stdin.

Because git can send multiple commands to the remote-helper on it's
stdin, it is required that helpers that advertise 'bidi-import' buffer
all input commands until the batch of 'import' commands is ended by a
newline before sending data to fast-import. This is to prevent mixing
commands and fast-import responses on the helper's stdin.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add argv_array_detach and argv_array_free_detachedFlorian Achleitner Wed, 19 Sep 2012 15:21:18 +0000 (17:21 +0200)

Add argv_array_detach and argv_array_free_detached

Allow detaching of ownership of the argv_array's contents and add a
function to free those detached argv_arrays later.

This makes it possible to use argv_array efficiently with the exiting
struct child_process which only contains a member char **argv.

Add to documentation.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add svndump_init_fd to allow reading dumps from arbitra... Florian Achleitner Wed, 19 Sep 2012 15:21:17 +0000 (17:21 +0200)

Add svndump_init_fd to allow reading dumps from arbitrary FDs

The existing function only allows reading from a filename or from
stdin. Allow passing of a FD and an additional FD for the back report
pipe. This allows us to retrieve the name of the pipe in the caller.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add git-remote-testsvn to MakefileFlorian Achleitner Wed, 19 Sep 2012 15:21:16 +0000 (17:21 +0200)

Add git-remote-testsvn to Makefile

The link-rule is a copy of the standard git$X rule but adds VCSSVN_LIB.
Add executable to .gitignore.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Implement a remote helper for svn in CFlorian Achleitner Wed, 19 Sep 2012 15:21:15 +0000 (17:21 +0200)

Implement a remote helper for svn in C

Enable basic fetching from subversion repositories. When processing
remote URLs starting with testsvn::, git invokes this remote-helper.
It starts svnrdump to extract revisions from the subversion repository
in the 'dump file format', and converts them to a git-fast-import stream
using the functions of vcs-svn/.

Imported refs are created in a private namespace at
refs/svn/<remote-name>/master. The revision history is imported
linearly (no branch detection) and completely, i.e. from revision 0 to
HEAD.

The 'bidi-import' capability is used. The remote-helper expects data
from fast-import on its stdin. It buffers a batch of 'import' command
lines in a string_list before starting to process them.

Signed-off-by: Florian Achleitner <florian.achleitner.2.6.31@gmail.com>
Acked-by: David Michael Barr <b@rr-dav.id.au>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: keep leading slash when canonicalizing paths... Jonathan Nieder Fri, 5 Oct 2012 07:04:31 +0000 (00:04 -0700)

git-svn: keep leading slash when canonicalizing paths (fallback case)

Subversion's svn_dirent_canonicalize() and svn_path_canonicalize()
APIs keep a leading slash in the return value if one was present on
the argument, which can be useful since it allows relative and
absolute paths to be distinguished.

When git-svn's canonicalize_path() learned to use these functions if
available, its semantics changed in the corresponding way. Some new
callers rely on the leading slash --- for example, if the slash is
stripped out then _canonicalize_url_ourselves() will transform
"proto://host/path/to/resource" to "proto://hostpath/to/resource".

Unfortunately the fallback _canonicalize_path_ourselves(), used when
the appropriate SVN APIs are not usable, still follows the old
semantics, so if that code path is exercised then it breaks. Fix it
to follow the new convention.

Noticed by forcing the fallback on and running tests. Without this
patch, t9101.4 fails:

Bad URL passed to RA layer: Unable to open an ra_local session to \
URL: Local URL 'file://homejrnsrcgit-scratch/t/trash%20directory.\
t9101-git-svn-props/svnrepo' contains unsupported hostname at \
/home/jrn/src/git-scratch/perl/blib/lib/Git/SVN.pm line 148

With it, the git-svn tests pass again.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

Git::SVN: rename private path fieldJonathan Nieder Mon, 17 Sep 2012 09:13:31 +0000 (02:13 -0700)

Git::SVN: rename private path field

All users of $gs->{path} should have been converted to use the
accessor by now. Check our work by renaming the underlying variable
to break callers that try to use it directly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn: use path accessor for Git::SVN objectsEric Wong Tue, 18 Sep 2012 00:09:31 +0000 (00:09 +0000)

git-svn: use path accessor for Git::SVN objects

The accessors should improve maintainability and enforce
consistent access to Git::SVN objects.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Make git-svn branch patterns match complete URLAmmon Riley Thu, 30 Aug 2012 22:53:57 +0000 (15:53 -0700)

Make git-svn branch patterns match complete URL

When using the {word,[...]} style of configuration for tags and branches,
it appears the intent is to only match whole path parts, since the words
in the {} pattern are meta-character quoted.

When the pattern word appears in the beginning or middle of the url,
it's matched completely, since the left side, pattern, and (non-empty)
right side are joined together with path separators.

However, when the pattern word appears at the end of the URL, the
right side is an empty pattern, and the resulting regex matches
more than just the specified pattern.

For example, if you specify something along the lines of

branches = branches/project/{release_1,release_2}

and your repository also contains "branches/project/release_1_2", you
will also get the release_1_2 branch. By restricting the match regex
with anchors, this is avoided.

Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

t9164: Add missing quotes in testRobert Luberda Sun, 19 Aug 2012 22:43:19 +0000 (00:43 +0200)

t9164: Add missing quotes in test

This fixes `ambiguous redirect' error given by bash.

[ew: fix misspelled test name,
also eliminate space after ">>" to conform to guidelines]

Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn.perl: keep processing all commits in parents_ex... Steven Walter Mon, 20 Aug 2012 01:39:41 +0000 (21:39 -0400)

git-svn.perl: keep processing all commits in parents_exclude

This fixes a bug where git finds the incorrect merge parent. Consider a
repository with trunk, branch1 of trunk, and branch2 of branch1.
Without this change, git interprets a merge of branch2 into trunk as a
merge of branch1 into trunk.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Reviewed-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn.perl: consider all ranges for a given merge... Steven Walter Mon, 20 Aug 2012 01:39:40 +0000 (21:39 -0400)

git-svn.perl: consider all ranges for a given merge, instead of only tip-by-tip

Consider the case where you have trunk, branch1 of trunk, and branch2 of
branch1. trunk is merged back into branch2, and then branch2 is
reintegrated into trunk. The merge of branch2 into trunk will have
svn:mergeinfo property references to both branch1 and branch2. When
git-svn fetches the commit that merges branch2 (check_cherry_pick),
it is necessary to eliminate the merged contents of branch1 as well as
branch2, or else the merge will be incorrectly ignored as a cherry-pick.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Reviewed-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

attr: avoid searching for basename on every matchNguyễn Thái Ngọc Duy Fri, 5 Oct 2012 04:41:02 +0000 (11:41 +0700)

attr: avoid searching for basename on every match

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr: avoid strlen() on every matchNguyễn Thái Ngọc Duy Fri, 5 Oct 2012 04:41:01 +0000 (11:41 +0700)

attr: avoid strlen() on every match

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-pack: use peel_ref for ref advertisementsJeff King Thu, 4 Oct 2012 08:03:33 +0000 (04:03 -0400)

upload-pack: use peel_ref for ref advertisements

When upload-pack advertises refs, we attempt to peel tags
and advertise the peeled version. We currently hand-roll the
tag dereferencing, and use as many optimizations as we can
to avoid loading non-tag objects into memory.

Not only has peel_ref recently learned these optimizations,
too, but it also contains an even more important one: it
has access to the "peeled" data from the pack-refs file.
That means we can avoid not only loading annotated tags
entirely, but also avoid doing any kind of object lookup at
all.

This cut the CPU time to advertise refs by 50% in the
linux-2.6 repo, as measured by:

echo 0000 | git-upload-pack . >/dev/null

best-of-five, warm cache, objects and refs fully packed:

[before] [after]
real 0m0.026s real 0m0.013s
user 0m0.024s user 0m0.008s
sys 0m0.000s sys 0m0.000s

Those numbers are irrelevantly small compared to an actual
fetch. Here's a larger repo (400K refs, of which 12K are
unique, and of which only 107 are unique annotated tags):

[before] [after]
real 0m0.704s real 0m0.596s
user 0m0.600s user 0m0.496s
sys 0m0.096s sys 0m0.092s

This shows only a 15% speedup (mostly because it has fewer
actual tags to parse), but a larger absolute value (100ms,
which isn't a lot compared to a real fetch, but this
advertisement happens on every fetch, even if the client is
just finding out they are completely up to date).

In truly pathological cases, where you have a large number
of unique annotated tags, it can make an even bigger
difference. Here are the numbers for a linux-2.6 repository
that has had every seventh commit tagged (so about 50K
tags):

[before] [after]
real 0m0.443s real 0m0.097s
user 0m0.416s user 0m0.080s
sys 0m0.024s sys 0m0.012s

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

peel_ref: check object type before loadingJeff King Thu, 4 Oct 2012 08:02:53 +0000 (04:02 -0400)

peel_ref: check object type before loading

The point of peel_ref is to dereference tags; if the base
object is not a tag, then we can return early without even
loading the object into memory.

This patch accomplishes that by checking sha1_object_info
for the type. For a packed object, we can get away with just
looking in the pack index. For a loose object, we only need
to inflate the first couple of header bytes.

This is a bit of a gamble; if we do find a tag object, then
we will end up loading the content anyway, and the extra
lookup will have been wasteful. However, if it is not a tag
object, then we save loading the object entirely. Depending
on the ratio of non-tags to tags in the input, this can be a
minor win or minor loss.

However, it does give us one potential major win: if a ref
points to a large blob (e.g., via an unannotated tag), then
we can avoid looking at it entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

peel_ref: do not return a null sha1Jeff King Thu, 4 Oct 2012 08:00:19 +0000 (04:00 -0400)

peel_ref: do not return a null sha1

The idea of the peel_ref function is to dereference tag
objects recursively until we hit a non-tag, and return the
sha1. Conceptually, it should return 0 if it is successful
(and fill in the sha1), or -1 if there was nothing to peel.

However, the current behavior is much more confusing. For a
regular loose ref, the behavior is as described above. But
there is an optimization to reuse the peeled-ref value for a
ref that came from a packed-refs file. If we have such a
ref, we return its peeled value, even if that peeled value
is null (indicating that we know the ref definitely does
_not_ peel).

It might seem like such information is useful to the caller,
who would then know not to bother loading and trying to peel
the object. Except that they should not bother loading and
trying to peel the object _anyway_, because that fallback is
already handled by peel_ref. In other words, the whole point
of calling this function is that it handles those details
internally, and you either get a sha1, or you know that it
is not peel-able.

This patch catches the null sha1 case internally and
converts it into a -1 return value (i.e., there is nothing
to peel). This simplifies callers, which do not need to
bother checking themselves.

Two callers are worth noting:

- in pack-objects, a comment indicates that there is a
difference between non-peelable tags and unannotated
tags. But that is not the case (before or after this
patch). Whether you get a null sha1 has to do with
internal details of how peel_ref operated.

- in show-ref, if peel_ref returns a failure, the caller
tries to decide whether to try peeling manually based on
whether the REF_ISPACKED flag is set. But this doesn't
make any sense. If the flag is set, that does not
necessarily mean the ref came from a packed-refs file
with the "peeled" extension. But it doesn't matter,
because even if it didn't, there's no point in trying to
peel it ourselves, as peel_ref would already have done
so. In other words, the fallback peeling is guaranteed
to fail.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

peel_ref: use faster deref_tag_noverifyJeff King Thu, 4 Oct 2012 07:58:15 +0000 (03:58 -0400)

peel_ref: use faster deref_tag_noverify

When we are asked to peel a ref to a sha1, we internally call
deref_tag, which will recursively parse each tagged object
until we reach a non-tag. This has the benefit that we will
verify our ability to load and parse the pointed-to object.

However, there is a performance downside: we may not need to
load that object at all (e.g., if we are listing peeled
simply listing peeled refs), or it may be a large object
that should follow a streaming code path (e.g., an annotated
tag of a large blob).

It makes more sense for peel_ref to choose the fast thing
rather than performing the extra check, for two reasons:

1. We will already sometimes short-circuit the tag parsing
in favor of a peeled entry from a packed-refs file. So
we are already favoring speed in some cases, and it is
not wise for a caller to rely on peel_ref to detect
corruption.

2. We already silently ignore much larger corruptions,
like a ref that points to a non-existent object, or a
tag object that exists but is corrupted.

2. peel_ref is not the right place to check for such a
database corruption. It is returning only the sha1
anyway, not the actual object. Any callers which use
that sha1 to load an object will soon discover the
corruption anyway, so we are really just pushing back
the discovery to later in the program.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitcli: parse-options lets you omit tail of long optionsJunio C Hamano Thu, 4 Oct 2012 17:13:49 +0000 (10:13 -0700)

gitcli: parse-options lets you omit tail of long options

Describe the behaviour, but do warn people against taking it too
literally and expect an abbreviation valid today will stay valid
forever.

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

paint_down_to_common(): parse commit before relying... Junio C Hamano Thu, 4 Oct 2012 22:37:15 +0000 (15:37 -0700)

paint_down_to_common(): parse commit before relying on its timestamp

When refactoring the merge-base computation to reduce the pairwise
O(n*(n-1)) traversals to parallel O(n) traversals, the code forgot
that timestamp based heuristics needs each commit to have been
parsed. This caused an empty "git pull" to spend cycles, traversing
the history all the way down to 0 (because an unparsed commit object
has 0 timestamp, and any other commit object with positive timestamp
will be processed for its parents, all getting parsed), only to come
up with a merge message to be used.

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

l10n: de.po: fix a few minor typosSimon Ruderich Thu, 4 Oct 2012 14:23:14 +0000 (16:23 +0200)

l10n: de.po: fix a few minor typos

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>

Update draft release notes to 1.8.0Junio C Hamano Wed, 3 Oct 2012 04:18:40 +0000 (21:18 -0700)

Update draft release notes to 1.8.0

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

Merge branch 'nd/grep-reflog'Junio C Hamano Wed, 3 Oct 2012 04:13:39 +0000 (21:13 -0700)

Merge branch 'nd/grep-reflog'

Teach the commands from the "log" family the "--grep-reflog" option
to limit output by string that appears in the reflog entry when the
"--walk-reflogs" option is in effect.

* nd/grep-reflog:
revision: make --grep search in notes too if shown
log --grep-reflog: reject the option without -g
revision: add --grep-reflog to filter commits by reflog messages
grep: prepare for new header field filter

Merge branch 'lt/mailinfo-handle-attachment-more-sanely'Junio C Hamano Wed, 3 Oct 2012 04:13:35 +0000 (21:13 -0700)

Merge branch 'lt/mailinfo-handle-attachment-more-sanely'

A patch attached as application/octet-stream (e.g. not text/*) were
mishandled, not correctly honoring Content-Transfer-Encoding
(e.g. base64).

* lt/mailinfo-handle-attachment-more-sanely:
mailinfo: don't require "text" mime type for attachments

Merge branch 'tu/gc-auto-quiet'Junio C Hamano Wed, 3 Oct 2012 04:13:27 +0000 (21:13 -0700)

Merge branch 'tu/gc-auto-quiet'

"gc --auto" notified the user that auto-packing has triggered even
under the "--quiet" option.

* tu/gc-auto-quiet:
silence git gc --auto --quiet output

t1450: the order the objects are checked is undefinedJunio C Hamano Tue, 2 Oct 2012 22:08:16 +0000 (15:08 -0700)

t1450: the order the objects are checked is undefined

When a tag T points at an object X that is of a type that is
different from what the tag records as, fsck should report it as an
error.

However, depending on the order X and T are checked individually,
the actual error message can be different. If X is checked first,
fsck remembers X's type and then when it checks T, it notices that T
records X as a wrong type (i.e. the complaint is about a broken tag
T). If T is checked first, on the other hand, fsck remembers that we
need to verify X is of the type tag records, and when it later
checks X, it notices that X is of a wrong type (i.e. the complaint
is about a broken object X).

The important thing is that fsck notices such an error and diagnoses
the issue on object X, but the test was expecting that we happen to
check objects in the order to make us detect issues with tag T, not
with object X. Remove this unwarranted assumption.

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

Merge branch 'maint'Junio C Hamano Tue, 2 Oct 2012 20:47:30 +0000 (13:47 -0700)

Merge branch 'maint'

Start preparing for 1.7.12.3Junio C Hamano Tue, 2 Oct 2012 20:44:59 +0000 (13:44 -0700)

Start preparing for 1.7.12.3

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

Merge branch 'rr/maint-submodule-unknown-cmd' into... Junio C Hamano Tue, 2 Oct 2012 20:42:32 +0000 (13:42 -0700)

Merge branch 'rr/maint-submodule-unknown-cmd' into maint

"git submodule frotz" was not diagnosed as "frotz" being an unknown
subcommand to "git submodule"; the user instead got a complaint that
"git submodule status" was run with an unknown path "frotz".

* rr/maint-submodule-unknown-cmd:
submodule: if $command was not matched, don't parse other args

Merge branch 'sp/maint-http-enable-gzip' into maintJunio C Hamano Tue, 2 Oct 2012 20:42:13 +0000 (13:42 -0700)

Merge branch 'sp/maint-http-enable-gzip' into maint

"git fetch" over http advertised that it supports "deflate", which
is much less common, and did not advertise more common "gzip" on its
Accept-Encoding header.

* sp/maint-http-enable-gzip:
Enable info/refs gzip decompression in HTTP client

Merge branch 'sp/maint-http-info-refs-no-retry' into... Junio C Hamano Tue, 2 Oct 2012 20:41:38 +0000 (13:41 -0700)

Merge branch 'sp/maint-http-info-refs-no-retry' into maint

"git fetch" over http had an old workaround for an unlikely server
misconfiguration; it turns out that this hurts debuggability of the
configuration in general, and has been reverted.

* sp/maint-http-info-refs-no-retry:
Revert "retry request without query when info/refs?query fails"

l10n: Fix to Swedish translationPeter Krefting Tue, 2 Oct 2012 07:25:32 +0000 (08:25 +0100)

l10n: Fix to Swedish translation

Fix bad translation of "Receiving objects".

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: mention `push.default` in git-push.txtRamkumar Ramachandra Tue, 2 Oct 2012 15:38:00 +0000 (21:08 +0530)

Documentation: mention `push.default` in git-push.txt

It already is listed in the "git config" documentation, but people
interested in pushing would first look at "git push" documentation.

Noticed-by: David Glasser
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Fixed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4055: avoid use of sed 'a' commandJunio C Hamano Tue, 2 Oct 2012 18:50:16 +0000 (11:50 -0700)

t4055: avoid use of sed 'a' command

The 'a', 'i' and 'c' commands take a literal text to be added
followed by backslash, but then in the source we cannot indent
the literal text which makes it ugly.

We need to also remember to double the backslash inside double
quotes.

Avoid these issues altogether by having an extra line in a template
file and generate test vectors by deleting the line or replacing the
line and not using the 'a' command.

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

RelNotes/1.8.0: various typo and style fixesMichael J Gruber Tue, 2 Oct 2012 14:35:55 +0000 (16:35 +0200)

RelNotes/1.8.0: various typo and style fixes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.8.0-rc0 v1.8.0-rc0Junio C Hamano Mon, 1 Oct 2012 20:09:47 +0000 (13:09 -0700)

Git 1.8.0-rc0

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

Merge branch 'jk/completion-tests'Junio C Hamano Mon, 1 Oct 2012 19:59:10 +0000 (12:59 -0700)

Merge branch 'jk/completion-tests'

* jk/completion-tests:
t9902: add completion tests for "odd" filenames
t9902: add a few basic completion tests

Merge branch 'ep/malloc-check-perturb'Junio C Hamano Mon, 1 Oct 2012 19:59:06 +0000 (12:59 -0700)

Merge branch 'ep/malloc-check-perturb'

Fixes a brown-paper bag bug.

* ep/malloc-check-perturb:
MALLOC_CHECK: enable it, unless disabled explicitly

Merge branch 'da/mergetool-custom'Junio C Hamano Mon, 1 Oct 2012 19:58:57 +0000 (12:58 -0700)

Merge branch 'da/mergetool-custom'

The actual external command to run for mergetool backend can be
specified with difftool/mergetool.$name.cmd configuration
variables, but this mechanism was ignored for the backends we
natively support.

* da/mergetool-custom:
mergetool--lib: Allow custom commands to override built-ins

Merge branch 'os/commit-submodule-ignore'Junio C Hamano Mon, 1 Oct 2012 19:58:51 +0000 (12:58 -0700)

Merge branch 'os/commit-submodule-ignore'

"git status" honored the ignore=dirty settings in .gitmodules but
"git commit" didn't.

* os/commit-submodule-ignore:
commit: pay attention to submodule.$name.ignore in .gitmodules

Merge branch 'jc/blame-follows-renames'Junio C Hamano Mon, 1 Oct 2012 19:58:43 +0000 (12:58 -0700)

Merge branch 'jc/blame-follows-renames'

Clarify the "blame" documentation to tell the users that there is
no need to ask for "--follow".

* jc/blame-follows-renames:
git blame: document that it always follows origin across whole-file renames

Merge branch 'jk/receive-pack-unpack-error-to-pusher'Junio C Hamano Mon, 1 Oct 2012 19:58:34 +0000 (12:58 -0700)

Merge branch 'jk/receive-pack-unpack-error-to-pusher'

Send errors from "unpack-objects" and "index-pack" back to the "git
push" over the git and smart-http protocols, just like it is done
for a push over the ssh protocol.

* jk/receive-pack-unpack-error-to-pusher:
receive-pack: drop "n/a" on unpacker errors
receive-pack: send pack-processing stderr over sideband
receive-pack: redirect unpack-objects stdout to /dev/null

Merge branch 'rt/maint-clone-single'Junio C Hamano Mon, 1 Oct 2012 19:58:10 +0000 (12:58 -0700)

Merge branch 'rt/maint-clone-single'

Running "git fetch" in a repository made with "git clone --single"
slurps all the branches, defeating the point of "--single".

* rt/maint-clone-single:
clone --single: limit the fetch refspec to fetched branch

Remove the hard coded length limit on variable names... Ben Walton Sun, 30 Sep 2012 19:44:36 +0000 (20:44 +0100)

Remove the hard coded length limit on variable names in config files

Previously while reading the variable names in config files, there
was a 256 character limit with at most 128 of those characters being
used by the section header portion of the variable name. This
limitation was only enforced while reading the config files. It was
possible to write a config file that was not subsequently readable.

Instead of enforcing this limitation for both reading and writing,
remove it entirely by changing the var member of the config_file
struct to a strbuf instead of a fixed length buffer. Update all of
the parsing functions in config.c to use the strbuf instead of the
static buffer.

The parsing functions that returned the base length of the variable
name now return simply 0 for success and -1 for failure. The base
length information is obtained through the strbuf's len member.

We now send the buf member of the strbuf to external callback
functions to preserve the external api. None of the external
callers rely on the old size limitation for sizing their own buffers
so removing the limit should have no externally visible effect.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: diff.context configuration gives default to -UJeff Muizelaar Thu, 27 Sep 2012 19:12:52 +0000 (15:12 -0400)

diff: diff.context configuration gives default to -U

Introduce a configuration variable diff.context that tells
Porcelain commands to use a non-default number of context
lines instead of 3 (the default). With this variable, users
do not have to keep repeating "git log -U8" from the command
line; instead, it becomes sufficient to say "git config
diff.context 8" just once.

Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mailinfo: don't require "text" mime type for attachmentsLinus Torvalds Sun, 30 Sep 2012 22:10:48 +0000 (15:10 -0700)

mailinfo: don't require "text" mime type for attachments

Currently "git am" does insane things if the mbox it is given contains
attachments with a MIME type that aren't "text/*".

In particular, it will still decode them, and pass them "one line at a
time" to the mail body filter, but because it has determined that they
aren't text (without actually looking at the contents, just at the mime
type) the "line" will be the encoding line (eg 'base64') rather than a
line of *content*.

Which then will cause the text filtering to fail, because we won't
correctly notice when the attachment text switches from the commit message
to the actual patch. Resulting in a patch failure, even if patch may be a
perfectly well-formed attachment, it's just that the message type may be
(for example) "application/octet-stream" instead of "text/plain".

Just remove all the bogus games with the message_type. The only difference
that code creates is how the data is passed to the filter function
(chunked per-pred-code line or per post-decode line), and that difference
is *wrong*, since chunking things per pre-decode line can never be a
sensible operation, and cannot possibly matter for binary data anyway.

This code goes all the way back to March of 2007, in commit 87ab79923463
("builtin-mailinfo.c infrastrcture changes"), and apparently Don used to
pass random mbox contents to git. However, the pre-decode vs post-decode
logic really shouldn't matter even for that case, and more importantly, "I
fed git am crap" is not a valid reason to break *real* patch attachments.

If somebody really cares, and determines that some attachment is binary
data (by looking at the data, not the MIME-type), the whole attachment
should be dismissed, rather than fed in random-sized chunks to
"handle_filter()".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Don Zickus <dzickus@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule add: Fail when .git/modules/<name> already... Jens Lehmann Sun, 30 Sep 2012 21:01:29 +0000 (23:01 +0200)

submodule add: Fail when .git/modules/<name> already exists unless forced

When adding a new submodule it can happen that .git/modules/<name> already
contains a submodule repo, e.g. when a submodule is removed from the work
tree and another submodule is added at the same path. But then the work
tree of the submodule will be populated using the existing repository and
not the one the user provided, which results in an incorrect work tree. On
the other hand the user might reactivate a submodule removed earlier, then
reusing that .git directory is the Right Thing to do.

As git can't decide what is the case, error out and tell the user she
should use either use a different name for the submodule with the "--name"
option or can reuse the .git directory for the newly added submodule by
providing the --force option (which only makes sense when the upstream
matches, so the error message lists all remotes of .git/modules/<name>).

In one test in t7406 the --force option had to be added to "git submodule
add", as that test re-adds a formerly removed submodule.

Reported-by: Jonathan Johnson <me@jondavidjohn.com>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Sun, 30 Sep 2012 06:28:20 +0000 (23:28 -0700)

Merge git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
l10n: Fixes to Swedish translation
Update Swedish translation (1967t0f0u)
l10n: zh.CN.po: msgmerge git.pot (1142t195f630u)
l10n: Update git.pot (825 new, 24 removed messages)

Update draft release notes to 1.8.0Junio C Hamano Sun, 30 Sep 2012 05:50:53 +0000 (22:50 -0700)

Update draft release notes to 1.8.0

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

Sync with 1.7.12.2Junio C Hamano Sun, 30 Sep 2012 06:22:53 +0000 (23:22 -0700)

Sync with 1.7.12.2

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

Git 1.7.12.2 v1.7.12.2Junio C Hamano Sun, 30 Sep 2012 05:33:25 +0000 (22:33 -0700)

Git 1.7.12.2

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

Merge branch 'maint' of git://github.com/git-l10n/git... Junio C Hamano Sun, 30 Sep 2012 06:20:13 +0000 (23:20 -0700)

Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

Update German and Simplified Chinese translations.

* 'maint' of git://github.com/git-l10n/git-po:
l10n: de.po: correct translation of a 'rebase' message
l10n: Improve many translation for zh_CN
l10n: Unify the translation for '(un)expected'

Merge branch 'jc/maint-log-grep-all-match-1' into maintJunio C Hamano Sun, 30 Sep 2012 05:30:56 +0000 (22:30 -0700)

Merge branch 'jc/maint-log-grep-all-match-1' into maint

* jc/maint-log-grep-all-match-1:
grep.c: make two symbols really file-scope static this time
t7810-grep: test --all-match with multiple --grep and --author options
t7810-grep: test interaction of multiple --grep and --author options
t7810-grep: test multiple --author with --all-match
t7810-grep: test multiple --grep with and without --all-match
t7810-grep: bring log --grep tests in common form
grep.c: mark private file-scope symbols as static
log: document use of multiple commit limiting options
log --grep/--author: honor --all-match honored for multiple --grep patterns
grep: show --debug output only once
grep: teach --debug option to dump the parse tree

Merge branch 'jc/maint-mailinfo-mime-attr' into maintJunio C Hamano Sun, 30 Sep 2012 05:30:47 +0000 (22:30 -0700)

Merge branch 'jc/maint-mailinfo-mime-attr' into maint

* jc/maint-mailinfo-mime-attr:
mailinfo: do not concatenate charset= attribute values from mime headers

Merge branch 'rr/maint-submodule-unknown-cmd'Junio C Hamano Sun, 30 Sep 2012 05:28:32 +0000 (22:28 -0700)

Merge branch 'rr/maint-submodule-unknown-cmd'

* rr/maint-submodule-unknown-cmd:
submodule: if $command was not matched, don't parse other args

Merge branch 'rs/archive-zip-utf8'Junio C Hamano Sun, 30 Sep 2012 05:28:28 +0000 (22:28 -0700)

Merge branch 'rs/archive-zip-utf8'

With another reroll, it looks like the series is as polished as it
could be.

* rs/archive-zip-utf8:
archive-zip: write extended timestamp
archive-zip: support UTF-8 paths
Revert "archive-zip: support UTF-8 paths"
archive-zip: support UTF-8 paths

Merge branch 'jk/smart-http-switch'Junio C Hamano Sun, 30 Sep 2012 05:28:24 +0000 (22:28 -0700)

Merge branch 'jk/smart-http-switch'

Allows users to turn off smart-http when talking to dumb-only
servers.

* jk/smart-http-switch:
remote-curl: let users turn off smart http
remote-curl: rename is_http variable

Merge branch 'sp/maint-http-enable-gzip'Junio C Hamano Sun, 30 Sep 2012 05:28:20 +0000 (22:28 -0700)

Merge branch 'sp/maint-http-enable-gzip'

Allows a more common 'gzip' Accept-Encoding to be used.

* sp/maint-http-enable-gzip:
Enable info/refs gzip decompression in HTTP client