Junio C Hamano [Wed, 24 Apr 2013 23:17:13 +0000 (16:17 -0700)]
Merge branch 'jk/diff-algo-finishing-touches' into maint
"git diff --diff-algorithm=algo" was understood by the command line
parser, but "git diff --diff-algorithm algo" was not.
* jk/diff-algo-finishing-touches:
diff: allow unstuck arguments with --diff-algorithm
git-merge(1): document diff-algorithm option to merge-recursive
Junio C Hamano [Wed, 24 Apr 2013 23:15:44 +0000 (16:15 -0700)]
Merge branch 'sr/log-SG-no-textconv' into maint
"git log -S/-G" started paying attention to textconv filter, but
there was no way to disable this. Make it honor --no-textconv
option.
* sr/log-SG-no-textconv:
diffcore-pickaxe: unify code for log -S/-G
diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
diffcore-pickaxe: port optimization from has_changes() to diff_grep()
diffcore-pickaxe: respect --no-textconv
diffcore-pickaxe: remove fill_one()
diffcore-pickaxe: remove unnecessary call to get_textconv()
Junio C Hamano [Wed, 24 Apr 2013 23:14:06 +0000 (16:14 -0700)]
Merge branch 'jc/merge-tag-object' into maint
"git merge $(git rev-parse v1.8.2)" behaved quite differently from
"git merge v1.8.2", as if v1.8.2 were written as v1.8.2^0 and did
not pay much attention to the annotated tag payload. Make the code
notice the type of the tag object, in addition to the dwim_ref()
based classification the current code uses (i.e. the name appears in
refs/tags/) to decide when to special case merging of tags.
* jc/merge-tag-object:
t6200: test message for merging of an annotated tag
t6200: use test_config/test_unconfig
merge: a random object may not necssarily be a commit
Mårten Kongstad [Wed, 24 Apr 2013 20:49:06 +0000 (22:49 +0200)]
completion: remove duplicate block for "git commit -c"
Remove one of two consecutive, identical blocks for "git commit -c".
This was caused by a mechanical mismerge at
d931e2fb252e (Merge
branch 'mp/complete-paths', 2013-02-08). The side branch wanted to
add this block at
fea16b47 but the same fix was done independently
at
685397585 already.
Signed-off-by: Mårten Kongstad <marten.kongstad@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kevin Bracey [Mon, 22 Apr 2013 15:57:37 +0000 (18:57 +0300)]
cherry-pick/revert: make usage say '<commit-ish>...'
The usage string for cherry-pick and revert has never been updated to
reflect their ability to handle multiple commits. Other documentation is
already correct.
Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 22 Apr 2013 18:32:58 +0000 (11:32 -0700)]
Start preparing for 1.8.2.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)]
Merge branch 'ta/glossary' into maint
* ta/glossary:
glossary: improve definitions of refspec and pathspec
The name of the hash function is "SHA-1", not "SHA1"
glossary: improve description of SHA-1 related topics
glossary: remove outdated/misleading/irrelevant entries
Junio C Hamano [Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)]
Merge branch 'jk/doc-http-backend' into maint
Improve documentation to illustrate "push authenticated, fetch
anonymous" configuration for smart HTTP servers.
* jk/doc-http-backend:
doc/http-backend: match query-string in apache half-auth example
doc/http-backend: give some lighttpd config examples
doc/http-backend: clarify "half-auth" repo configuration
Junio C Hamano [Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)]
Merge branch 'jk/test-trash' into maint
* jk/test-trash:
t/test-lib.sh: drop "$test" variable
t/test-lib.sh: fix TRASH_DIRECTORY handling
Junio C Hamano [Mon, 22 Apr 2013 18:26:58 +0000 (11:26 -0700)]
Merge branch 'jk/daemon-user-doc' into maint
* jk/daemon-user-doc:
doc: clarify that "git daemon --user=<user>" option does not export HOME=~user
Junio C Hamano [Mon, 22 Apr 2013 18:26:57 +0000 (11:26 -0700)]
Merge branch 'jc/detached-head-doc' into maint
* jc/detached-head-doc:
glossary: extend "detached HEAD" description
Conflicts:
Documentation/glossary-content.txt
Junio C Hamano [Mon, 22 Apr 2013 18:26:57 +0000 (11:26 -0700)]
Merge branch 'jk/show-branch-strbuf' into maint
* jk/show-branch-strbuf:
show-branch: use strbuf instead of static buffer
Junio C Hamano [Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)]
Merge branch 'js/rerere-forget-protect-against-NUL' into maint
* js/rerere-forget-protect-against-NUL:
rerere forget: do not segfault if not all stages are present
rerere forget: grok files containing NUL
Junio C Hamano [Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)]
Merge branch 'jc/apply-ws-fix-tab-in-indent' into maint
* jc/apply-ws-fix-tab-in-indent:
test: resurrect q_to_tab
apply --whitespace=fix: avoid running over the postimage buffer
Junio C Hamano [Mon, 22 Apr 2013 18:26:56 +0000 (11:26 -0700)]
Merge branch 'ap/combine-diff-ignore-whitespace' into maint
* ap/combine-diff-ignore-whitespace:
Allow combined diff to ignore white-spaces
Junio C Hamano [Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)]
Merge branch 'jk/suppress-clang-warning' into maint
* jk/suppress-clang-warning:
fix clang -Wtautological-compare with unsigned enum
Junio C Hamano [Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)]
Merge branch 'tr/perl-keep-stderr-open' into maint
* tr/perl-keep-stderr-open:
t9700: do not close STDERR
perl: redirect stderr to /dev/null instead of closing
Junio C Hamano [Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)]
Merge branch 'lf/bundle-with-tip-wo-message' into maint
* lf/bundle-with-tip-wo-message:
bundle: Accept prerequisites without commit messages
Junio C Hamano [Mon, 22 Apr 2013 18:26:55 +0000 (11:26 -0700)]
Merge branch 'jk/filter-branch-come-back-to-original' into maint
* jk/filter-branch-come-back-to-original:
filter-branch: return to original dir after filtering
Junio C Hamano [Mon, 22 Apr 2013 18:26:54 +0000 (11:26 -0700)]
Merge branch 'rr/prompt-revert-head' into maint
* rr/prompt-revert-head:
bash: teach __git_ps1 about REVERT_HEAD
Felipe Contreras [Thu, 18 Apr 2013 06:06:31 +0000 (01:06 -0500)]
remote-hg: fix commit messages
git fast-import expects an extra newline after the commit message data,
but we are adding it only on hg-git compat mode, which is why the
bidirectionality tests pass.
We should add it unconditionally.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
David Aguilar [Tue, 16 Apr 2013 20:33:25 +0000 (13:33 -0700)]
help.c: add a compatibility comment to cmd_version()
External projects have been known to parse the output of
"git version". Help prevent future authors from changing
its format by adding a comment to its implementation.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Ackermann [Mon, 15 Apr 2013 17:50:07 +0000 (19:50 +0200)]
glossary: improve definitions of refspec and pathspec
The exact definition of "refspec" can be found in git-fetch and
git-push manpages. So don't duplicate this here in the glossary.
Actually the definition of "pathspec" should be moved to a separate
file akin to the way it's done with "refspec". But this will only be
wortwhile when there's more to say about it. So for the time being
just improve the first sentence a little bit; fix the indentation of
the first paragraph after the bullet list and remove the one-item
list of magic signatures with its - for the user - unnecessary
introduction of "magic word 'top'".
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Ackermann [Mon, 15 Apr 2013 17:49:04 +0000 (19:49 +0200)]
The name of the hash function is "SHA-1", not "SHA1"
Use "SHA-1" instead of "SHA1" whenever we talk about the hash function.
When used as a programming symbol, we keep "SHA1".
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Ackermann [Mon, 15 Apr 2013 17:47:50 +0000 (19:47 +0200)]
glossary: improve description of SHA-1 related topics
The name of the hash function is "SHA-1", not "SHA1".
Also to people who look up "object name" in the glossary,
the details of which hash function is applied on what to
compute "object name" is not important but the fact that the
name is meant to be an unique identifier for the contents
stored in the object is.
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Ackermann [Mon, 15 Apr 2013 17:46:56 +0000 (19:46 +0200)]
glossary: remove outdated/misleading/irrelevant entries
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sun, 14 Apr 2013 19:38:21 +0000 (15:38 -0400)]
t/test-lib.sh: drop "$test" variable
The $test variable is used as an interim buffer for
constructing $TRASH_DIRECTORY, and is almost compatible with
it (the exception being that $test has not been converted to
an absolute path). Let's get rid of it entirely so that
later code does not accidentally use it, thinking the two
are interchangeable.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Sun, 14 Apr 2013 16:34:56 +0000 (17:34 +0100)]
t/test-lib.sh: fix TRASH_DIRECTORY handling
After the location of $TRASH_DIRECTORY is adjusted by
$TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the
trash directory and cd into it. This means that when
$TEST_OUTPUT_DIRECTORY is not "." and an absolute --root has not been
specified, we do not remove the trash directory once the tests are
complete (remove_trash is set to $TRASH_DIRECTORY).
Fix this by always referring to the trash directory as $TRASH_DIRECTORY.
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Jeff King <peff@peff.net>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Sat, 13 Apr 2013 03:33:36 +0000 (23:33 -0400)]
doc/http-backend: match query-string in apache half-auth example
When setting up a "half-auth" repository in which reads can
be done anonymously but writes require authentication, it is
best if the server can require authentication for both the
ref advertisement and the actual receive-pack POSTs. This
alleviates the need for the admin to set http.receivepack in
the repositories, and means that the client is challenged
for credentials immediately, instead of partway through the
push process (and git clients older than v1.7.11.7 had
trouble handling these challenges).
Since detecting a push during the ref advertisement requires
matching the query string, and this is non-trivial to do in
Apache, we have traditionally punted and instructed users to
just protect "/git-receive-pack$". This patch provides the
mod_rewrite recipe to actually match the ref advertisement,
which is preferred.
While we're at it, let's add the recipe to our test scripts
so that we can be sure that it works, and doesn't get broken
(either by our changes or by changes in Apache).
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 12 Apr 2013 20:41:48 +0000 (13:41 -0700)]
Merge branch 'rr/test-3200-style' into maint
* rr/test-3200-style:
t3200 (branch): modernize style
Conflicts:
t/t3200-branch.sh
Junio C Hamano [Fri, 12 Apr 2013 20:41:48 +0000 (13:41 -0700)]
Merge branch 'mg/texinfo-5' into maint
* mg/texinfo-5:
Documentation: Strip texinfo anchors to avoid duplicates
Junio C Hamano [Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)]
Merge branch 'jk/diffcore-break-divzero' into maint
* jk/diffcore-break-divzero:
diffcore-break: don't divide by zero
Junio C Hamano [Fri, 12 Apr 2013 20:41:47 +0000 (13:41 -0700)]
Merge branch 'cn/commit-amend-doc' into maint
* cn/commit-amend-doc:
Documentation/git-commit: reword the --amend explanation
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)]
Merge branch 'jk/bisect-prn-unsigned' into maint
* jk/bisect-prn-unsigned:
bisect: avoid signed integer overflow
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)]
Merge branch 'jk/no-more-self-assignment' into maint
* jk/no-more-self-assignment:
match-trees: simplify score_trees() using tree_entry()
submodule: clarify logic in show_submodule_summary
Junio C Hamano [Fri, 12 Apr 2013 20:41:46 +0000 (13:41 -0700)]
Merge branch 'rr/send-email-perl-critique' into maint
* rr/send-email-perl-critique:
send-email: use the three-arg form of open in recipients_cmd
send-email: drop misleading function prototype
send-email: use "return;" not "return undef;" on error codepaths
Junio C Hamano [Fri, 12 Apr 2013 20:41:45 +0000 (13:41 -0700)]
Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into maint
* jc/t5516-pushInsteadOf-vs-pushURL:
t5516: test interaction between pushURL and pushInsteadOf correctly
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
Correct common spelling mistakes in comments and tests
Most of these were found using Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
kwset: fix spelling in comments
Correct spelling mistakes noticed using Lucas De Marchi's codespell
tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
precompose-utf8: fix spelling of "want" in error message
Noticed using Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
compat/nedmalloc: fix spelling in comments
Correct some typos found using Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
compat/regex: fix spelling and grammar in comments
Some of these were found using Lucas De Marchi's codespell tool.
Others noticed by Eric Sunshine.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
obstack: fix spelling of similar
Noticed using Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
contrib/subtree: fix spelling of accidentally
Noticed with Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
git-remote-mediawiki: spelling fixes
Most of these were found using Lucas De Marchi's codespell tool.
Others were pointed out by Eric Sunshine.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini [Thu, 11 Apr 2013 22:36:10 +0000 (00:36 +0200)]
doc: various spelling fixes
Most of these were found using Lucas De Marchi's codespell tool.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 12 Apr 2013 18:48:38 +0000 (11:48 -0700)]
Merge branch 'maint-1.8.1' into maint
* maint-1.8.1:
fast-export: fix argument name in error messages
Documentation: distinguish between ref and offset deltas in pack-format
Junio C Hamano [Fri, 12 Apr 2013 16:08:31 +0000 (09:08 -0700)]
doc: clarify that "git daemon --user=<user>" option does not export HOME=~user
The fact that we don't set $HOME may confuse admins who expect
~<user>/.gitconfig to be used, because that is not what we try to
read. And worse, since
96b9e0e3, a git-daemon started by root is
likely to fail to run at all, as the user we switch to generally
cannot read ~root.
Signed-off-by: Jeff King <peff@peff.net>
Helped-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Paul Price [Fri, 12 Apr 2013 14:05:55 +0000 (10:05 -0400)]
fast-export: fix argument name in error messages
The --signed-tags argument is plural, while error messages referred
to --signed-tag (singular). Tweak error messages to correspond to the
argument.
Signed-off-by: Paul Price <price@astro.princeton.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Saasen [Fri, 12 Apr 2013 05:56:24 +0000 (15:56 +1000)]
Documentation: distinguish between ref and offset deltas in pack-format
eb32d236 introduced the OBJ_OFS_DELTA object that uses a relative offset to
identify the base object instead of the 20-byte SHA1 reference. The pack file
documentation only mentions the SHA1 based reference in its description of the
deltified object entry.
Update the pack format documentation to clarify that the deltified object
representation refers to its base using either a relative negative offset or
the absolute SHA1 identifier.
Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 12 Apr 2013 15:12:47 +0000 (08:12 -0700)]
Merge branch 'tb/document-status-u-tradeoff' into maint
* tb/document-status-u-tradeoff:
i18n: make the translation of -u advice in one go
Jiang Xin [Fri, 12 Apr 2013 03:53:01 +0000 (11:53 +0800)]
i18n: make the translation of -u advice in one go
The advice (consider use of -u when read_directory takes too long) is
separated into 3 different status_printf_ln() calls, and which brings
trouble for translators.
Since status_vprintf() called by status_printf_ln() can handle eol in
buffer, we could simply join these lines into one paragraph.
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Benoit Bourbie [Sat, 13 Apr 2013 16:47:21 +0000 (10:47 -0600)]
Typo fix: replacing it's -> its
Signed-off-by: Benoit Bourbie <benoit.bourbie@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Adam Spiers [Thu, 11 Apr 2013 02:07:04 +0000 (03:07 +0100)]
t: make PIPE a standard test prerequisite
The 'PIPE' test prerequisite was already defined identically by t9010
and t9300, therefore it makes sense to make it a predefined
prerequisite.
Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe [Wed, 10 Apr 2013 17:49:57 +0000 (19:49 +0200)]
archive: clarify explanation of --worktree-attributes
Make it a bit clearer that --worktree-attributes is about files in the
working tree (checked out files, possibly changed) and not the current
working directory ($PWD). Link to the ATTRIBUTES section, which has
more details.
Reported-by: Amit Bakshi <ambakshi@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 11 Apr 2013 03:36:13 +0000 (23:36 -0400)]
doc/http-backend: give some lighttpd config examples
The examples in the documentation are all for Apache. Let's
at least cover the basics: an anonymous server, an
authenticated server, and a "half auth" server with
anonymous read and authenticated write.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Thu, 11 Apr 2013 03:32:11 +0000 (23:32 -0400)]
doc/http-backend: clarify "half-auth" repo configuration
When the http-backend is set up to allow anonymous read but
authenticated write, the http-backend manual suggests
catching only the "/git-receive-pack" POST of the packfile,
not the initial "info/refs?service=git-receive-pack" GET in
which we advertise refs.
This does work and is secure, as we do not allow any write
during the info/refs request, and the information in the ref
advertisement is the same that you would get from a fetch.
However, the configuration required by the server is
slightly more complex. The default `http.receivepack`
setting is to allow pushes if the webserver tells us that
the user authenticated, and otherwise to return a 403
("Forbidden"). That works fine if authentication is turned
on completely; the initial request requires authentication,
and http-backend realizes it is OK to do a push.
But for this "half-auth" state, no authentication has
occurred during the initial ref advertisement. The
http-backend CGI therefore does not think that pushing
should be enabled, and responds with a 403. The client
cannot continue, even though the server would have allowed
it to run if it had provided credentials.
It would be much better if the server responded with a 401,
asking for credentials during the initial contact. But
git-http-backend does not know about the server's auth
configuration (so a 401 would be confusing in the case of a
true anonymous server). Unfortunately, configuring Apache to
recognize the query string and apply the auth appropriately
to receive-pack (but not upload-pack) initial requests is
non-trivial.
The site admin can work around this by just turning on
http.receivepack explicitly in its repositories. Let's
document this workaround.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Simon Ruderich [Tue, 9 Apr 2013 21:48:36 +0000 (23:48 +0200)]
t/README: --immediate skips cleanup commands for failed tests
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 7 Apr 2013 22:27:23 +0000 (15:27 -0700)]
Git 1.8.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Lukas Fleischer [Sun, 7 Apr 2013 11:53:15 +0000 (13:53 +0200)]
bundle: Accept prerequisites without commit messages
While explicitly stating that the commit message in a prerequisite
line is optional, we required all lines with 40 or more characters
to contain a space after the object name, bailing out if a line
consisted of an object name only. This was to allow bundling a
history to a commit without an message, but the code forgot that it
already called rtrim() to remove that whitespace.
As a workaround, only check for SP when the line has more than 40
characters.
Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 7 Apr 2013 16:10:11 +0000 (09:10 -0700)]
Sync with 1.8.1.6
Junio C Hamano [Sun, 7 Apr 2013 15:58:30 +0000 (08:58 -0700)]
Git 1.8.1.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 7 Apr 2013 15:45:03 +0000 (08:45 -0700)]
Merge branch 'jc/directory-attrs-regression-fix' into maint-1.8.1
A pattern "dir" (without trailing slash) in the attributes file
stopped matching a directory "dir" by mistake with an earlier change
that wanted to allow pattern "dir/" to also match.
* jc/directory-attrs-regression-fix:
t: check that a pattern without trailing slash matches a directory
dir.c::match_pathname(): pay attention to the length of string parameters
dir.c::match_pathname(): adjust patternlen when shifting pattern
dir.c::match_basename(): pay attention to the length of string parameters
attr.c::path_matches(): special case paths that end with a slash
attr.c::path_matches(): the basename is part of the pathname
Torsten Bögershausen [Sun, 7 Apr 2013 08:48:30 +0000 (10:48 +0200)]
remote-helpers/test-bzr.sh: do not use "grep '\s'"
Using grep "devel\s\+3:" to find at least one whitspace is not
portable on all grep versions; not all grep versions understand "\s"
as a "whitespace".
Use a literal TAB followed by SPACE.
The + as a qualifier for "one or more" is not a basic regular
expression; use egrep instead of grep.
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 5 Apr 2013 21:15:50 +0000 (17:15 -0400)]
show-branch: use strbuf instead of static buffer
When we generate relative names (e.g., "master~20^2"), we
format the name into a static buffer, then xstrdup the
result to attach it to the commit. Since the first thing we
add into the static buffer is the already-computed name of
the child commit, the names may get longer and longer as
the traversal gets deeper, and we may eventually overflow
the fixed-size buffer.
Fix this by converting the fixed-size buffer into a dynamic
strbuf. The performance implications should be minimal, as
we end up allocating a heap copy of the name anyway (and now
we can just detach the heap copy from the strbuf).
Reported-by: Eric Roman <eroman@chromium.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Fri, 5 Apr 2013 12:19:14 +0000 (13:19 +0100)]
diff: allow unstuck arguments with --diff-algorithm
The argument to --diff-algorithm is mandatory, so there is no reason to
require the argument to be stuck to the option with '='. Change this
for consistency with other Git commands.
Note that this does not change the handling of diff-algorithm in
merge-recursive.c since the primary interface to that is via the -X
option to 'git merge' where the unstuck form does not make sense.
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Fri, 5 Apr 2013 11:37:30 +0000 (12:37 +0100)]
git-merge(1): document diff-algorithm option to merge-recursive
Commit
07924d4 (diff: Introduce --diff-algorithm command line option
2013-01-16) added diff-algorithm as a parameter to the recursive merge
strategy but did not document it. Do so.
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 5 Apr 2013 15:19:41 +0000 (08:19 -0700)]
glossary: extend "detached HEAD" description
When we introduced the concept of "detached HEAD", we made sure that
commands that operate on the history of the current branch "just
work" in that state. They update the HEAD to point at the new
history without affecting any branch when the HEAD is detached, just
like they update the tip of the "current branch" to point at the new
history when HEAD points at a specific branch.
As this is done as the natural extension for these commands, we did
not, we still do not, and we do not want to repeat "A detached HEAD
is updated without affecting any branch" when describing what each
and every one of these commands that operates "on the current branch"
does.
Add a blanket description to the glossary to cover them instead.
The general principle is that operations to update the branch work
on and affect the HEAD, while operations to update the information
about a branch do not.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 5 Apr 2013 05:28:10 +0000 (01:28 -0400)]
diffcore-pickaxe: unify code for log -S/-G
The logic flow of has_changes() used for "log -S" and diff_grep()
used for "log -G" are essentially the same. See if we have both
sides that could be different in any interesting way, slurp the
contents in core, possibly after applying textconv, inspect the
contents, clean-up and report the result. The only difference
between the two is how "inspect" step works.
Unify this codeflow in a helper, pickaxe_match(), which takes a
callback function that implements the specific "inspect" step.
After removing the common scaffolding code from the existing
has_changes() and diff_grep(), they each becomes such a callback
function suitable for passing to pickaxe_match().
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 5 Apr 2013 04:03:21 +0000 (21:03 -0700)]
diffcore-pickaxe: fix leaks in "log -S<block>" and "log -G<pattern>"
The diff_grep() and has_changes() functions had early return
codepaths for unmerged filepairs, which simply returned 0. When we
taught textconv filter to them, one was ignored and continued to
return early without freeing the result filtered by textconv, and
the other had a failed attempt to fix, which allowed the planned
return value 0 to be overwritten by a bogus call to contains().
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 5 Apr 2013 03:40:31 +0000 (20:40 -0700)]
diffcore-pickaxe: port optimization from has_changes() to diff_grep()
These two functions are called in the same codeflow to implement
"log -S<block>" and "log -G<pattern>", respectively, but the latter
lacked two obvious optimizations the former implemented, namely:
- When a pickaxe limit is not given at all, they should return
without wasting any cycle;
- When both sides of the filepair are the same, and the same
textconv conversion apply to them, return early, as there will be
no interesting differences between the two anyway.
Also release the filespec data once the processing is done (this is
not about leaking memory--it is about releasing data we finished
looking at as early as possible).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Simon Ruderich [Fri, 5 Apr 2013 13:16:30 +0000 (15:16 +0200)]
diffcore-pickaxe: respect --no-textconv
git log -S doesn't respect --no-textconv:
$ echo '*.txt diff=wrong' > .gitattributes
$ git -c diff.wrong.textconv='xxx' log --no-textconv -Sfoo
error: cannot run xxx: No such file or directory
fatal: unable to read files to diff
Reported-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlos Martín Nieto [Wed, 3 Apr 2013 13:07:21 +0000 (15:07 +0200)]
Documentation/git-commit: reword the --amend explanation
The explanation for 'git commit --amend' talks about preparing a tree
object, which shouldn't be how user-facing documentation talks about
commit.
Reword it to say it works as usual, but replaces the current commit.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King [Fri, 5 Apr 2013 00:08:47 +0000 (20:08 -0400)]
diffcore-pickaxe: remove fill_one()
fill_one is _almost_ identical to just calling fill_textconv; the
exception is that for the !DIFF_FILE_VALID case, fill_textconv gives us
an empty buffer rather than a NULL one. Since we currently use the NULL
pointer as a signal that the file is not present on one side of the
diff, we must now switch to using DIFF_FILE_VALID to make the same
check.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Simon Ruderich [Thu, 4 Apr 2013 20:20:29 +0000 (22:20 +0200)]
diffcore-pickaxe: remove unnecessary call to get_textconv()
The fill_one() function is responsible for finding and filling the
textconv filter as necessary, and is called by diff_grep() function
that implements "git log -G<pattern>".
The has_changes() function that implements "git log -S<block>" calls
get_textconv() for two sides being compared, before it checks to see
if it was asked to perform the pickaxe limiting. Move the code
around to avoid this wastage.
After has_changes() calls get_textconv() to obtain textconv for both
sides, fill_one() is called to use them.
By adding get_textconv() to diff_grep() and relieving fill_one() of
responsibility to find the textconv filter, we can avoid calling
get_textconv() twice in has_changes().
With this change it's also no longer necessary for fill_one() to
modify the textconv argument, therefore pass a pointer instead of a
pointer to a pointer.
Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Thu, 4 Apr 2013 20:41:42 +0000 (22:41 +0200)]
t9700: do not close STDERR
Much like the previous patch, this triggered an unrelated bug.
Closing STDERR is not worth it anyway, as we risk writing die() and
such to random files that happen to be subsequently opened on FD 2.
Don't do it.
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast [Thu, 4 Apr 2013 20:41:41 +0000 (22:41 +0200)]
perl: redirect stderr to /dev/null instead of closing
On my system, t9100.1 triggers the following warning:
==352== Syscall param write(buf) points to uninitialised byte(s)
==352== at 0x57119C0: __write_nocancel (in /lib64/libc-2.17.so)
==352== by 0x56AC1D2: _IO_file_write@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AC0B1: new_do_write (in /lib64/libc-2.17.so)
==352== by 0x56AD3B4: _IO_do_write@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AD6FE: _IO_file_overflow@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x56AE3D8: _IO_default_xsputn (in /lib64/libc-2.17.so)
==352== by 0x56ACAA2: _IO_file_xsputn@@GLIBC_2.2.5 (in /lib64/libc-2.17.so)
==352== by 0x5682133: buffered_vfprintf (in /lib64/libc-2.17.so)
==352== by 0x567CE9D: vfprintf (in /lib64/libc-2.17.so)
==352== by 0x5687096: fprintf (in /lib64/libc-2.17.so)
==352== by 0x4E7AC5: vreportf (usage.c:15)
==352== by 0x4E7B14: die_builtin (usage.c:38)
The actual complaint appears to be a bug in the underlying
implementation. What's interesting here is that it is apparently
_triggered_ by closing stderr, which results in (from strace)
write(2, "fatal: Needed a single revision\n", 32) = -1 EBADF (Bad file descriptor)
write(2, "\0", 1) = -1 EBADF (Bad file descriptor)
Closing stderr is a bad idea anyway: there is a very real chance that
we print fatal error messages to some other file that just happens to
be opened on the now-free FD 2. So let's not do that.
As pointed out by Eric Wong (thanks), the initial close needs to go:
die() would again write nowhere if we close STDERR beforehand.
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 4 Apr 2013 20:03:34 +0000 (13:03 -0700)]
mailmap: update Pasky's address
Eric Wong noticed that the address at suse.cz no longer works.
We may want to update in-code addresses as well, but let's do
this first in 'maint'.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Thu, 4 Apr 2013 20:00:41 +0000 (13:00 -0700)]
Merge branch 'nd/index-pack-threaded-fixes' into maint
* nd/index-pack-threaded-fixes:
index-pack: guard nr_resolved_deltas reads by lock
index-pack: protect deepest_delta in multithread code
Junio C Hamano [Thu, 4 Apr 2013 20:00:37 +0000 (13:00 -0700)]
Merge branch 'jk/index-pack-correct-depth-fix' into maint
* jk/index-pack-correct-depth-fix:
index-pack: always zero-initialize object_entry list
Junio C Hamano [Thu, 4 Apr 2013 20:00:35 +0000 (13:00 -0700)]
Merge branch 'rs/submodule-summary-limit' into maint
"submodule summary --summary-limit" option did not support
"--option=value" form.
* rs/submodule-summary-limit:
submodule summary: support --summary-limit=<n>
Junio C Hamano [Thu, 4 Apr 2013 19:59:55 +0000 (12:59 -0700)]
Merge branch 'jk/peel-ref' into maint
* jk/peel-ref:
upload-pack: load non-tip "want" objects from disk
upload-pack: make sure "want" objects are parsed
upload-pack: drop lookup-before-parse optimization
Johannes Sixt [Thu, 4 Apr 2013 18:41:43 +0000 (20:41 +0200)]
rerere forget: do not segfault if not all stages are present
The loop that fills in the buffers that are later passed to the merge
driver exits early when not all stages of a path are present in the index.
But since the buffer pointers are not initialized in advance, the
subsequent accesses are undefined.
Initialize buffer pointers in advance to avoid undefined behavior later.
That is not sufficient, though, to get correct operation of handle_cache().
The function replays a conflicted merge to extract the part inside the
conflict markers. As written, the loop exits early when a stage is missing.
Consequently, the buffers for later stages that would be present in the
index are not filled in and the merge is replayed with incomplete data.
Fix it by investigating all stages of the given path.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Matthieu Moy [Thu, 4 Apr 2013 07:56:03 +0000 (09:56 +0200)]
git-remote-mediawiki: new wiki URL in documentation
The Bibzball wiki is not maintained anymore.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin von Gagern [Wed, 3 Apr 2013 19:54:33 +0000 (21:54 +0200)]
Documentation: Strip texinfo anchors to avoid duplicates
This keeps texinfo 5.x happy. See https://bugs.gentoo.org/464210.
Signed-off-by: Martin von Gagern <Martin.vGagern@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Wed, 3 Apr 2013 19:17:55 +0000 (20:17 +0100)]
bisect: avoid signed integer overflow
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Keeping [Wed, 3 Apr 2013 19:24:05 +0000 (20:24 +0100)]
diffcore-break: don't divide by zero
When the source file is empty, the calculation of the merge score
results in a division by zero. In the situation:
== preimage == == postimage ==
F (empty file) F (a large file)
E (a new empty file)
it does not make sense to consider F->E as a rename, so it is better not
to break the pre- and post-image of F.
Bail out early in this case to avoid hitting the divide-by-zero. This
causes the merge score to be left at zero.
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Apr 2013 16:29:14 +0000 (09:29 -0700)]
Update draft release notes to 1.8.2.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Apr 2013 16:26:27 +0000 (09:26 -0700)]
Merge branch 'mg/gpg-interface-using-status' into maint
Verification of signed tags were not done correctly when not in C
or en/US locale.
* mg/gpg-interface-using-status:
pretty: make %GK output the signing key for signed commits
pretty: parse the gpg status lines rather than the output
gpg_interface: allow to request status return
log-tree: rely upon the check in the gpg_interface
gpg-interface: check good signature in a reliable way
Junio C Hamano [Wed, 3 Apr 2013 16:26:07 +0000 (09:26 -0700)]
Merge branch 'bc/commit-complete-lines-given-via-m-option' into maint
'git commit -m "$msg"' used to add an extra newline even when
$msg already ended with one.
* bc/commit-complete-lines-given-via-m-option:
Documentation/git-commit.txt: rework the --cleanup section
git-commit: only append a newline to -m mesg if necessary
t7502: demonstrate breakage with a commit message with trailing newlines
t/t7502: compare entire commit message with what was expected
Junio C Hamano [Wed, 3 Apr 2013 16:25:52 +0000 (09:25 -0700)]
Merge branch 'jc/describe' into maint
The "--match=<pattern>" option of "git describe", when used with
"--all" to allow refs that are not annotated tags to be used as a
base of description, did not restrict the output from the command to
those that match the given pattern.
* jc/describe:
describe: --match=<pattern> must limit the refs even when used with --all
Junio C Hamano [Wed, 3 Apr 2013 16:25:41 +0000 (09:25 -0700)]
Merge branch 'jk/alias-in-bare' into maint
An aliased command spawned from a bare repository that does not say
it is bare with "core.bare = yes" is treated as non-bare by mistake.
* jk/alias-in-bare:
setup: suppress implicit "." work-tree for bare repos
environment: add GIT_PREFIX to local_repo_env
cache.h: drop LOCAL_REPO_ENV_SIZE
Junio C Hamano [Wed, 3 Apr 2013 16:25:29 +0000 (09:25 -0700)]
Merge branch 'ks/rfc2047-one-char-at-a-time' into maint
When "format-patch" quoted a non-ascii strings on the header files,
it incorrectly applied rfc2047 and chopped a single character in the
middle of it.
* ks/rfc2047-one-char-at-a-time:
format-patch: RFC 2047 says multi-octet character may not be split
Junio C Hamano [Wed, 3 Apr 2013 16:25:15 +0000 (09:25 -0700)]
Merge branch 'jk/empty-archive' into maint
"git archive" reports a failure when asked to create an archive out
of an empty tree. It would be more intuitive to give an empty
archive back in such a case.
* jk/empty-archive:
archive: handle commits with an empty tree
test-lib: factor out $GIT_UNZIP setup
Junio C Hamano [Wed, 3 Apr 2013 16:24:51 +0000 (09:24 -0700)]
Merge branch 'ph/tag-force-no-warn-on-creation' into maint
"git tag -f <tag>" always said "Updated tag '<tag>'" even when
creating a new tag (i.e. not overwriting nor updating).
* ph/tag-force-no-warn-on-creation:
tag: --force does not have to warn when creating tags
Junio C Hamano [Wed, 3 Apr 2013 16:24:18 +0000 (09:24 -0700)]
Merge branch 'lf/setup-prefix-pathspec' into maint
"git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
instead the parser kept reading beyond the end of the string.
* lf/setup-prefix-pathspec:
setup.c: check that the pathspec magic ends with ")"
setup.c: stop prefix_pathspec() from looping past the end of string
Junio C Hamano [Wed, 3 Apr 2013 16:18:01 +0000 (09:18 -0700)]
Sync with 1.8.1 maintenance track
* maint-1.8.1:
Start preparing for 1.8.1.6
git-tag(1): we tag HEAD by default
Fix revision walk for commits with the same dates
t2003: work around path mangling issue on Windows
pack-refs: add fully-peeled trait
pack-refs: write peeled entry for non-tags
use parse_object_or_die instead of die("bad object")
avoid segfaults on parse_object failure
entry: fix filter lookup
t2003: modernize style
name-hash.c: fix endless loop with core.ignorecase=true
Junio C Hamano [Wed, 3 Apr 2013 16:12:11 +0000 (09:12 -0700)]
Start preparing for 1.8.1.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 3 Apr 2013 15:44:54 +0000 (08:44 -0700)]
Merge branch 'kb/name-hash' into maint-1.8.1
* kb/name-hash:
name-hash.c: fix endless loop with core.ignorecase=true
Junio C Hamano [Wed, 3 Apr 2013 15:44:02 +0000 (08:44 -0700)]
Merge branch 'kk/revwalk-slop-too-many-commit-within-a-second' into maint-1.8.1
* kk/revwalk-slop-too-many-commit-within-a-second:
Fix revision walk for commits with the same dates