gitweb.git
Documentation: update the introductory sectionJunio C Hamano Fri, 17 Aug 2012 19:48:52 +0000 (12:48 -0700)

Documentation: update the introductory section

The second paragraph in the git(1) description section were meant to
guide people who are not ready to dive into this page away from here.
Referring migrating CVS users to another page before they get
acquainted with Git was somewhat out of place. Move the reference to
the "FURTHER DOCUMENTATION" section and push that section down.

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

Documentation: update URL for formatted pagesJunio C Hamano Fri, 17 Aug 2012 19:14:57 +0000 (12:14 -0700)

Documentation: update URL for formatted pages

The one at kernel.org has not been updated for quite a while and
can no longer be called "the latest".

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

stash: invoke rerere in case of conflictPhil Hord Tue, 10 Jul 2012 22:52:28 +0000 (18:52 -0400)

stash: invoke rerere in case of conflict

"stash apply" directly calls a backend merge function which does not
automatically invoke rerere. This confuses mergetool when leftover
rerere state is left behind from previous merges.

Invoke rerere explicitly when we encounter a conflict during stash
apply. This turns the test introduced by the previous commit to
succeed.

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: git-stash conflict sets up rererePhil Hord Tue, 10 Jul 2012 22:52:27 +0000 (18:52 -0400)

test: git-stash conflict sets up rerere

Add a test to make sure that a conflicted "stash apply" invokes
rerere to record the conflicts and resolve the the files it can
(the current code doesn't, so the test is marked as failing).

Without correct state recorded for rerere, mergetool may be
confused, causing it to think no files have conflicts even though
they do. This condition is not verified by this test since a
subsequent commit will change the behavior to enable rerere for
stash conflicts.

Also, the next test expected us to finish up with a reset, which is
impossible to do if we fail (as we must) and it's an unreasonable
expectation anyway. Begin the next test with a reset of its own
instead.

Signed-off-by: Phil Hord <hordp@cisco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cleanup precompose_utf8Robin Rosenberg Fri, 17 Aug 2012 14:53:10 +0000 (16:53 +0200)

cleanup precompose_utf8

- Remove extraneous parentheses and braces;

- Remove redundant NUL-termination before strcpy();

- Check result of unlink when probing for decomposed file names;

- Adjust for the coding style by adding missing whitespaces;

- Move storage class "static" at the beginning of the decl.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

man: git pull -r is a short for --rebaseMiklos Vajna Thu, 16 Aug 2012 09:50:18 +0000 (11:50 +0200)

man: git pull -r is a short for --rebase

Letting the "--rebase" option squat on the short-and-sweet single
letter option "-r" was an unintended accident and was not even
documented, but the short option seems to be already used in the
wild. Let's document it so that other options that begin with "r"
would not be tempted to steal it.

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitcli: describe abbreviation of long optionsJunio C Hamano Fri, 17 Aug 2012 06:16:22 +0000 (23:16 -0700)

gitcli: describe abbreviation of long options

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

contrib: add win32 credential-helperErik Faye-Lund Fri, 27 Jul 2012 17:10:06 +0000 (19:10 +0200)

contrib: add win32 credential-helper

Since the Windows port of Git expects binary pipes, we need to make
sure the helper-end also sets up binary pipes.

Side-step CRLF-issue in test to make it pass.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-po to update Swedis... Junio C Hamano Fri, 17 Aug 2012 03:13:45 +0000 (20:13 -0700)

Merge git://github.com/git-l10n/git-po to update Swedish translation

* git://github.com/git-l10n/git-po:
l10n: Fixes to Swedish translation

l10n: Fixes to Swedish translationPeter Krefting Tue, 14 Aug 2012 08:58:14 +0000 (09:58 +0100)

l10n: Fixes to Swedish translation

Tersify texts overflowing an 80-character terminal.
Fix spelling mistakes.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

Git 1.7.12-rc3 v1.7.12-rc3Junio C Hamano Wed, 15 Aug 2012 20:46:16 +0000 (13:46 -0700)

Git 1.7.12-rc3

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

Sync with 1.7.11.5Junio C Hamano Wed, 15 Aug 2012 20:41:17 +0000 (13:41 -0700)

Sync with 1.7.11.5

Git 1.7.11.5 v1.7.11.5Junio C Hamano Wed, 15 Aug 2012 20:39:53 +0000 (13:39 -0700)

Git 1.7.11.5

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

Merge branch 'rj/maint-grep-remove-redundant-test'... Junio C Hamano Wed, 15 Aug 2012 20:37:20 +0000 (13:37 -0700)

Merge branch 'rj/maint-grep-remove-redundant-test' into maint

* rj/maint-grep-remove-redundant-test:
t7810-*.sh: Remove redundant test

Merge branch 'hv/link-alt-odb-entry' into maintJunio C Hamano Wed, 15 Aug 2012 20:36:47 +0000 (13:36 -0700)

Merge branch 'hv/link-alt-odb-entry' into maint

* hv/link-alt-odb-entry:
link_alt_odb_entry: fix read over array bounds reported by valgrind

rev-list docs: clarify --topo-order descriptionJunio C Hamano Wed, 15 Aug 2012 20:02:48 +0000 (13:02 -0700)

rev-list docs: clarify --topo-order description

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

Reword the description for both "--date-order" and "--topo-order",
and add an illustration to it.

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

gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFOJay Soffian Thu, 9 Aug 2012 02:29:26 +0000 (22:29 -0400)

gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

When gitweb is used as a DirectoryIndex, it attempts to strip
PATH_INFO on its own, as $cgi->url() fails to do so.

However, it fails to account for the fact that PATH_INFO has
already been URL-decoded by the web server, but the value
returned by $cgi->url() has not been. This causes the stripping
to fail whenever the URL contains encoded characters.

To see this in action, setup gitweb as a DirectoryIndex and
then use it on a repository with a directory containing a
space in the name. Navigate to tree view, examine the gitweb
generated html and you'll see a link such as:

<a href="/test.git/tree/HEAD:/directory with spaces">directory with spaces</a>

When clicked on, the browser will URL-encode this link, giving
a $cgi->url() of the form:

/test.git/tree/HEAD:/directory%20with%20spaces

While PATH_INFO is:

/test.git/tree/HEAD:/directory with spaces

Fix this by calling unescape() on both $my_url and $my_uri before
stripping PATH_INFO from them.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon: --access-hook optionJunio C Hamano Tue, 14 Aug 2012 18:37:51 +0000 (11:37 -0700)

daemon: --access-hook option

The --access-hook option to "git daemon" specifies an external
command to be run every time a client connects, with

- service name (e.g. "upload-pack", etc.),
- path to the repository,
- hostname (%H),
- canonical hostname (%CH),
- ip address (%IP),
- tcp port (%P)

as its command line arguments. The external command can decide to
decline the service by exiting with a non-zero status (or to allow it
by exiting with a zero status). It can also look at the $REMOTE_ADDR
and $REMOTE_PORT environment variables to learn about the requestor
when making this decision.

The external command can optionally write a single line to its
standard output to be sent to the requestor as an error message when
it declines the service.

Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/CodingGuidelines: spell out more shell... Heiko Voigt Wed, 15 Aug 2012 17:06:01 +0000 (19:06 +0200)

Documentation/CodingGuidelines: spell out more shell guidelines

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

Spell some of the guidelines out.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: validate & reconfirm interactive responsesJunio C Hamano Tue, 14 Aug 2012 22:15:53 +0000 (15:15 -0700)

send-email: validate & reconfirm interactive responses

People answer 'y' to "Who should the emails appear to be from?" and
'n' to "Message-ID to be used as In-Reply-To for the first email?"
for some unknown reason. While it is possible that your local
username really is "y" and you are sending the mail to your local
colleagues, it is possible, and some might even say it is likely,
that it is a user error.

Fortunately, our interactive prompter already has input validation
mechanism built-in. Enhance it so that we can optionally reconfirm
and allow the user to pass an input that does not validate, and
"softly" require input to the sender, in-reply-to, and recipient to
contain "@" and "." in this order, which would catch most cases of
mistakes.

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

Let submodule command exit with error status if path... Heiko Voigt Tue, 14 Aug 2012 20:35:27 +0000 (22:35 +0200)

Let submodule command exit with error status if path does not exist

Various subcommands of the "git submodule" command exited with 0
status even though the path given by the user did not exist.

The reason behind that was that they all pipe the output of
module_list into the while loop which then does the action on the
paths specified by the commandline. Since the exit code of the
command on the upstream side of the pipe is ignored by the shell,
the status code of "ls-files --error-unmatch" nor "module_list" was
not propagated.

In case ls-files returns with an error code, we write a special
string that is not possible in non error situations, and no other
output, so that the downstream can detect the error and die with an
error code.

The error message that there is an unmatched pathspec comes through
stderr directly from ls-files. So the user still gets a hint whats going
on.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: mention server version with verbose outputJeff King Tue, 14 Aug 2012 02:02:10 +0000 (22:02 -0400)

fetch-pack: mention server version with verbose output

Fetch-pack's verbose mode is more of a debugging mode (and
in fact takes two "-v" arguments to trigger via the
porcelain layer). Let's mention the server version as
another possible item of interest.

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

parse_feature_request: make it easier to see feature... Jeff King Tue, 14 Aug 2012 01:59:27 +0000 (21:59 -0400)

parse_feature_request: make it easier to see feature values

We already take care to parse key/value capabilities like
"foo=bar", but the code does not provide a good way of
actually finding out what is on the right-hand side of the
"=".

A server using "parse_feature_request" could accomplish this
with some extra parsing. You must skip past the "key"
portion manually, check for "=" versus NUL or space, and
then find the length by searching for the next space (or
NUL). But clients can't even do that, since the
"server_supports" interface does not even return the
pointer.

Instead, let's have our parser share more information by
providing a pointer to the value and its length. The
"parse_feature_value" function returns a pointer to the
feature's value portion, along with the length of the value.
If the feature is missing, NULL is returned. If it does not
have an "=", then a zero-length value is returned.

Similarly, "server_feature_value" behaves in the same way,
but always checks the static server_feature_list variable.

We can then implement "server_supports" in terms of
"server_feature_value". We cannot implement the original
"parse_feature_request" in terms of our new function,
because it returned a pointer to the beginning of the
feature. However, no callers actually cared about the value
of the returned pointer, so we can simplify it to a boolean
just as we do for "server_supports".

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

git p4: do wildcard decoding in stripRepoPathPete Wyckoff Sat, 11 Aug 2012 16:55:03 +0000 (12:55 -0400)

git p4: do wildcard decoding in stripRepoPath

Instead of having to remember to do it after each call to
stripRepoPath, make it part of that function.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4: set self.branchPrefixes in initializationPete Wyckoff Sat, 11 Aug 2012 16:55:02 +0000 (12:55 -0400)

git p4: set self.branchPrefixes in initialization

This instance variable is needed during commit() to map
files from p4 to their relative locations in git. Set
it when initializing P4Sync to avoid passing it to every
commit() call.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: add broken --use-client-spec --detect... Pete Wyckoff Sat, 11 Aug 2012 16:55:01 +0000 (12:55 -0400)

git p4 test: add broken --use-client-spec --detect-branches tests

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: move client_view() function to libraryPete Wyckoff Sat, 11 Aug 2012 16:55:00 +0000 (12:55 -0400)

git p4 test: move client_view() function to library

This code will be useful in --detect-branches --use-client-spec tests.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: do not ask for unadvertised capabilitiesJunio C Hamano Fri, 10 Aug 2012 21:27:52 +0000 (14:27 -0700)

fetch-pack: do not ask for unadvertised capabilities

In the same spirit as the previous fix, stop asking for thin-pack, no-progress
and include-tag capabilities when the other end does not claim to support them.

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

git svn: reset invalidates the memoized mergeinfo cachesPeter Baumann Thu, 9 Aug 2012 06:42:53 +0000 (08:42 +0200)

git svn: reset invalidates the memoized mergeinfo caches

Since v1.7.0-rc2~11 (git-svn: persistent memoization, 2010-01-30),
git-svn has maintained some private per-repository caches in
.git/svn/.caches to avoid refetching and recalculating some
mergeinfo-related information with every 'git svn fetch'.

This memoization can cause problems, e.g consider the following case:

SVN repo:

... - a - b - c - m <- trunk
\ /
d - e <- branch1

The Git import of the above repo is at commit 'a' and doesn't know about
the branch1. In case of an 'git svn rebase', only the trunk of the
SVN repo is imported. During the creation of the git commit 'm', git svn
uses the svn:mergeinfo property and tries to find the corresponding git
commit 'e' to create 'm' with 'c' and 'e' as parents. But git svn rebase
only imports the current branch so commit 'e' is not imported.
Therefore git svn fails to create commit 'm' as a merge commit, because one
of its parents is not known to git. The imported history looks like this:

... - a - b - c - m <- trunk

A later 'git svn fetch' to import all branches can't rewrite the commit 'm'
to add 'e' as a parent and to make it a real git merge commit, because it
was already imported.

That's why the imported history misses the merge and looks like this:

... - a - b - c - m <- trunk
\
d - e <- branch1

Right now the only known workaround for importing 'm' as a merge is to
force reimporting 'm' again from SVN, e.g. via

$ git svn reset --revision $(git find-rev $c)
$ git svn fetch

Sadly, this is where the behavior has regressed: git svn reset doesn't
invalidate the old mergeinfo cache, which is no longer valid for the
reimport, which leads to 'm' beeing imprted with only 'c' as parent.

As solution to this problem, this commit invalidates the mergeinfo cache
to force correct recalculation of the parents.

During development of this patch, several ways for invalidating the cache
where considered. One of them is to use Memoize::flush_cache, which will
call the CLEAR method on the underlying Memoize persistency implementation.
Sadly, neither Memoize::Storable nor the newer Memoize::YAML module
introduced in 68f532f4ba888 could optionally be used implement the
CLEAR method, so this is not an option.

Reseting the internal hash used to store the memoized values has the same
problem, because it calls the non-existing CLEAR method of the
underlying persistency layer, too.

Considering this and taking into account the different implementations
of the memoization modules, where Memoize::Storable is not in our control,
implementing the missing CLEAR method is not an option, at least not if
Memoize::Storable is still used.

Therefore the easiest solution to clear the cache is to delete the files
on disk in 'git svn reset'. Normally, deleting the files behind the back
of the memoization module would be problematic, because the in-memory
representation would still exist and contain wrong data. Fortunately, the
memoization is active in memory only for a small portion of the code.
Invalidating the cache by deleting the files on disk if it isn't active
should be safe.

Signed-off-by: Peter Baumann <waste.manager@gmx.de>
Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

git svn: handle errors and concurrent commits in dcommitRobert Luberda Wed, 8 Aug 2012 05:35:00 +0000 (07:35 +0200)

git svn: handle errors and concurrent commits in dcommit

dcommit didn't handle errors returned by SVN and coped very
poorly with concurrent commits that appear in SVN repository
while dcommit was running. In both cases it left git repository
in inconsistent state: index (which was reset with `git reset
--mixed' after a successful commit to SVN) no longer matched the
checkouted tree, when the following commit failed or needed to be
rebased. See http://bugs.debian.org/676904 for examples.

This patch fixes the issues by:
- introducing error handler for dcommit. The handler will try
to rebase or reset working tree before returning error to the
end user. dcommit_rebase function was extracted out of cmd_dcommit
to ensure consistency between cmd_dcommit and the error handler.
- calling `git reset --mixed' only once after all patches are
successfully committed to SVN. This ensures index is not touched
for most of the time of dcommit run.

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

do not send client agent unless server does firstJeff King Fri, 10 Aug 2012 07:57:43 +0000 (03:57 -0400)

do not send client agent unless server does first

Commit ff5effdf taught both clients and servers of the git protocol
to send an "agent" capability that just advertises their version for
statistics and debugging purposes. The protocol-capabilities.txt
document however indicates that the client's advertisement is
actually a response, and should never include capabilities not
mentioned in the server's advertisement.

Adding the unconditional advertisement in the server programs was
OK, then, but the clients broke the protocol. The server
implementation of git-core itself does not care, but at least one
does: the Google Code git server (or any server using Dulwich), will
hang up with an internal error upon seeing an unknown capability.

Instead, each client must record whether we saw an agent string from
the server, and respond with its agent only if the server mentioned
it first.

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

send-pack: fix capability-sending logicJeff King Fri, 10 Aug 2012 07:57:31 +0000 (03:57 -0400)

send-pack: fix capability-sending logic

If we have capabilities to send to the server, we send the
regular "want" line followed by a NUL, then the
capabilities; otherwise, we do not even send the NUL.

However, when checking whether we want to send the "quiet"
capability, we check args->quiet, which is wrong. That flag
only tells us whether the client side wanted to be quiet,
not whether the server supports it (originally, in c207e34f,
it meant both; however, that was later split into two flags
by 01fdc21f).

We still check the right flag when actually printing
"quiet", so this could only have two effects:

1. We might send the trailing NUL when we do not otherwise
need to. In theory, an antique pre-capability
implementation of git might choke on this (since the
client is instructed never to respond with capabilities
that the server has not first advertised).

2. We might also want to send the quiet flag if the
args->progress flag is false, but this code path would
not trigger in that instance.

In practice, it almost certainly never matters. The
report-status capability dates back to 2005. Any real-world
server is going to advertise that, and we will always
respond with at least that capability.

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

rebase -i: use full onto sha1 in reflogMichael J Gruber Fri, 10 Aug 2012 06:51:19 +0000 (08:51 +0200)

rebase -i: use full onto sha1 in reflog

'git rebase' uses the full onto sha1 for the reflog message whereas 'git
rebase -i' uses the short sha1. This is not only inconsistent, but can
lead to problems when the reflog is inspected at a later time at which
that abbreviation may have become ambiguous.

Make 'rebase -i' use the full onto sha1, as well.

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

Add Code Compare v2.80.4 as a merge / diff tool for... Sebastian Schuberth Fri, 10 Aug 2012 08:21:06 +0000 (10:21 +0200)

Add Code Compare v2.80.4 as a merge / diff tool for Windows

Code Compare is a commercial file comparison tool for Windows, see

http://www.devart.com/codecompare/

Version 2.80.4 added support for command line arguments preceded by a
dash instead of a slash. This is required for Git for Windows because
slashes in command line arguments get mangled with according to these
rules:

http://www.mingw.org/wiki/Posix_path_conversion

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetool,difftool: Document --tool-help consistentlyDavid Aguilar Fri, 10 Aug 2012 07:39:22 +0000 (00:39 -0700)

mergetool,difftool: Document --tool-help consistently

Add an entry for --tool-help to the mergetool documentation.

Move --tool-help in the difftool documentation so that it is
listed immediately after --tool so that it is easier to find.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Thu, 9 Aug 2012 17:51:46 +0000 (10:51 -0700)

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

L10n updates for 1.7.12-rc2

* 'master' of git://github.com/git-l10n/git-po:
l10n: Update Swedish translation (1168t0f0u)
l10n: de.po: translate 77 new messages
l10n: vi.po: update one message
l10n: zh_CN.po: update one translation
l10n: Update one message in git.pot

add tests for 'git rebase --keep-empty'Martin von Zweigbergk Thu, 9 Aug 2012 15:39:51 +0000 (08:39 -0700)

add tests for 'git rebase --keep-empty'

Add test cases for 'git rebase --keep-empty' with and without an
"empty" commit already in upstream. The empty commit that is about to
be rebased should be kept in both cases.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: Update Swedish translation (1168t0f0u)Peter Krefting Thu, 9 Aug 2012 05:36:41 +0000 (06:36 +0100)

l10n: Update Swedish translation (1168t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

Merge branch 'bw/maint-1.7.9-solaris-getpass'Junio C Hamano Wed, 8 Aug 2012 22:14:57 +0000 (15:14 -0700)

Merge branch 'bw/maint-1.7.9-solaris-getpass'

The recent update to terminal I/O interface to get passwords &c
interactively didn't quite work on Solaris.

* bw/maint-1.7.9-solaris-getpass:
Enable HAVE_DEV_TTY for Solaris
terminal: seek when switching between reading and writing

sh-setup: protect from exported IFSJunio C Hamano Wed, 8 Aug 2012 19:08:17 +0000 (12:08 -0700)

sh-setup: protect from exported IFS

Many scripted Porcelains rely on being able to split words at the
default $IFS characters, i.e. SP, HT and LF. If the user exports a
non-default IFS to the environment, what they read from plumbing
commands such as ls-files that use HT to delimit fields may not be
split in the way we expect.

Protect outselves by resetting it, just like we do so against CDPATH
exported to the environment.

Noticed by Andrew Dranse <adranse@oanda.com>.

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

check-docs: get documented command list from MakefileJeff King Wed, 8 Aug 2012 20:57:52 +0000 (16:57 -0400)

check-docs: get documented command list from Makefile

The current code tries to get a list of documented commands
by doing "ls Documentation/git*txt" and culling a bunch of
special cases from the result. Looking for "git-*.txt" would
be more accurate, but would miss a few commands like
"gitweb" and "gitk".

Fortunately, Documentation/Makefile already knows what this
list is, so we can just ask it. Annoyingly, we still have to
post-process its output a little, since make will print
extra cruft like "GIT-VERSION-FILE is up to date" to stdout.

Now that our list is accurate, we can remove all of the ugly
special-cases.

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

check-docs: drop git-help special-caseJeff King Wed, 8 Aug 2012 20:57:13 +0000 (16:57 -0400)

check-docs: drop git-help special-case

The check-docs target special-cases git-help to avoid
mentioning it as "documented but removed". This dates back
to the early implementation of git-help, when its code was
simply included inside git.c.

These days it is a full-fledged builtin (in builtin/help.c)
and does not need special-casing.

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

check-docs: list git-gui as a commandJeff King Wed, 8 Aug 2012 20:56:42 +0000 (16:56 -0400)

check-docs: list git-gui as a command

git-gui is already documented and mentioned in command-list,
but adding it to the Makefile makes sure it is so. We also
add its alias git-citool (which is also documented).

As a result, we can drop them from the special case
statement that avoids them being listed as "documented but
does not exist".

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

check-docs: factor out command-listJeff King Wed, 8 Aug 2012 20:56:04 +0000 (16:56 -0400)

check-docs: factor out command-list

The check-docs command list is composed from several
Makefile variables plus some special cases. Let's make the
meaning of the list more obvious and avoid repeating
ourselves by factoring it out.

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

command-list: mention git-credential-* helpersJeff King Wed, 8 Aug 2012 18:34:49 +0000 (14:34 -0400)

command-list: mention git-credential-* helpers

These commands were never added to the command-list. Adding
them makes "make check-docs" run without complaint.
While we're at it, let's capitalize the first letter of
their one-line summaries to match the rest of the git
manpages.

The credential-cache--daemon command is somewhat special. It
is already ignored by check-docs because it contains a "--",
marking it as a non-interesting implementation detail. It
is, in fact, documented, but since the documentation
basically just redirects you to a more appropriate command
anyway, let's explicitly omit it so it is not mentioned in
git(1).

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

command-list: add git-sh-i18nJeff King Wed, 8 Aug 2012 18:34:39 +0000 (14:34 -0400)

command-list: add git-sh-i18n

This is in the same category as git-sh-setup.

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

check-docs: update non-command documentation listJeff King Wed, 8 Aug 2012 18:34:33 +0000 (14:34 -0400)

check-docs: update non-command documentation list

The check-docs target looks at Documentation/git*txt and
complains if any entry does not have a matching command.
Therefore we need to explicitly ignore any entries which are
not meant to describe a command (like gitattributes.txt).
This list has grown stale over time, so let's bring it up to
date.

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

check-docs: mention gitweb speciallyJeff King Wed, 8 Aug 2012 18:32:37 +0000 (14:32 -0400)

check-docs: mention gitweb specially

Like gitk, gitweb is not listed in the usual Makefile
variables and must be fed to check-docs specially. Otherwise
check-docs thinks it is documented but removed.

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

Documentation: list git-credential in plumbing commandsMatthieu Moy Wed, 8 Aug 2012 07:58:27 +0000 (09:58 +0200)

Documentation: list git-credential in plumbing commands

Commit e30b2feb1b (Jun 24 2012, add 'git credential' plumbing command)
forgot to add git-credential to command-list.txt, hence the command was
not appearing in the documentation, making it hard for users to discover
it.

While we're there, capitalize the description line for git-crendential
for consistency with other commands.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/ralfth/git-po-deJiang Xin Tue, 7 Aug 2012 23:23:01 +0000 (07:23 +0800)

Merge git://github.com/ralfth/git-po-de

* git://github.com/ralfth/git-po-de:
l10n: de.po: translate 77 new messages

prune.c: only print informational message in show_only... Brandon Casey Tue, 7 Aug 2012 05:01:49 +0000 (22:01 -0700)

prune.c: only print informational message in show_only or verbose mode

"git prune" reports removal of loose object files that are no longer
necessary only under the "-v" option, but unconditionally reports
removal of temporary files that are no longer needed.

The original thinking was that the presence of a leftover temporary
file should be an unusual occurrence that may indicate an earlier
failure of some sort, and the user may want to be reminded of it.
Removing an unnecessary loose object file, on the other hand, is
just part of the normal operation. That is why the former is always
printed out and the latter only when -v is used.

But neither report is particularly useful. Hide both of these
behind the "-v" option for consistency.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: monospace listings in docbook outputJeff King Tue, 7 Aug 2012 20:07:38 +0000 (16:07 -0400)

docs: monospace listings in docbook output

When asciidoc converts a listing block like:

----------------------
$ git log --merge
----------------------

it marks it to be displayed in a monospace font. This works
fine when generating HTML output. However, when generating
docbook output, we override the expansion of a listingblock
to work around bugs in some versions of the docbook
toolchain. Our override did not mark the listingblock with
the "monospaced" class.

The main output that uses docbook as an intermediate format
is the manpages. We didn't notice any issue there because
the monospaced class seems to be ignored when generating
roff from the docbook manpages.

However, when generating texinfo to make info pages, docbook
does respect this class. The resulting texinfo output
properly uses "@example" blocks to display the listing in
this case. Besides possibly looking prettier in some texinfo
backends, one important effect is that the monospace font
suppresses texinfo's expansion of "--" and "---" into
en-dashes and em-dashes. With the current code, the example
above ends up looking like "git log -merge", which is
confusing and wrong.

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

Git 1.7.12-rc2 v1.7.12-rc2Junio C Hamano Tue, 7 Aug 2012 17:39:34 +0000 (10:39 -0700)

Git 1.7.12-rc2

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

l10n: de.po: translate 77 new messagesRalf Thielow Thu, 2 Aug 2012 16:06:12 +0000 (18:06 +0200)

l10n: de.po: translate 77 new messages

Translate 77 new messages came from git.pot update
in 3b6137f (l10n: Update git.pot (76 new, 4 removed
messages)) and bb2ba06 (l10n: Update one message in
git.pot).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>

receive-pack: do not leak output from auto-gc to standa... Junio C Hamano Tue, 7 Aug 2012 05:31:10 +0000 (22:31 -0700)

receive-pack: do not leak output from auto-gc to standard output

The standard output channel of receive-pack is a structured protocol
channel, and subprocesses must never be allowed to leak anything
into it by writing to their standard output.

Use RUN_COMMAND_STDOUT_TO_STDERR option to run_command_v_opt() just
like we do when running hooks to prevent output from "gc" leaking to
the standard output.

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

t/t5400: demonstrate breakage caused by informational... Brandon Casey Tue, 7 Aug 2012 05:01:48 +0000 (22:01 -0700)

t/t5400: demonstrate breakage caused by informational message from prune

When receive-pack triggers 'git gc --auto' and 'git prune' is called to
remove a stale temporary object, 'git prune' prints an informational
message to stdout about the file that it will remove. Since this message
is written to stdout, it is sent back over the transport channel to the git
client which tries to interpret it as part of the pack protocol and then
promptly terminates with a complaint about a protocol error.

Introduce a test which exercises the auto-gc functionality of receive-pack
and demonstrates this breakage.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Enable HAVE_DEV_TTY for SolarisBen Walton Tue, 7 Aug 2012 03:07:42 +0000 (23:07 -0400)

Enable HAVE_DEV_TTY for Solaris

Now that git_terminal_prompt can cleanly interact with /dev/tty on
Solaris, enable HAVE_DEV_TTY so that this code path is used for
credential reading instead of relying on the crippled getpass().

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

terminal: seek when switching between reading and writingJeff King Tue, 7 Aug 2012 04:10:26 +0000 (00:10 -0400)

terminal: seek when switching between reading and writing

When a stdio stream is opened in update mode (e.g., "w+"),
the C standard forbids switching between reading or writing
without an intervening positioning function. Many
implementations are lenient about this, but Solaris libc
will flush the recently-read contents to the output buffer.
In this instance, that meant writing the non-echoed password
that the user just typed to the terminal.

Fix it by inserting a no-op fseek between the read and
write.

The opposite direction (writing followed by reading) is also
disallowed, but our intervening fflush is an acceptable
positioning function for that alternative.

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

l10n: vi.po: update one messageTran Ngoc Quan Tue, 7 Aug 2012 00:18:01 +0000 (07:18 +0700)

l10n: vi.po: update one message

* Translate message that updated from commit bb2ba06

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

Drop 1.7.11.x items from 1.7.12 release notesJunio C Hamano Mon, 6 Aug 2012 22:58:38 +0000 (15:58 -0700)

Drop 1.7.11.x items from 1.7.12 release notes

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

Sync with maintJunio C Hamano Mon, 6 Aug 2012 22:53:33 +0000 (15:53 -0700)

Sync with maint

Prepare for 1.7.11.5Junio C Hamano Mon, 6 Aug 2012 22:51:58 +0000 (15:51 -0700)

Prepare for 1.7.11.5

Hopefully that will be the final 1.7.11.x maintenance release.

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

Merge branch 'jn/block-sha1' into maintJunio C Hamano Mon, 6 Aug 2012 22:40:00 +0000 (15:40 -0700)

Merge branch 'jn/block-sha1' into maint

* jn/block-sha1:
Makefile: BLK_SHA1 does not require fast htonl() and unaligned loads
block-sha1: put expanded macro parameters in parentheses
block-sha1: avoid pointer conversion that violates alignment constraints

Merge branch 'jn/make-assembly-in-right-directory'... Junio C Hamano Mon, 6 Aug 2012 22:39:38 +0000 (15:39 -0700)

Merge branch 'jn/make-assembly-in-right-directory' into maint

* jn/make-assembly-in-right-directory:
Makefile: fix location of listing produced by "make subdir/foo.s"

Merge branch 'ms/daemon-doc-typo' into maintJunio C Hamano Mon, 6 Aug 2012 22:39:16 +0000 (15:39 -0700)

Merge branch 'ms/daemon-doc-typo' into maint

* ms/daemon-doc-typo:
Documentation/git-daemon: add missing word

Merge branch 'lm/git-blame-el' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:54 +0000 (15:37 -0700)

Merge branch 'lm/git-blame-el' into maint

* lm/git-blame-el:
git-blame.el: Do not use bare 0 to mean (point-min)
git-blame.el: Use with-current-buffer where appropriate
git-blame.el: Do not use goto-line in lisp code

Merge branch 'rs/ipv6-ssh-url' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:43 +0000 (15:37 -0700)

Merge branch 'rs/ipv6-ssh-url' into maint

* rs/ipv6-ssh-url:
git: Wrong parsing of ssh urls with IPv6 literals ignores port

Merge branch 'rs/git-blame-mapcar-mapc' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:28 +0000 (15:37 -0700)

Merge branch 'rs/git-blame-mapcar-mapc' into maint

* rs/git-blame-mapcar-mapc:
git-blame.el: use mapc instead of mapcar

Merge branch 'rr/doc-commit' into maintJunio C Hamano Mon, 6 Aug 2012 22:37:09 +0000 (15:37 -0700)

Merge branch 'rr/doc-commit' into maint

* rr/doc-commit:
commit: document a couple of options

doc: A few minor copy edits.Štěpán Němec Sat, 14 Jul 2012 22:20:36 +0000 (00:20 +0200)

doc: A few minor copy edits.

- (glossary) the quotes around the Wikipedia URL prevented its
linkification in frontends that support it; remove them

- (manual) newer version (SHA-1) == following, older == preceding, not
the other way around

- trivial typo and wording fixes

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/maint-checkout-orphan-check-fix' into... Junio C Hamano Mon, 6 Aug 2012 22:31:16 +0000 (15:31 -0700)

Merge branch 'jk/maint-checkout-orphan-check-fix' into maint

* jk/maint-checkout-orphan-check-fix:
checkout: don't confuse ref and object flags

Merge branch 'mh/maint-revisions-doc' into maintJunio C Hamano Mon, 6 Aug 2012 22:30:57 +0000 (15:30 -0700)

Merge branch 'mh/maint-revisions-doc' into maint

* mh/maint-revisions-doc:
Enumerate revision range specifiers in the documentation
Make <refname> documentation more consistent.

Merge branch 'jc/mergetool-tool-help' into maintJunio C Hamano Mon, 6 Aug 2012 22:30:18 +0000 (15:30 -0700)

Merge branch 'jc/mergetool-tool-help' into maint

* jc/mergetool-tool-help:
mergetool: support --tool-help option like difftool does

Makefile: use overridable $(FIND) instead of hard-coded... Johannes Sixt Mon, 6 Aug 2012 21:06:14 +0000 (23:06 +0200)

Makefile: use overridable $(FIND) instead of hard-coded 'find'

The Makefile already offers the variable $(FIND) and uses it except in one
place. Fix it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: do not mention .git/refs/* directoriesJunio C Hamano Mon, 6 Aug 2012 20:36:47 +0000 (13:36 -0700)

Documentation: do not mention .git/refs/* directories

It is an implementation detail that a new tag is created by adding a
file in the .git/refs/tags directory. The only thing the user needs
to know is that a "git tag" creates a ref in the refs/tags namespace,
and without "-f", it does not overwrite an existing tag.

Inspired by a report from 乙酸鋰 <ch3cooli@gmail.com>; I think I
caught all the existing mention in Documentation/ directory in the
tip of 1.7.9.X maintenance track, but we may have added new ones
since then.

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

l10n: zh_CN.po: update one translationJiang Xin Mon, 6 Aug 2012 17:10:34 +0000 (01:10 +0800)

l10n: zh_CN.po: update one translation

Translate 1 new messages came from git.pot update in bb2ba06
(l10n: Update one message in git.pot)

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

read_index_from: remove bogus errno assignmentsNguyễn Thái Ngọc Duy Mon, 6 Aug 2012 11:27:09 +0000 (18:27 +0700)

read_index_from: remove bogus errno assignments

These assignments comes from the very first commit e83c516 (Initial
revision of "git", the information manager from hell - 2005-04-07).
Back then we did not die() when errors happened so correct errno was
required.

Since 5d1a5c0 ([PATCH] Better error reporting for "git status" -
2005-10-01), read_index_from() learned to die rather than just return
-1 and these assignments became irrelevant. Remove them.

While at it, move die_errno() next to xmmap() call because it's the
mmap's error code that we care about. Otherwise if close(fd); fails,
it could overwrite mmap's errno.

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

cherry-pick: add --allow-empty-message optionChris Webb Thu, 2 Aug 2012 10:38:51 +0000 (11:38 +0100)

cherry-pick: add --allow-empty-message option

Scripts such as "git rebase -i" cannot currently cherry-pick commits
which have an empty commit message, as git cherry-pick calls git
commit without the --allow-empty-message option.

Add an --allow-empty-message option to git cherry-pick which is passed
through to git commit, so this behaviour can be overridden.

Signed-off-by: Chris Webb <chris@arachsys.com>
Reviewed-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: Update one message in git.potJiang Xin Mon, 6 Aug 2012 15:48:08 +0000 (23:48 +0800)

l10n: Update one message in git.pot

This update comes from commit v1.7.12-rc1-18-ge0453
(merge-recursive: separate message for common ancestors).

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Mon, 6 Aug 2012 03:51:05 +0000 (20:51 -0700)

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

* git://github.com/git-l10n/git-po:
l10n: zh_CN.po: translate 76 new messages
l10n: vi.po update to follow POT in 3b613
l10n: Update git.pot (76 new, 4 removed messages)

apply: delete unused deflate_origlen from patch structPaul Gortmaker Thu, 2 Aug 2012 22:25:30 +0000 (18:25 -0400)

apply: delete unused deflate_origlen from patch struct

It hasn't been used since 2006, as of commit 3cd4f5e8

"git-apply --binary: clean up and prepare for --reverse"

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix '\ No newline...' annotation in rewrite diffsAdam Butcher Sat, 4 Aug 2012 21:07:35 +0000 (21:07 +0000)

Fix '\ No newline...' annotation in rewrite diffs

When a file that ends with an incomplete line is expressed as a
complete rewrite with the -B option, git diff incorrectly
appends the incomplete line indicator "\ No newline at end of
file" after such a line, rather than writing it on a line of its
own (the output codepath for normal output without -B does not
have this problem). Add a LF after the incomplete line before
writing the "\ No newline ..." out to fix this.

Add a couple of tests to confirm that the indicator comment is
generated on its own line in both plain diff and rewrite mode.

Signed-off-by: Adam Butcher <dev.lists@jessamine.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: separate message for common ancestorsRalf Thielow Sun, 5 Aug 2012 17:56:38 +0000 (19:56 +0200)

merge-recursive: separate message for common ancestors

The function "merge_recursive" prints the count of common ancestors
as "found %u common ancestor(s):". We should use a singular and a
plural form of this message to help translators.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: zh_CN.po: translate 76 new messagesJiang Xin Thu, 2 Aug 2012 03:50:59 +0000 (11:50 +0800)

l10n: zh_CN.po: translate 76 new messages

Translate 76 new messages came from git.pot update in 3b6137f
(l10n: Update git.pot (76 new, 4 removed messages))

Thynson reviewed this update and also contributed other improvements:

* blob -> 二进制对象(blob)
* 共用 -> 同时使用

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Thynson <lanxingcan@gmail.com>

tests: Introduce test_seqMichał Kiedrowicz Fri, 3 Aug 2012 22:21:04 +0000 (00:21 +0200)

tests: Introduce test_seq

Jeff King wrote:

The seq command is GNU-ism, and is missing at least in older BSD
releases and their derivatives, not to mention antique
commercial Unixes.

We already purged it in b3431bc (Don't use seq in tests, not
everyone has it, 2007-05-02), but a few new instances have crept
in. They went unnoticed because they are in scripts that are not
run by default.

Replace them with test_seq that is implemented with a Perl snippet
(proposed by Jeff). This is better than inlining this snippet
everywhere it's needed because it's easier to read and it's easier
to change the implementation (e.g. to C) if we ever decide to remove
Perl from the test suite.

Note that test_seq is not a complete replacement for seq(1). It
just has what we need now, in addition that it makes it possible for
us to do something like "test_seq a m" if we wanted to in the
future.

There are also many places that do `for i in 1 2 3 ...` but I'm not sure
if it's worth converting them to test_seq. That would introduce running
more processes of Perl.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

include agent identifier in capability stringJeff King Fri, 3 Aug 2012 16:19:16 +0000 (12:19 -0400)

include agent identifier in capability string

Instead of having the client advertise a particular version
number in the git protocol, we have managed extensions and
backwards compatibility by having clients and servers
advertise capabilities that they support. This is far more
robust than having each side consult a table of
known versions, and provides sufficient information for the
protocol interaction to complete.

However, it does not allow servers to keep statistics on
which client versions are being used. This information is
not necessary to complete the network request (the
capabilities provide enough information for that), but it
may be helpful to conduct a general survey of client
versions in use.

We already send the client version in the user-agent header
for http requests; adding it here allows us to gather
similar statistics for non-http requests.

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

merge-recursive: eliminate flush_buffer() in favor... Thomas Rast Fri, 3 Aug 2012 12:16:25 +0000 (14:16 +0200)

merge-recursive: eliminate flush_buffer() in favor of write_in_full()

flush_buffer() is a thin wrapper around write_in_full() with two very
confusing properties:

* It runs a loop to handle short reads, ensuring that we write
everything. But that is precisely what write_in_full() does!

* It checks for a return value of 0 from write_in_full(), which cannot
happen: it returns this value only if count=0, but flush_buffer()
will never call write_in_full() in this case.

Remove it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff_setup_done(): return voidThomas Rast Fri, 3 Aug 2012 12:16:24 +0000 (14:16 +0200)

diff_setup_done(): return void

diff_setup_done() has historically returned an error code, but lost
the last nonzero return in 943d5b7 (allow diff.renamelimit to be set
regardless of -M/-C, 2006-08-09). The callers were in a pretty
confused state: some actually checked for the return code, and some
did not.

Let it return void, and patch all callers to take this into account.
This conveniently also gets rid of a handful of different(!) error
messages that could never be triggered anyway.

Note that the function can still die().

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: add a grep.patternType configuration settingJ Smith Fri, 3 Aug 2012 14:53:50 +0000 (10:53 -0400)

grep: add a grep.patternType configuration setting

The grep.extendedRegexp configuration setting enables the -E flag on grep
by default but there are no equivalents for the -G, -F and -P flags.

Rather than adding an additional setting for grep.fooRegexp for current
and future pattern matching options, add a grep.patternType setting that
can accept appropriate values for modifying the default grep pattern
matching behavior. The current values are "basic", "extended", "fixed",
"perl" and "default" for setting -G, -E, -F, -P and the default behavior
respectively.

When grep.patternType is set to a value other than "default", the
grep.extendedRegexp setting is ignored. The value of "default" restores
the current default behavior, including the grep.extendedRegexp
behavior.

Signed-off-by: J Smith <dark.panda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: replace TODO-list in comment... Matthieu Moy Fri, 3 Aug 2012 08:40:23 +0000 (10:40 +0200)

git-remote-mediawiki: replace TODO-list in comment by appropriate link

My account on Github is now used as wiki and issue tracking. This will be
more flexible than in-tree management of a TODO-list.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

setup: clarify error messages for file/revisions ambiguityMatthieu Moy Fri, 3 Aug 2012 08:21:20 +0000 (10:21 +0200)

setup: clarify error messages for file/revisions ambiguity

The previous "Use '--' to separate filenames from revisions" may sound
obvious for an old-time Unix user, but does not make it clear how to use
this '--'. In addition to mentionning this '--', give an idea of what the
new command should look like.

Ideally, we could provide cut-and-paste ready commands based on the
command that just failed, but we have no easy access to argv[] in this
place of the code.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: vi.po update to follow POT in 3b613Tran Ngoc Quan Fri, 3 Aug 2012 07:15:23 +0000 (14:15 +0700)

l10n: vi.po update to follow POT in 3b613

* Translated 76 new messages

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>

git-svn: remove ad-hoc canonicalizationsMichael G. Schwern Sat, 28 Jul 2012 09:47:52 +0000 (02:47 -0700)

git-svn: remove ad-hoc canonicalizations

[ew: commit title]

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

git-svn: canonicalize newly-minted URLsMichael G. Schwern Sat, 28 Jul 2012 09:47:51 +0000 (02:47 -0700)

git-svn: canonicalize newly-minted URLs

Go through all the spots that use the new add_path_to_url() to
make a new URL and canonicalize them.

* copyfrom_path has to be canonicalized else find_parent_branch
will get confused

* due to the `canonicalize_url($full_url) ne $full_url)` line of
logic in gs_do_switch(), $full_url is left alone until after.

At this point SVN 1.7 passes except for 3 tests in
t9100-git-svn-basic.sh that look like an SVN bug to do with
symlinks.

[ew: commit title]

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

git-svn: introduce add_path_to_url functionMichael G. Schwern Sat, 28 Jul 2012 09:47:50 +0000 (02:47 -0700)

git-svn: introduce add_path_to_url function

Remove the ad-hoc versions.

This is mostly to normalize the process and ensure the URLs produced
don't have double slashes or anything.

Also provides a place to fix the corner case where a file path
contains a percent sign.

[ew: commit title]

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

git-svn: canonicalize earlierMichael G. Schwern Sat, 28 Jul 2012 09:47:49 +0000 (02:47 -0700)

git-svn: canonicalize earlier

Just a few things I noticed. Its good to canonicalize as early as
possible.

[ew: commit title]

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

git-svn: replace URL escapes with canonicalizationMichael G. Schwern Sat, 28 Jul 2012 09:47:48 +0000 (02:47 -0700)

git-svn: replace URL escapes with canonicalization

The old hand-rolled URL escape functions were inferior to
canonicalization functions.

Continuing to move towards getting everything canonicalizing the same way.

* Git::SVN->init_remote_config and Git::SVN::Ra->minimize_url both
have to canonicalize the same way else init_remote_config
will incorrectly think they're different URLs causing
t9107-git-svn-migrate.sh to fail.

[ew: commit title]

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

git-svn: attempt to mimic SVN 1.7 URL canonicalizationMichael G. Schwern Sat, 28 Jul 2012 09:47:47 +0000 (02:47 -0700)

git-svn: attempt to mimic SVN 1.7 URL canonicalization

Previously, our URL canonicalization didn't do much of anything.
Now it actually escapes and collapses slashes. This is mostly a cut & paste
of escape_url from git-svn.

This is closer to how SVN 1.7's canonicalization behaves. Doing it with
1.6 lets us chase down some problems caused by more effective canonicalization
without having to deal with all the other 1.7 issues on top of that.

* Remote URLs have to be canonicalized otherwise Git::SVN->find_existing_remote
will think they're different.

* The SVN remote is now written to the git config canonicalized. That
should be ok. Adjust a test to account for that.

[ew: commit title]

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

t9107: fix typoMichael G. Schwern Sat, 28 Jul 2012 09:47:46 +0000 (02:47 -0700)

t9107: fix typo

Test to check that the migration got rid of the old style git-svn directory.
It wasn't failing, just throwing a message to STDERR.

[ew: commit title]

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

t9118: workaround inconsistency between SVN versionsMichael G. Schwern Sat, 28 Jul 2012 09:47:45 +0000 (02:47 -0700)

t9118: workaround inconsistency between SVN versions

SVN 1.7 will truncate "not-a%40{0}" to just "not-a".

Rather than guess what SVN is going to do for each version, make the test use
the branch name that was actually created.

[ew: commit title]

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