Junio C Hamano [Fri, 16 Oct 2015 21:32:36 +0000 (14:32 -0700)]
Merge branch 'jw/make-arflags-customizable' into maint
The Makefile always runs the library archiver with hardcoded "crs"
options, which was inconvenient for exotic platforms on which
people want to use programs with totally different set of command
line options.
* jw/make-arflags-customizable:
Makefile: allow $(ARFLAGS) specified from the command line
Junio C Hamano [Fri, 16 Oct 2015 21:32:35 +0000 (14:32 -0700)]
Merge branch 'jk/connect-clear-env' into maint
The ssh transport, just like any other transport over the network,
did not clear GIT_* environment variables, but it is possible to
use SendEnv and AcceptEnv to leak them to the remote invocation of
Git, which is not a good idea at all. Explicitly clear them just
like we do for the local transport.
* jk/connect-clear-env:
git_connect: clarify conn->use_shell flag
git_connect: clear GIT_* environment for ssh
Junio C Hamano [Fri, 16 Oct 2015 21:32:34 +0000 (14:32 -0700)]
Merge branch 'jk/blame-first-parent' into maint
"git blame --first-parent v1.0..v2.0" was not rejected but did not
limit the blame to commits on the first parent chain.
* jk/blame-first-parent:
blame: handle --first-parent
Junio C Hamano [Fri, 16 Oct 2015 21:32:33 +0000 (14:32 -0700)]
Merge branch 'mm/keyid-docs' into maint
Very small number of options take a parameter that is optional
(which is not a great UI element as they can only appear at the end
of the command line). Add notice to documentation of each and
every one of them.
* mm/keyid-docs:
Documentation: explain optional arguments better
Documentation/grep: fix documentation of -O
Documentation: use 'keyid' consistently, not 'key-id'
Junio C Hamano [Fri, 16 Oct 2015 21:32:32 +0000 (14:32 -0700)]
Merge branch 'pt/pull-builtin' into maint
* pt/pull-builtin:
pull: enclose <options> in brackets in the usage string
merge: grammofix in please-commit-before-merge message
Alex Henrie [Fri, 16 Oct 2015 02:22:13 +0000 (20:22 -0600)]
pull: enclose <options> in brackets in the usage string
All the other placeholders are already shown that way.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alex Henrie [Fri, 2 Oct 2015 04:25:33 +0000 (22:25 -0600)]
merge: grammofix in please-commit-before-merge message
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 29 Sep 2015 02:19:27 +0000 (19:19 -0700)]
Git 2.6.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 29 Sep 2015 02:16:54 +0000 (19:16 -0700)]
Sync with v2.5.4
Junio C Hamano [Mon, 28 Sep 2015 22:26:49 +0000 (15:26 -0700)]
Git 2.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 28 Sep 2015 22:33:56 +0000 (15:33 -0700)]
Sync with 2.4.10
Junio C Hamano [Mon, 28 Sep 2015 22:29:54 +0000 (15:29 -0700)]
Git 2.4.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 28 Sep 2015 22:28:26 +0000 (15:28 -0700)]
Sync with 2.3.10
Junio C Hamano [Mon, 28 Sep 2015 22:00:37 +0000 (15:00 -0700)]
Git 2.3.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 28 Sep 2015 21:59:28 +0000 (14:59 -0700)]
Merge branch 'jk/xdiff-memory-limits' into maint-2.3
Jeff King [Fri, 25 Sep 2015 21:58:09 +0000 (17:58 -0400)]
merge-file: enforce MAX_XDIFF_SIZE on incoming files
The previous commit enforces MAX_XDIFF_SIZE at the
interfaces to xdiff: xdi_diff (which calls xdl_diff) and
ll_xdl_merge (which calls xdl_merge).
But we have another direct call to xdl_merge in
merge-file.c. If it were written today, this probably would
just use the ll_merge machinery. But it predates that code,
and uses slightly different options to xdl_merge (e.g.,
ZEALOUS_ALNUM).
We could try to abstract out an xdi_merge to match the
existing xdi_diff, but even that is difficult. Rather than
simply report error, we try to treat large files as binary,
and that distinction would happen outside of xdi_merge.
The simplest fix is to just replicate the MAX_XDIFF_SIZE
check in merge-file.c.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 24 Sep 2015 23:12:45 +0000 (19:12 -0400)]
xdiff: reject files larger than ~1GB
The xdiff code is not prepared to handle extremely large
files. It uses "int" in many places, which can overflow if
we have a very large number of lines or even bytes in our
input files. This can cause us to produce incorrect diffs,
with no indication that the output is wrong. Or worse, we
may even underallocate a buffer whose size is the result of
an overflowing addition.
We're much better off to tell the user that we cannot diff
or merge such a large file. This patch covers both cases,
but in slightly different ways:
1. For merging, we notice the large file and cleanly fall
back to a binary merge (which is effectively "we cannot
merge this").
2. For diffing, we make the binary/text distinction much
earlier, and in many different places. For this case,
we'll use the xdi_diff as our choke point, and reject
any diff there before it hits the xdiff code.
This means in most cases we'll die() immediately after.
That's not ideal, but in practice we shouldn't
generally hit this code path unless the user is trying
to do something tricky. We already consider files
larger than core.bigfilethreshold to be binary, so this
code would only kick in when that is circumvented
(either by bumping that value, or by using a
.gitattribute to mark a file as diffable).
In other words, we can avoid being "nice" here, because
there is already nice code that tries to do the right
thing. We are adding the suspenders to the nice code's
belt, so notice when it has been worked around (both to
protect the user from malicious inputs, and because it
is better to die() than generate bogus output).
The maximum size was chosen after experimenting with feeding
large files to the xdiff code. It's just under a gigabyte,
which leaves room for two obvious cases:
- a diff3 merge conflict result on files of maximum size X
could be 3*X plus the size of the markers, which would
still be only about 3G, which fits in a 32-bit int.
- some of the diff code allocates arrays of one int per
record. Even if each file consists only of blank lines,
then a file smaller than 1G will have fewer than 1G
records, and therefore the int array will fit in 4G.
Since the limit is arbitrary anyway, I chose to go under a
gigabyte, to leave a safety margin (e.g., we would not want
to overflow by allocating "(records + 1) * sizeof(int)" or
similar.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 24 Sep 2015 23:12:23 +0000 (19:12 -0400)]
react to errors in xdi_diff
When we call into xdiff to perform a diff, we generally lose
the return code completely. Typically by ignoring the return
of our xdi_diff wrapper, but sometimes we even propagate
that return value up and then ignore it later. This can
lead to us silently producing incorrect diffs (e.g., "git
log" might produce no output at all, not even a diff header,
for a content-level diff).
In practice this does not happen very often, because the
typical reason for xdiff to report failure is that it
malloc() failed (it uses straight malloc, and not our
xmalloc wrapper). But it could also happen when xdiff
triggers one our callbacks, which returns an error (e.g.,
outf() in builtin/rerere.c tries to report a write failure
in this way). And the next patch also plans to add more
failure modes.
Let's notice an error return from xdiff and react
appropriately. In most of the diff.c code, we can simply
die(), which matches the surrounding code (e.g., that is
what we do if we fail to load a file for diffing in the
first place). This is not that elegant, but we are probably
better off dying to let the user know there was a problem,
rather than simply generating bogus output.
We could also just die() directly in xdi_diff, but the
callers typically have a bit more context, and can provide a
better message (and if we do later decide to pass errors up,
we're one step closer to doing so).
There is one interesting case, which is in diff_grep(). Here
if we cannot generate the diff, there is nothing to match,
and we silently return "no hits". This is actually what the
existing code does already, but we make it a little more
explicit.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 28 Sep 2015 21:46:05 +0000 (14:46 -0700)]
Merge branch 'jk/transfer-limit-redirection' into maint-2.3
Junio C Hamano [Mon, 28 Sep 2015 21:33:27 +0000 (14:33 -0700)]
Merge branch 'jk/transfer-limit-protocol' into maint-2.3
Junio C Hamano [Mon, 28 Sep 2015 20:18:01 +0000 (13:18 -0700)]
Git 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Blake Burkhart [Tue, 22 Sep 2015 22:06:20 +0000 (18:06 -0400)]
http: limit redirection depth
By default, libcurl will follow circular http redirects
forever. Let's put a cap on this so that somebody who can
trigger an automated fetch of an arbitrary repository (e.g.,
for CI) cannot convince git to loop infinitely.
The value chosen is 20, which is the same default that
Firefox uses.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Blake Burkhart [Tue, 22 Sep 2015 22:06:04 +0000 (18:06 -0400)]
http: limit redirection to protocol-whitelist
Previously, libcurl would follow redirection to any protocol
it was compiled for support with. This is desirable to allow
redirection from HTTP to HTTPS. However, it would even
successfully allow redirection from HTTP to SFTP, a protocol
that git does not otherwise support at all. Furthermore
git's new protocol-whitelisting could be bypassed by
following a redirect within the remote helper, as it was
only enforced at transport selection time.
This patch limits redirects within libcurl to HTTP, HTTPS,
FTP and FTPS. If there is a protocol-whitelist present, this
list is limited to those also allowed by the whitelist. As
redirection happens from within libcurl, it is impossible
for an HTTP redirect to a protocol implemented within
another remote helper.
When the curl version git was compiled with is too old to
support restrictions on protocol redirection, we warn the
user if GIT_ALLOW_PROTOCOL restrictions were requested. This
is a little inaccurate, as even without that variable in the
environment, we would still restrict SFTP, etc, and we do
not warn in that case. But anything else means we would
literally warn every time git accesses an http remote.
This commit includes a test, but it is not as robust as we
would hope. It redirects an http request to ftp, and checks
that curl complained about the protocol, which means that we
are relying on curl's specific error message to know what
happened. Ideally we would redirect to a working ftp server
and confirm that we can clone without protocol restrictions,
and not with them. But we do not have a portable way of
providing an ftp server, nor any other protocol that curl
supports (https is the closest, but we would have to deal
with certificates).
[jk: added test and version warning]
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Tue, 22 Sep 2015 22:03:49 +0000 (18:03 -0400)]
transport: refactor protocol whitelist code
The current callers only want to die when their transport is
prohibited. But future callers want to query the mechanism
without dying.
Let's break out a few query functions, and also save the
results in a static list so we don't have to re-parse for
each query.
Based-on-a-patch-by: Blake Burkhart <bburky@bburky.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Wed, 16 Sep 2015 17:13:12 +0000 (13:13 -0400)]
submodule: allow only certain protocols for submodule fetches
Some protocols (like git-remote-ext) can execute arbitrary
code found in the URL. The URLs that submodules use may come
from arbitrary sources (e.g., .gitmodules files in a remote
repository). Let's restrict submodules to fetching from a
known-good subset of protocols.
Note that we apply this restriction to all submodule
commands, whether the URL comes from .gitmodules or not.
This is more restrictive than we need to be; for example, in
the tests we run:
git submodule add ext::...
which should be trusted, as the URL comes directly from the
command line provided by the user. But doing it this way is
simpler, and makes it much less likely that we would miss a
case. And since such protocols should be an exception
(especially because nobody who clones from them will be able
to update the submodules!), it's not likely to inconvenience
anyone in practice.
Reported-by: Blake Burkhart <bburky@bburky.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Wed, 16 Sep 2015 17:12:52 +0000 (13:12 -0400)]
transport: add a protocol-whitelist environment variable
If we are cloning an untrusted remote repository into a
sandbox, we may also want to fetch remote submodules in
order to get the complete view as intended by the other
side. However, that opens us up to attacks where a malicious
user gets us to clone something they would not otherwise
have access to (this is not necessarily a problem by itself,
but we may then act on the cloned contents in a way that
exposes them to the attacker).
Ideally such a setup would sandbox git entirely away from
high-value items, but this is not always practical or easy
to set up (e.g., OS network controls may block multiple
protocols, and we would want to enable some but not others).
We can help this case by providing a way to restrict
particular protocols. We use a whitelist in the environment.
This is more annoying to set up than a blacklist, but
defaults to safety if the set of protocols git supports
grows). If no whitelist is specified, we continue to default
to allowing all protocols (this is an "unsafe" default, but
since the minority of users will want this sandboxing
effect, it is the only sensible one).
A note on the tests: ideally these would all be in a single
test file, but the git-daemon and httpd test infrastructure
is an all-or-nothing proposition rather than a test-by-test
prerequisite. By putting them all together, we would be
unable to test the file-local code on machines without
apache.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 21 Sep 2015 20:26:13 +0000 (13:26 -0700)]
Git 2.6-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 21 Sep 2015 19:58:35 +0000 (12:58 -0700)]
Merge branch 'rj/mailmap-ramsay'
* rj/mailmap-ramsay:
mailmap: update my entry with new email address
Junio C Hamano [Mon, 21 Sep 2015 19:27:15 +0000 (12:27 -0700)]
Merge branch 'bn/send-email-smtp-auth-error-message-fix'
Fix a minor regression brought in to "git send-email" by a recent
addition of the "--smtp-auth" option.
* bn/send-email-smtp-auth-error-message-fix:
send-email: fix uninitialized var warning for $smtp_auth
Junio C Hamano [Mon, 21 Sep 2015 17:54:07 +0000 (10:54 -0700)]
Merge tag 'l10n-2.6.0-rnd2+de' of git://github.com/git-l10n/git-po
l10n-2.6.0-rnd2 plus de
* tag 'l10n-2.6.0-rnd2+de' of git://github.com/git-l10n/git-po: (25 commits)
l10n: de.po: better language for one string
l10n: de.po: translate 2 messages
l10n: Update and review Vietnamese translation (2440t)
l10n: fr.po v2.6.0 round 2 (2440t)
l10n: zh_CN: for git v2.6.0 l10n round 2
l10n: ca.po: update translation
l10n: git.pot: v2.6.0 round 2 (3 improvements)
l10n: de.po: translate 123 new messages
l10n: fr.po v2.6.0 round 1 (2441t)
l10n: sv.po: Update Swedish translation (2441t0f0u)
l10n: zh_CN: for git v2.6.0 l10n round 1
l10n: Updated Vietnamese translation (2441t)
l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)
l10n: zh_CN: Update Git Glossary: "commit message"
l10n: zh_CN: Update Git Glossary: pickaxe
l10n: zh_CN: Update Git Glossary: fork
l10n: zh_CN: Update Git Glossary: tag
l10n: zh_CN: Update Git Glossary: "dumb", "smart"
l10n: zh_CN: Update Git Glossary: SHA-1
l10n: zh_CN: Add Surrounding Spaces
...
Brian Norris [Fri, 18 Sep 2015 22:12:50 +0000 (15:12 -0700)]
send-email: fix uninitialized var warning for $smtp_auth
On the latest version of git-send-email, I see this error just before
running SMTP auth (I didn't provide any --smtp-auth= parameter):
Use of uninitialized value $smtp_auth in pattern match (m//) at \
/home/briannorris/git/git/git-send-email.perl line 1139.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Sat, 19 Sep 2015 07:47:50 +0000 (09:47 +0200)]
Documentation: explain optional arguments better
Improve the documentation of commands taking optional arguments in two
ways:
* Documents the behavior of '-O' (for grep) and '-S' (for commands
creating commits) when used without the optional argument.
* Document the syntax of these options.
For the second point, the behavior is documented in gitcli(7), but it is
easy for users to miss, and hard for the same user to understand why e.g.
"git status -u no" does not work.
Document this explicitly in the documentation of each short option having
an optional argument: they are the most error prone since there is no '='
sign between the option and its argument.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Sat, 19 Sep 2015 07:47:49 +0000 (09:47 +0200)]
Documentation/grep: fix documentation of -O
Since the argument of -O, --open-file-in-pager is optional, it must be
stuck to the command. Reflect this in the documentation.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Sat, 19 Sep 2015 07:47:48 +0000 (09:47 +0200)]
Documentation: use 'keyid' consistently, not 'key-id'
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Phillip Sz [Thu, 17 Sep 2015 15:50:32 +0000 (17:50 +0200)]
l10n: de.po: better language for one string
Just one string I think we could translate better.
Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Ralf Thielow [Wed, 16 Sep 2015 17:28:07 +0000 (19:28 +0200)]
l10n: de.po: translate 2 messages
Translate 2 messages came from git.pot update in
e447091
(l10n: git.pot: v2.6.0 round 2 (3 improvements)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>
Tran Ngoc Quan [Tue, 15 Sep 2015 00:17:53 +0000 (07:17 +0700)]
l10n: Update and review Vietnamese translation (2440t)
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jean-Noel Avila [Tue, 15 Sep 2015 18:22:52 +0000 (20:22 +0200)]
l10n: fr.po v2.6.0 round 2 (2440t)
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Jiang Xin [Tue, 15 Sep 2015 13:51:26 +0000 (21:51 +0800)]
l10n: zh_CN: for git v2.6.0 l10n round 2
Update 2 translations (2440t0f0u) for git v2.6.0-rc2.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Alex Henrie [Tue, 15 Sep 2015 03:05:50 +0000 (21:05 -0600)]
l10n: ca.po: update translation
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Jiang Xin [Mon, 14 Sep 2015 22:57:19 +0000 (06:57 +0800)]
l10n: git.pot: v2.6.0 round 2 (3 improvements)
Introduce three i18n improvements from the following commits:
* tag, update-ref: improve description of option "create-reflog"
* pull: don't mark values for option "rebase" for translation
* show-ref: place angle brackets around variables in usage string
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Mon, 14 Sep 2015 22:45:32 +0000 (06:45 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 123 new messages
l10n: fr.po v2.6.0 round 1 (2441t)
l10n: sv.po: Update Swedish translation (2441t0f0u)
l10n: zh_CN: for git v2.6.0 l10n round 1
l10n: Updated Vietnamese translation (2441t)
l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)
l10n: zh_CN: Update Git Glossary: "commit message"
l10n: zh_CN: Update Git Glossary: pickaxe
l10n: zh_CN: Update Git Glossary: fork
l10n: zh_CN: Update Git Glossary: tag
l10n: zh_CN: Update Git Glossary: "dumb", "smart"
l10n: zh_CN: Update Git Glossary: SHA-1
l10n: zh_CN: Add Surrounding Spaces
l10n: zh_CN: Add translations for Git glossary
l10n: TEAMS: stash inactive zh_CN team members
l10n: zh_CN: Update Translation of "tag"
l10n: zh_CN: Unify Translation of "packfile"
l10n: zh_CN: Update Translation: "tag object"
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Ralf Thielow [Tue, 8 Sep 2015 07:31:34 +0000 (09:31 +0200)]
l10n: de.po: translate 123 new messages
Translate 123 new messages came from git.pot update in
df0617b
(l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)).
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Phillip Sz <phillip.szelat@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
Jean-Noel Avila [Wed, 9 Sep 2015 20:55:10 +0000 (22:55 +0200)]
l10n: fr.po v2.6.0 round 1 (2441t)
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Junio C Hamano [Thu, 17 Sep 2015 19:32:58 +0000 (12:32 -0700)]
Update RelNotes to 2.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 17 Sep 2015 19:29:49 +0000 (12:29 -0700)]
Sync with 2.5.3
* maint:
Git 2.5.3
Junio C Hamano [Thu, 17 Sep 2015 19:29:03 +0000 (12:29 -0700)]
Merge branch 'po/doc-branch-desc'
The branch descriptions that are set with "git branch --edit-description"
option were used in many places but they weren't clearly documented.
* po/doc-branch-desc:
doc: show usage of branch description
Junio C Hamano [Thu, 17 Sep 2015 19:29:02 +0000 (12:29 -0700)]
Merge branch 'et/win32-poll-timeout'
* et/win32-poll-timeout:
poll: honor the timeout on Win32
Junio C Hamano [Thu, 17 Sep 2015 19:29:01 +0000 (12:29 -0700)]
Merge branch 'as/config-doc-markup-fix'
* as/config-doc-markup-fix:
Documentation/config: fix formatting for branch.*.rebase and pull.rebase
Junio C Hamano [Thu, 17 Sep 2015 19:16:10 +0000 (12:16 -0700)]
Git 2.5.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 17 Sep 2015 19:12:29 +0000 (12:12 -0700)]
Merge branch 'dt/untracked-subdir' into maint
The experimental untracked-cache feature were buggy when paths with
a few levels of subdirectories are involved.
* dt/untracked-subdir:
untracked cache: fix entry invalidation
untracked-cache: fix subdirectory handling
t7063: use --force-untracked-cache to speed up a bit
untracked-cache: support sparse checkout
Junio C Hamano [Thu, 17 Sep 2015 19:11:46 +0000 (12:11 -0700)]
Merge branch 'br/svn-doc-include-paths-config' into maint
* br/svn-doc-include-paths-config:
git-svn doc: mention "svn-remote.<name>.include-paths"
Junio C Hamano [Thu, 17 Sep 2015 19:11:06 +0000 (12:11 -0700)]
Merge branch 'ah/submodule-typofix-in-error' into maint
Error string fix.
* ah/submodule-typofix-in-error:
git-submodule: remove extraneous space from error message
Junio C Hamano [Thu, 17 Sep 2015 19:03:02 +0000 (12:03 -0700)]
Merge branch 'js/maint-am-skip-performance-regression' into maint
* js/maint-am-skip-performance-regression:
am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
Jeff King [Tue, 15 Sep 2015 10:05:39 +0000 (06:05 -0400)]
blame: handle --first-parent
The revision.c options-parser will parse "--first-parent"
for us, but the blame code does not actually respect it, as
we simply iterate over the whole list returned by
first_scapegoat(). We can fix this by returning a
truncated parent list.
Note that we could technically also do so by limiting the
return value of num_scapegoats(), but that is less robust.
We would rely on nobody ever looking at the "next" pointer
from the returned list.
Combining "--reverse" with "--first-parent" is more
complicated, and will probably involve cooperation from
revision.c. Since the desired semantics are not even clear,
let's punt on this for now, but explicitly disallow it to
avoid confusing users (this is not really a regression,
since it did something nonsensical before).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones [Tue, 1 Sep 2015 15:50:06 +0000 (16:50 +0100)]
mailmap: update my entry with new email address
My 'demon' email address is no longer functional since, after 16+
years with demon, I have had to change my ISP. :(
Also, take the opportunity to remove my middle name, which I only
use on official documents (or in the GECOS field when creating a
user account on unix).
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 14 Sep 2015 22:00:41 +0000 (15:00 -0700)]
Update RelNotes to 2.6 to describe leftover bits since -rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 14 Sep 2015 21:59:07 +0000 (14:59 -0700)]
Merge branch 'js/maint-am-skip-performance-regression'
Recent versions of scripted "git am" has a performance regression in
"git am --skip" codepath, which no longer exists in the built-in
version on the 'master' front. Fix the regression in the last
scripted version that appear in 2.5.x maintenance track and older.
* js/maint-am-skip-performance-regression:
am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
Junio C Hamano [Mon, 14 Sep 2015 21:59:06 +0000 (14:59 -0700)]
Merge branch 'ah/show-ref-usage-string'
Both "git show-ref -h" and "git show-ref --help" illustrated that the
"--exclude-existing" option makes the command read list of refs
from its standard input. Change only the "show-ref -h" output to
have a pair of "<>" around the placeholder that designate an input
file, i.e. "git show-ref --exclude-existing < <ref-list>".
* ah/show-ref-usage-string:
show-ref: place angle brackets around variables in usage string
Junio C Hamano [Mon, 14 Sep 2015 21:59:05 +0000 (14:59 -0700)]
Merge branch 'sg/help-group'
* sg/help-group:
Makefile: use SHELL_PATH when running generate-cmdlist.sh
Junio C Hamano [Mon, 14 Sep 2015 21:59:04 +0000 (14:59 -0700)]
Merge branch 'rt/help-strings-fix'
* rt/help-strings-fix:
tag, update-ref: improve description of option "create-reflog"
pull: don't mark values for option "rebase" for translation
Junio C Hamano [Mon, 14 Sep 2015 20:17:56 +0000 (13:17 -0700)]
Git 2.6-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Edward Thomson [Sat, 12 Sep 2015 17:50:26 +0000 (17:50 +0000)]
poll: honor the timeout on Win32
Ensure that when passing a pipe, the gnulib poll replacement will not
return 0 before the timeout has passed.
Not obeying the timeout (and merely returning 0) causes pathological
behavior when preparing a packfile for a repository and taking a
long time to do so. If poll were to return 0 immediately, this would
cause keep-alives to get sent as quickly as possible until the packfile
was created. Such deviance from the standard would cause megabytes (or
more) of keep-alive packets to be sent.
GetTickCount is used as it is efficient, stable and monotonically
increasing. (Neither GetSystemTime nor QueryPerformanceCounter have
all three of these properties.)
Signed-off-by: Edward Thomson <ethomson@microsoft.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philip Oakley [Mon, 14 Sep 2015 14:10:53 +0000 (15:10 +0100)]
doc: show usage of branch description
The branch description will be included in 'git format-patch
--cover-letter' and in 'git pull-request' emails. It can also
be used in the automatic merge message. Tell the reader.
While here, clarify that the description may be a multi-line
explanation of the purpose of the branch's patch series.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 14 Sep 2015 18:50:21 +0000 (11:50 -0700)]
Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
gitk: Accelerators for the main menu
gitk: Adjust the menu line numbers to compensate for the new entry
gitk: Add a "Copy commit summary" command
gitk: Update Bulgarian translation (307t)
gitk: Update .po files
gitk: Update Bulgarian translation (304t)
gitk: Use translated version of "Command line" in getcommitlines
gitk: Make it easier to go quickly to a specific commit
gitk: Show the current view's name in the window title
gitk: Add mouse right-click options to copy path and branch name
gitk: Remove mc parameter from proc show_error
gitk: Fix error when changing colors after closing "List references" window
gitk: Replace catch {unset foo} with unset -nocomplain foo
gitk: Rearrange window title to be more conventional
gitk: sv.po: Update Swedish translation (305t0f0u)
gitk: Fix bad English grammar "Matches none Commit Info"
Junio C Hamano [Mon, 14 Sep 2015 18:46:59 +0000 (11:46 -0700)]
Merge branch 'jk/pack-protocol-doc'
Streamline documentation of the pkt-line protocol.
* jk/pack-protocol-doc:
pack-protocol: clarify LF-handling in PKT-LINE()
Junio C Hamano [Mon, 14 Sep 2015 18:46:28 +0000 (11:46 -0700)]
Merge branch 'mp/t7060-diff-index-test'
Fix an old test that was doing the same thing as another one.
* mp/t7060-diff-index-test:
t7060: actually test "git diff-index --cached -M"
Junio C Hamano [Mon, 14 Sep 2015 18:44:43 +0000 (11:44 -0700)]
Merge branch 'gb/apply-comment-typofix'
* gb/apply-comment-typofix:
apply: comment grammar fix
Giuseppe Bilotta [Wed, 9 Sep 2015 13:20:53 +0000 (15:20 +0200)]
gitk: Accelerators for the main menu
This allows fast, keyboard-only usage of the menu (e.g. Alt+V, N to open a
new view).
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Beat Bolli [Mon, 7 Sep 2015 23:16:37 +0000 (01:16 +0200)]
gitk: Adjust the menu line numbers to compensate for the new entry
Commit
d835dbb9 ("gitk: Add a "Copy commit summary" command",
2015-08-13) in the upstream gitk repo added a new context menu entry.
Therefore, the line numbers of the entries below the new one need to be
adjusted when their text or state is changed.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Andreas Schwab [Sat, 12 Sep 2015 14:26:53 +0000 (16:26 +0200)]
Documentation/config: fix formatting for branch.*.rebase and pull.rebase
Don't format the second paragraph as a literal block.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Fri, 11 Sep 2015 16:04:13 +0000 (18:04 +0200)]
tag, update-ref: improve description of option "create-reflog"
The description of option "create-reflog" is "create_reflog", which
is neither a good description, nor a sensible string to translate.
Change it to a more meaningful message.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Fri, 11 Sep 2015 15:53:17 +0000 (17:53 +0200)]
pull: don't mark values for option "rebase" for translation
"false|true|preserve" are actual values for option "rebase"
of the "git-pull" command and should therefore not be marked
for translation.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alejandro R. Sedeño [Thu, 10 Sep 2015 23:37:07 +0000 (19:37 -0400)]
Makefile: use SHELL_PATH when running generate-cmdlist.sh
Non-POSIX shells, such as /bin/sh on SunOS, do not support $((...))
arithmetic expansion or $(...) command substitution needed by
generate-cmdlist.sh. Make sure that we use a POSIX compliant shell
$(SHELL_PATH) when running generate-cmdlist.sh.
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Acked-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 10 Sep 2015 21:27:21 +0000 (14:27 -0700)]
Makefile: allow $(ARFLAGS) specified from the command line
We can do this because we have a very simple needs and run "ar"
exactly the same way everywhere ;-).
Requested-by: Jeffrey Walton
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 10 Sep 2015 21:06:58 +0000 (14:06 -0700)]
Merge git://bogomips.org/git-svn
* git://bogomips.org/git-svn:
git-svn: parse authors file more leniently
Michael J Gruber [Thu, 10 Sep 2015 12:32:13 +0000 (14:32 +0200)]
git-svn: parse authors file more leniently
Currently, git-svn parses an authors file using the perl regex
/^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.+)>\s*$/
in order to extract svn user name, real name and e-mail.
This does not match an empty e-mail field like "<>". On the other hand,
the output of an authors-prog is parsed with the perl regex
/^\s*(.+?)\s*<(.*)>\s*$/
in order to extract real name and e-mail.
So, specifying a trivial file grep such as
grep "$1" /tmp/authors | head -n 1 | cut -d'=' -f2 | cut -c'2-'
as the authors prog gives different results compared to specifying
/tmp/authors as the authors file directly.
Instead, make git svn uses the perl regex
/^(.+?|\(no author\))\s*=\s*(.+?)\s*<(.*)>\s*$/
for parsing the authors file so that the same (slightly more lenient)
regex is used in both cases.
Reported-by: Till Schäfer <till2.schaefer@tu-dortmund.de>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Jiang Xin [Thu, 10 Sep 2015 15:14:16 +0000 (23:14 +0800)]
Merge branch 'master' of github.com:jiangxin/git
* 'master' of github.com:jiangxin/git:
l10n: zh_CN: for git v2.6.0 l10n round 1
l10n: zh_CN: Update Git Glossary: "commit message"
l10n: zh_CN: Update Git Glossary: pickaxe
l10n: zh_CN: Update Git Glossary: fork
l10n: zh_CN: Update Git Glossary: tag
l10n: zh_CN: Update Git Glossary: "dumb", "smart"
l10n: zh_CN: Update Git Glossary: SHA-1
l10n: zh_CN: Add Surrounding Spaces
l10n: zh_CN: Add translations for Git glossary
l10n: TEAMS: stash inactive zh_CN team members
l10n: zh_CN: Update Translation of "tag"
l10n: zh_CN: Unify Translation of "packfile"
l10n: zh_CN: Update Translation: "tag object"
Junio C Hamano [Wed, 9 Sep 2015 21:30:35 +0000 (14:30 -0700)]
Sync with 2.5.2
Johannes Schindelin [Wed, 9 Sep 2015 09:10:07 +0000 (09:10 +0000)]
am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
f8da6801 (am --skip: support skipping while on unborn branch,
2015-06-06) introduced a performance regression to "git am --skip",
where it used "read-tree" to reconstruct the index from scratch
without reusing the cached stat information.
This is a backport of the corresponding patch to the builtin am in 2.6:
3ecc704 (am --skip/--abort: merge HEAD/ORIG_HEAD tree into index,
2015-08-19).
Reportedly, it can make a huge difference on Windows, in one case a `git
rebase --skip` took 1m40s without, and 5s with, this patch.
cf. https://github.com/git-for-windows/git/issues/365
Reported-and-suggested-by: Kim Gybels <kgybels@infogroep.be>
Acked-by: Paul Tan <pyokagan@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Peter Krefting [Wed, 9 Sep 2015 20:46:35 +0000 (21:46 +0100)]
l10n: sv.po: Update Swedish translation (2441t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Junio C Hamano [Wed, 9 Sep 2015 17:34:35 +0000 (10:34 -0700)]
Release Notes: typofix
Thanks to Andreas Schwab for careful reading.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Giuseppe Bilotta [Wed, 9 Sep 2015 13:33:18 +0000 (15:33 +0200)]
apply: comment grammar fix
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 8 Sep 2015 22:38:43 +0000 (15:38 -0700)]
Git 2.6-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Tue, 8 Sep 2015 22:34:57 +0000 (15:34 -0700)]
Merge branch 'jc/builtin-am-signoff-regression-fix'
Recent "git am" had regression when adding a Signed-off-by line
with its "-s" option by an unintended tightening of how an existing
trailer block is detected.
* jc/builtin-am-signoff-regression-fix:
am: match --signoff to the original scripted version
Jeff King [Tue, 8 Sep 2015 08:33:14 +0000 (04:33 -0400)]
git_connect: clarify conn->use_shell flag
When executing user-specified programs, we generally always
want to use a shell, for flexibility and consistency. One
big exception is executing $GIT_SSH, which for historical
reasons must not use a shell.
Once upon a time the logic in git_connect looked like:
if (protocol == PROTO_SSH) {
... setup ssh ...
} else {
... setup local connection ...
conn->use_shell = 1;
}
But over time the PROTO_SSH block has grown, and the "local"
block has shrunk so that it contains only conn->use_shell;
it's easy to miss at the end of the large block. Moreover,
PROTO_SSH now also sometimes sets use_shell, when the new
GIT_SSH_COMMAND is used.
Let's just set conn->use_shell when we're setting up the "conn"
struct, and unset it (with a comment) in the historical GIT_SSH
case. This will make the flow easier to follow.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jiang Xin [Sun, 23 Aug 2015 07:23:21 +0000 (15:23 +0800)]
l10n: zh_CN: for git v2.6.0 l10n round 1
Update 123 translations (2441t0f0u) for git v2.6.0-rc0.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Ray Chen <oldsharp@gmail.com>
Junio C Hamano [Sun, 6 Sep 2015 02:56:20 +0000 (19:56 -0700)]
am: match --signoff to the original scripted version
Linus noticed that the recently reimplemented "git am -s" defines
the trailer block too rigidly, resulting in an unnecessary blank
line between the existing sign-offs and his new sign-off. An e-mail
submission sent to Linus in real life ends with mixture of sign-offs
and commentaries, e.g.
title here
message here
Signed-off-by: Original Author <original@auth.or>
[rv: tweaked frotz and nitfol]
Signed-off-by: Re Viewer <rv@ew.er>
Signed-off-by: Other Reviewer <other@rev.ewer>
---
patch here
Because the reimplementation reused append_signoff() helper that is
used by other codepaths, which is unaware that people intermix such
comments with their sign-offs in the trailer block, such a message
was judged to end with a non-trailer, resulting in an extra blank
line before adding a new sign-off.
The original scripted version of "git am" used a lot looser
definition, i.e. "if and only if there is no line that begins with
Signed-off-by:, add a blank line before adding a new sign-off". For
the upcoming release, stop using the append_signoff() in "git am"
and reimplement the looser definition used by the scripted version
to use only in "git am" to fix this regression in "am" while
avoiding new regressions to other users of append_signoff().
In the longer term, we should look into loosening append_signoff()
so that other codepaths that add a new sign-off behave the same way
as "git am -s", but that is a task for post-release.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tran Ngoc Quan [Mon, 7 Sep 2015 01:54:05 +0000 (08:54 +0700)]
l10n: Updated Vietnamese translation (2441t)
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
Jiang Xin [Sat, 5 Sep 2015 01:23:31 +0000 (09:23 +0800)]
Merge branch 'master' of github.com:jiangxin/git into master
* 'master' of github.com:jiangxin/git:
l10n: zh_CN: Update Git Glossary: "commit message"
l10n: zh_CN: Update Git Glossary: pickaxe
l10n: zh_CN: Update Git Glossary: fork
l10n: zh_CN: Update Git Glossary: tag
l10n: zh_CN: Update Git Glossary: "dumb", "smart"
l10n: zh_CN: Update Git Glossary: SHA-1
l10n: zh_CN: Add Surrounding Spaces
l10n: zh_CN: Add translations for Git glossary
l10n: TEAMS: stash inactive zh_CN team members
l10n: zh_CN: Update Translation of "tag"
l10n: zh_CN: Unify Translation of "packfile"
l10n: zh_CN: Update Translation: "tag object"
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jiang Xin [Sat, 5 Sep 2015 01:21:10 +0000 (09:21 +0800)]
l10n: git.pot: v2.6.0 round 1 (123 new, 41 removed)
Generate po/git.pot from
v2.6.0-rc0-24-gec371ff for git v2.6.0 l10n
round 1.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Jeff King [Fri, 4 Sep 2015 22:40:08 +0000 (18:40 -0400)]
git_connect: clear GIT_* environment for ssh
When we "switch" to another local repository to run the server
side of a fetch or push, we must clear the variables in
local_repo_env so that our local $GIT_DIR, etc, do not
pollute the upload-pack or receive-pack that is executing in
the "remote" repository.
We have never done so for ssh connections. For the most
part, nobody has noticed because ssh will not pass unknown
environment variables by default. However, it is not out of
the question for a user to configure ssh to pass along GIT_*
variables using SendEnv/AcceptEnv.
We can demonstrate the problem by using "git -c" on a local
command and seeing its impact on a remote repository. This
config ends up in $GIT_CONFIG_PARAMETERS. In the local case,
the config has no impact, but in the ssh transport, it does
(our test script has a fake ssh that passes through all
environment variables; this isn't normal, but does simulate
one possible setup).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 4 Sep 2015 21:34:57 +0000 (14:34 -0700)]
Sync with maint
* maint:
Junio C Hamano [Fri, 4 Sep 2015 17:46:00 +0000 (10:46 -0700)]
Git 2.5.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 4 Sep 2015 17:43:23 +0000 (10:43 -0700)]
Sync with 2.4.9
Junio C Hamano [Fri, 4 Sep 2015 17:36:00 +0000 (10:36 -0700)]
Git 2.4.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 4 Sep 2015 17:34:19 +0000 (10:34 -0700)]
Sync with 2.3.9
Junio C Hamano [Fri, 4 Sep 2015 17:31:34 +0000 (10:31 -0700)]
Git 2.3.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 4 Sep 2015 17:29:28 +0000 (10:29 -0700)]
Sync with 2.2.3
Junio C Hamano [Fri, 4 Sep 2015 17:25:47 +0000 (10:25 -0700)]
Git 2.2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>