gitweb.git
git-sh-setup: refactor ident-parsing functionsJeff King Thu, 18 Oct 2012 07:25:22 +0000 (03:25 -0400)

git-sh-setup: refactor ident-parsing functions

The only ident-parsing function we currently provide is
get_author_ident_from_commit. This is not very
flexible for two reasons:

1. It takes a commit as an argument, and can't read from
commit headers saved on disk.

2. It will only parse authors, not committers.

This patch provides a more flexible interface which will
parse multiple idents from a commit provide on stdin. We can
easily use it as a building block for the current function
to retain compatibility.

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

status: add --long output format optionJeff King Thu, 18 Oct 2012 14:15:50 +0000 (21:15 +0700)

status: add --long output format option

You can currently set the output format to --short or
--porcelain. There is no --long, because we default to it
already. However, you may want to override an alias that
uses "--short" to get back to the default.

This requires a little bit of refactoring, because currently
we use STATUS_FORMAT_LONG internally to mean the same as
"the user did not specify anything". By expanding the enum
to include STATUS_FORMAT_NONE, we can distinguish between
the implicit and explicit cases. This effects these
conditions:

1. The user has asked for NUL termination. With NONE, we
currently default to turning on the porcelain mode.
With an explicit --long, we would in theory use NUL
termination with the long mode, but it does not support
it. So we can just complain and die.

2. When an output format is given to "git commit", we
default to "--dry-run". This behavior would now kick in
when "--long" is given, too.

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

branch: show targets of deleted symrefs, not sha1sRené Scharfe Thu, 18 Oct 2012 12:08:03 +0000 (14:08 +0200)

branch: show targets of deleted symrefs, not sha1s

git branch reports the abbreviated hash of the head commit of
a deleted branch to make it easier for a user to undo the
operation. For symref branches this doesn't help. Print the
symref target instead for them.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: skip commit checks when deleting symref branchesRené Scharfe Thu, 18 Oct 2012 12:07:11 +0000 (14:07 +0200)

branch: skip commit checks when deleting symref branches

Before a branch is deleted, we check that it points to a valid
commit. With -d we also check that the commit is a merged; this
check is not done with -D.

The reason for that is that commits pointed to by branches should
never go missing; if they do then something broke and it's better
to stop instead of adding to the mess. And a non-merged commit
may contain changes that are worth preserving, so we require the
stronger option -D instead of -d to get rid of them.

If a branch consists of a symref, these concerns don't apply.
Deleting such a branch can't make a commit become unreferenced,
so we don't need to check if it is merged, or even if it is
actually a valid commit. Skip them in that case. This allows
us to delete dangling symref branches.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: delete symref branch, not its targetRené Scharfe Thu, 18 Oct 2012 12:05:17 +0000 (14:05 +0200)

branch: delete symref branch, not its target

If a branch that is to be deleted happens to be a symref to another
branch, the current code removes the targeted branch instead of the
one it was called for.

Change this surprising behaviour and delete the symref branch
instead.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: factor out delete_branch_config()René Scharfe Thu, 18 Oct 2012 12:04:08 +0000 (14:04 +0200)

branch: factor out delete_branch_config()

Provide a small helper function for deleting branch config sections.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

branch: factor out check_branch_commit()René Scharfe Thu, 18 Oct 2012 12:02:51 +0000 (14:02 +0200)

branch: factor out check_branch_commit()

Move the code to perform checks on the tip commit of a branch
to its own function.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch tests: check quoting/encoding in To: and... Jan H. Schönherr Thu, 18 Oct 2012 14:43:34 +0000 (16:43 +0200)

format-patch tests: check quoting/encoding in To: and Cc: headers

git-format-patch does currently not parse user supplied extra header
values (e. g., --cc, --add-header) and just replays them. That forces
users to add them RFC 2822/2047 conform in encoded form, e.g.

--cc '=?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <...>'

which is inconvenient. We would want to update git-format-patch to
accept human-readable input

--cc 'Jan H. Schönherr <...>'

and handle the encoding, wrapping and quoting internally in the future,
similar to what is already done in git-send-email. The necessary code
should mostly exist in the code paths that handle the From: and Subject:
headers.

Whether we want to do this only for the git-format-patch options
--to and --cc (and the corresponding config options) or also for
user supplied headers via --add-header, is open for discussion.

For now, add test_expect_failure tests for To: and Cc: headers as a
reminder and fix tests that would otherwise fail should this get
implemented.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: fix rfc2047 address encoding with respect... Jan H. Schönherr Thu, 18 Oct 2012 14:43:33 +0000 (16:43 +0200)

format-patch: fix rfc2047 address encoding with respect to rfc822 specials

According to RFC 2047 and RFC 822, rfc2047 encoded words and and rfc822
quoted strings do not mix. Since add_rfc2047() no longer leaves RFC 822
specials behind, the quoting is also no longer necessary to create a
standard-conforming mail.

Remove the quoting, when RFC 2047 encoding takes place. This actually
requires to refactor add_rfc2047() a bit, so that the different cases
can be distinguished.

With this patch, my own name gets correctly decoded as Jan H. Schönherr
(without quotes) and not as "Jan H. Schönherr" (with quotes).

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: make rfc2047 encoding more strictJan H. Schönherr Thu, 18 Oct 2012 14:43:32 +0000 (16:43 +0200)

format-patch: make rfc2047 encoding more strict

RFC 2047 requires more characters to be encoded than it is currently done.
Especially, RFC 2047 distinguishes between allowed remaining characters
in encoded words in addresses (From, To, etc.) and other headers, such
as Subject.

Make add_rfc2047() and is_rfc2047_special() location dependent and include
all non-allowed characters to hopefully be RFC 2047 conformant.

This especially fixes a problem, where RFC 822 specials (e. g. ".") were
left unencoded in addresses, which was solved with a non-standard-conforming
workaround in the past (which is going to be removed in a follow-up patch).

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: introduce helper function last_line_length()Jan H. Schönherr Thu, 18 Oct 2012 14:43:31 +0000 (16:43 +0200)

format-patch: introduce helper function last_line_length()

Currently, an open-coded loop to calculate the length of the last
line of a string buffer is used in multiple places.

Move that code into a function of its own.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: do not wrap rfc2047 encoded headers too... Jan H. Schönherr Thu, 18 Oct 2012 14:43:30 +0000 (16:43 +0200)

format-patch: do not wrap rfc2047 encoded headers too late

Encoded characters add more than one character at once to an encoded
header. Include all characters that are about to be added in the length
calculation for wrapping.

Additionally, RFC 2047 imposes a maximum line length of 76 characters
if that line contains an rfc2047 encoded word.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

format-patch: do not wrap non-rfc2047 headers too earlyJan H. Schönherr Thu, 18 Oct 2012 14:43:29 +0000 (16:43 +0200)

format-patch: do not wrap non-rfc2047 headers too early

Do not wrap the second and later lines of non-rfc2047-encoded headers
substantially before the 78 character limit.

Instead of passing the remaining length of the first line as wrapping
width, use the correct maximum length and tell strbuf_add_wrapped_bytes()
how many characters of the first line are already used.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

utf8: fix off-by-one wrapping of textJan H. Schönherr Thu, 18 Oct 2012 14:43:28 +0000 (16:43 +0200)

utf8: fix off-by-one wrapping of text

The wrapping logic in strbuf_add_wrapped_text() does currently not allow
lines that entirely fill the allowed width, instead it wraps the line one
character too early.

For example, the text "This is the sixth commit." formatted via
"%w(11,1,2)" (wrap at 11 characters, 1 char indent of first line, 2 char
indent of following lines) results in four lines: " This is", " the",
" sixth", " commit." This is wrong, because " the sixth" is exactly
11 characters long, and thus allowed.

Fix this by allowing the (width+1) character of a line to be a valid
wrapping point if it is a whitespace character.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

strbuf: always return a non-NULL value from strbuf_detachJeff King Thu, 18 Oct 2012 10:00:12 +0000 (06:00 -0400)

strbuf: always return a non-NULL value from strbuf_detach

The current behavior is to return NULL when strbuf did not
actually allocate a string. This can be quite surprising to
callers, though, who may feed the strbuf from arbitrary data
and expect to always get a valid value.

In most cases, it does not make a difference because calling
any strbuf function will cause an allocation (even if the
function ends up not inserting any data). But if the code is
structured like:

struct strbuf buf = STRBUF_INIT;
if (some_condition)
strbuf_addstr(&buf, some_string);
return strbuf_detach(&buf, NULL);

then you may or may not return NULL, depending on the
condition. This can cause us to segfault in http-push
(when fed an empty URL) and in http-backend (when an empty
parameter like "foo=bar&&" is in the $QUERY_STRING).

This patch forces strbuf_detach to allocate an empty
NUL-terminated string when it is called on a strbuf that has
not been allocated.

I investigated all call-sites of strbuf_detach. The majority
are either not affected by the change (because they call a
strbuf_* function unconditionally), or can handle the empty
string just as easily as NULL.

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

Merge tag 'gitgui-0.17.0' of git://repo.or.cz/git-guiJunio C Hamano Wed, 17 Oct 2012 22:55:46 +0000 (15:55 -0700)

Merge tag 'gitgui-0.17.0' of git://repo.or.cz/git-gui

git-gui 0.17.0

* tag 'gitgui-0.17.0' of git://repo.or.cz/git-gui:
git-gui 0.17
git-gui: Don't prepend the prefix if value looks like a full path
git-gui: Detect full path when parsing arguments
git-gui: remove .git/CHERRY_PICK_HEAD after committing
git-gui: Fix a loose/lose mistake
git-gui: Fix semi-working shortcuts for unstage and revert
git-gui: de.po: translate "remote" as "extern"
git-gui: de.po: translate "bare" as "bloß"
git-gui: de.po: consistently add untranslated hook names within braces
git-gui: preserve commit messages in utf-8
git-gui: open console when using --trace on windows
git-gui: fix a typo in po/ files
git-gui: Use PWD if it exists on Mac OS X
git-gui: fix git-gui crash due to uninitialized variable

git-gui 0.17 gitgui-0.17.0Pat Thoyts Wed, 17 Oct 2012 20:57:29 +0000 (21:57 +0100)

git-gui 0.17

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

git-gui: Don't prepend the prefix if value looks like... Andrew Wong Tue, 2 Oct 2012 16:25:15 +0000 (12:25 -0400)

git-gui: Don't prepend the prefix if value looks like a full path

When argument parsing fails to detect a file name, "git-gui" will try to
use the previously detected "head" as the file name. We should avoid
prepending the prefix if "head" looks like a full path.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

git-gui: Detect full path when parsing argumentsAndrew Wong Tue, 2 Oct 2012 16:25:14 +0000 (12:25 -0400)

git-gui: Detect full path when parsing arguments

When running "git-gui blame" from a subfolder (which means prefix is
non-empty), if we pass a full path as argument, the argument parsing
will fail to recognize the argument as a file name, because prefix is
prepended to the argument.

This patch handles that scenario by adding an additional branch that
checks the file name without using the prefix.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

Git 1.8.0-rc3 v1.8.0-rc3Junio C Hamano Wed, 17 Oct 2012 17:39:44 +0000 (10:39 -0700)

Git 1.8.0-rc3

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

Merge git://github.com/git-l10n/git-poJunio C Hamano Wed, 17 Oct 2012 17:37:40 +0000 (10:37 -0700)

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

* git://github.com/git-l10n/git-po:
l10n: vi.po: update from v1.8.0-rc2-4-g42e55
l10n: Update Swedish translation (1964t0f0u)

Sync with 1.7.12.4Junio C Hamano Wed, 17 Oct 2012 17:37:32 +0000 (10:37 -0700)

Sync with 1.7.12.4

Git 1.7.12.4 v1.7.12.4Junio C Hamano Wed, 17 Oct 2012 17:36:01 +0000 (10:36 -0700)

Git 1.7.12.4

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

Merge branch 'jk/maint-http-half-auth-push' into maintJunio C Hamano Wed, 17 Oct 2012 17:29:24 +0000 (10:29 -0700)

Merge branch 'jk/maint-http-half-auth-push' into maint

* jk/maint-http-half-auth-push:
http: fix segfault in handle_curl_result

Merge branch 'rr/git-uri-doc' into maintJunio C Hamano Wed, 17 Oct 2012 17:28:56 +0000 (10:28 -0700)

Merge branch 'rr/git-uri-doc' into maint

* rr/git-uri-doc:
Git url doc: mark ftp/ftps as read-only and deprecate them

Merge branch 'bw/cp-a-is-gnuism' into maintJunio C Hamano Wed, 17 Oct 2012 17:28:48 +0000 (10:28 -0700)

Merge branch 'bw/cp-a-is-gnuism' into maint

* bw/cp-a-is-gnuism:
tests: "cp -a" is a GNUism

Merge branch 'nd/doc-ignore' into maintJunio C Hamano Wed, 17 Oct 2012 17:28:42 +0000 (10:28 -0700)

Merge branch 'nd/doc-ignore' into maint

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

Merge branch 'jc/doc-long-options' into maintJunio C Hamano Wed, 17 Oct 2012 17:28:34 +0000 (10:28 -0700)

Merge branch 'jc/doc-long-options' into maint

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

Merge branch 'jc/maint-t1450-fsck-order-fix' into maintJunio C Hamano Wed, 17 Oct 2012 17:28:19 +0000 (10:28 -0700)

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

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

Merge branch 'rr/test-use-shell-path-not-shell' into... Junio C Hamano Wed, 17 Oct 2012 17:27:28 +0000 (10:27 -0700)

Merge branch 'rr/test-use-shell-path-not-shell' into maint

* rr/test-use-shell-path-not-shell:
test-lib: use $SHELL_PATH, not $SHELL

Merge branch 'rr/test-make-sure-we-have-git' into maintJunio C Hamano Wed, 17 Oct 2012 17:27:21 +0000 (10:27 -0700)

Merge branch 'rr/test-make-sure-we-have-git' into maint

* rr/test-make-sure-we-have-git:
t/test-lib: make sure Git has already been built

Merge branch 'po/maint-docs' into maintJunio C Hamano Wed, 17 Oct 2012 17:27:10 +0000 (10:27 -0700)

Merge branch 'po/maint-docs' into maint

* po/maint-docs:
Doc branch: show -vv option and alternative
Doc clean: add See Also link
Doc add: link gitignore
Doc: separate gitignore pattern sources
Doc: shallow clone deepens _to_ new depth

Merge branch 'jc/ll-merge-binary-ours' into maintJunio C Hamano Wed, 17 Oct 2012 17:26:51 +0000 (10:26 -0700)

Merge branch 'jc/ll-merge-binary-ours' into maint

* jc/ll-merge-binary-ours:
ll-merge: warn about inability to merge binary files only when we can't
attr: "binary" attribute should choose built-in "binary" merge driver
merge: teach -Xours/-Xtheirs to binary ll-merge driver

Merge branch 'db/doc-custom-xmlto' into maintJunio C Hamano Wed, 17 Oct 2012 17:25:37 +0000 (10:25 -0700)

Merge branch 'db/doc-custom-xmlto' into maint

* db/doc-custom-xmlto:
Documentation/Makefile: Allow custom XMLTO binary

maybe_flush_or_die: move a too-loose Windows specific... Johannes Sixt Wed, 17 Oct 2012 07:05:51 +0000 (09:05 +0200)

maybe_flush_or_die: move a too-loose Windows specific error

check to compat

Commit b2f5e268 (Windows: Work around an oddity when a pipe with no reader
is written to) introduced a check for EINVAL after fflush() to fight
spurious "Invalid argument" errors on Windows when a pipe was broken. But
this check may hide real errors on systems that do not have the this odd
behavior. Introduce an fflush wrapper in compat/mingw.* so that the treatment
is only applied on Windows.

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

git-cvsimport: allow author-specific timezonesChris Rorvick Wed, 17 Oct 2012 03:53:29 +0000 (22:53 -0500)

git-cvsimport: allow author-specific timezones

CVS patchsets are imported with timestamps having an offset of +0000
(UTC). The cvs-authors file is already used to translate the CVS
username to full name and email in the corresponding commit. Extend
this file to support an optional timezone for calculating a user-
specific timestamp offset.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of https://github.com/nafmo/git... Jiang Xin Wed, 17 Oct 2012 01:38:30 +0000 (09:38 +0800)

Merge branch 'master' of https://github.com/nafmo/git-l10n-sv

* 'master' of https://github.com/nafmo/git-l10n-sv:
l10n: Update Swedish translation (1964t0f0u)

Merge branch 'master' of git://github.com/vnwildman/gitJiang Xin Wed, 17 Oct 2012 01:37:30 +0000 (09:37 +0800)

Merge branch 'master' of git://github.com/vnwildman/git

* 'master' of git://github.com/vnwildman/git:
l10n: vi.po: update from v1.8.0-rc2-4-g42e55

l10n: vi.po: update from v1.8.0-rc2-4-g42e55Tran Ngoc Quan Wed, 17 Oct 2012 01:15:28 +0000 (08:15 +0700)

l10n: vi.po: update from v1.8.0-rc2-4-g42e55

* translate 3 new messages
* review quotes

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

cvsserver status: provide real sticky infoMatthew Ogilvie Sun, 14 Oct 2012 05:42:23 +0000 (23:42 -0600)

cvsserver status: provide real sticky info

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: cvs add: do not expand directory argumentsMatthew Ogilvie Sun, 14 Oct 2012 05:42:22 +0000 (23:42 -0600)

cvsserver: cvs add: do not expand directory arguments

Standard "cvs add" never does any recursion. With standard
cvs, "cvs add dir" will either add just the "dir" to
the repository, or error out. Prior to this change, git-cvsserver
would try to recurse (perhaps re-adding sandbox-removed files?) into
the existing directory instead.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: use whole CVS rev number in-process; don... Matthew Ogilvie Sun, 14 Oct 2012 05:42:21 +0000 (23:42 -0600)

cvsserver: use whole CVS rev number in-process; don't strip "1." prefix

Keep track of the whole CVS revision number in-process. This will
clarify code when we start handling non-linear revision numbers later.

There is one externally visible change: conflict markers after
an update will now include the full CVS revision number,
including the "1." prefix. It used to leave off the prefix.

Other than the conflict marker, this change doesn't effect
external functionality. No new features, and the DB schema
is unchanged such that it continues to store just
the stripped rev numbers (without prefix).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: split up long lines in req_{status,diff... Matthew Ogilvie Sun, 14 Oct 2012 05:42:20 +0000 (23:42 -0600)

cvsserver: split up long lines in req_{status,diff,log}

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: clean up client request handler map commentsMatthew Ogilvie Sun, 14 Oct 2012 05:42:19 +0000 (23:42 -0600)

cvsserver: clean up client request handler map comments

- Comment that it should not be considered a complete list.
- #'annotate' comment - Uncommented annotate line is 2 lines earlier.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: remove unused functions _headrev and gethistoryMatthew Ogilvie Sun, 14 Oct 2012 05:42:18 +0000 (23:42 -0600)

cvsserver: remove unused functions _headrev and gethistory

Remove:
- _headrev() - It uses similar functionality from getmeta() and gethead().
- gethistory() - It uses similar functions gethistorydense() and getlog().

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver update: comment about how we shouldn't remove... Matthew Ogilvie Sun, 14 Oct 2012 05:42:17 +0000 (23:42 -0600)

cvsserver update: comment about how we shouldn't remove a user-modified file

Instead of a comment, we should really add test cases and actually fix it.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: add comments about database schema/usageMatthew Ogilvie Sun, 14 Oct 2012 05:42:16 +0000 (23:42 -0600)

cvsserver: add comments about database schema/usage

No functionality changes, but these comments should make it easier to
understand how it works.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver: removed unused sha1Or-k mode from kopts_from... Matthew Ogilvie Sun, 14 Oct 2012 05:42:15 +0000 (23:42 -0600)

cvsserver: removed unused sha1Or-k mode from kopts_from_path

sha1Or-k was a vestige from an early, never-released
attempt to handle some oddball cases of CRLF conversion (-k option).
Ultimately it wasn't needed, and I should have gotten rid of it
before submitting the CRLF patch in the first place.

See also 90948a42892779 (add ability to guess -kb from contents).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsserver t9400: add basic 'cvs log' testMatthew Ogilvie Sun, 14 Oct 2012 05:42:14 +0000 (23:42 -0600)

cvsserver t9400: add basic 'cvs log' test

'cvs log' output is arguably deficient in a number of ways
(see the comment added with the test), but add a test for
the current output to detect for accidental regressions.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/RelNotes: remove "updated up to this... Thomas Ackermann Tue, 16 Oct 2012 17:26:23 +0000 (19:26 +0200)

Documentation/RelNotes: remove "updated up to this revision" markers

These were used to keep track of the last commit a release notes
entry was written for, and should have been removed when cutting
the final release.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.0Junio C Hamano Tue, 16 Oct 2012 20:27:23 +0000 (13:27 -0700)

Update draft release notes to 1.8.0

We are almost there...

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

completion: add format-patch options to send-emailFelipe Contreras Tue, 16 Oct 2012 00:21:50 +0000 (02:21 +0200)

completion: add format-patch options to send-email

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/maint-http-half-auth-push'Junio C Hamano Tue, 16 Oct 2012 18:44:37 +0000 (11:44 -0700)

Merge branch 'jk/maint-http-half-auth-push'

Fixes a regression in maint-1.7.11 (v1.7.11.7), maint (v1.7.12.1)
and master (v1.8.0-rc0).

* jk/maint-http-half-auth-push:
http: fix segfault in handle_curl_result

refs: lock symref that is to be deleted, not its targetRené Scharfe Tue, 16 Oct 2012 10:22:15 +0000 (12:22 +0200)

refs: lock symref that is to be deleted, not its target

When delete_ref is called on a symref then it locks its target and then
either deletes the target or the symref, depending on whether the flag
REF_NODEREF was set in the parameter delopt.

Instead, simply pass the flag to lock_ref_sha1_basic, which will then
either lock the target or the symref, and delete the locked ref.

This reimplements part of eca35a25 (Fix git branch -m for symrefs.).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: Update Swedish translation (1964t0f0u)Peter Krefting Tue, 16 Oct 2012 07:38:11 +0000 (08:38 +0100)

l10n: Update Swedish translation (1964t0f0u)

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

l10n: Update git.pot (3 new, 6 removed messages)Jiang Xin Tue, 16 Oct 2012 00:39:10 +0000 (08:39 +0800)

l10n: Update git.pot (3 new, 6 removed messages)

This po/git.pot update is generated from v1.8.0-rc2-4-g42e55.

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

Merge branch 'master' of git://github.com/vnwildman/gitJiang Xin Tue, 16 Oct 2012 00:31:22 +0000 (08:31 +0800)

Merge branch 'master' of git://github.com/vnwildman/git

* 'master' of git://github.com/vnwildman/git:
l10n: vi.po: update translation upto cc76011

attr: more matching optimizations from .gitignoreNguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:39 +0000 (13:24 +0700)

attr: more matching optimizations from .gitignore

.gitattributes and .gitignore share the same pattern syntax but has
separate matching implementation. Over the years, ignore's
implementation accumulates more optimizations while attr's stays the
same.

This patch reuses the core matching functions that are also used by
excluded_from_list. excluded_from_list and path_matches can't be
merged due to differences in exclude and attr, for example:

* "!pattern" syntax is forbidden in .gitattributes. As an attribute
can be unset (i.e. set to a special value "false") or made back to
unspecified (i.e. not even set to "false"), "!pattern attr" is unclear
which one it means.

* we support attaching attributes to directories, but git-core
internally does not currently make use of attributes on
directories.

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

gitignore: make pattern parsing code a separate functionNguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:38 +0000 (13:24 +0700)

gitignore: make pattern parsing code a separate function

This function can later be reused by attr.c. Also turn to_exclude
field into a flag.

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

exclude: split pathname matching code into a separate... Nguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:37 +0000 (13:24 +0700)

exclude: split pathname matching code into a separate function

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

exclude: fix a bug in prefix compare optimizationNguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:36 +0000 (13:24 +0700)

exclude: fix a bug in prefix compare optimization

When "namelen" becomes zero at this stage, we have matched the fixed
part, but whether it actually matches the pattern still depends on the
pattern in "exclude". As demonstrated in t3001, path "three/a.3"
exists and it matches the "three/a.3" part in pattern "three/a.3[abc]",
but that does not mean a true match.

Don't be too optimistic and let fnmatch() do the job.

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

exclude: split basename matching code into a separate... Nguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:35 +0000 (13:24 +0700)

exclude: split basename matching code into a separate function

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

exclude: stricten a length check in EXC_FLAG_ENDSWITH... Nguyễn Thái Ngọc Duy Mon, 15 Oct 2012 06:24:34 +0000 (13:24 +0700)

exclude: stricten a length check in EXC_FLAG_ENDSWITH case

This block of code deals with the "basename" part only, which has the
length of "pathlen - (basename - pathname)". Stricten the length check
and remove "pathname" from the main expression to avoid confusion.

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

l10n: vi.po: update translation upto cc76011Tran Ngoc Quan Mon, 15 Oct 2012 07:35:49 +0000 (14:35 +0700)

l10n: vi.po: update translation upto cc76011

* translate all new messages (100%)
* review some others

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

Merge branch 'maint'Junio C Hamano Sun, 14 Oct 2012 06:05:54 +0000 (23:05 -0700)

Merge branch 'maint'

* maint:
Fix spelling error in post-receive-email hook

Fix spelling error in post-receive-email hookRichard Fearn Sat, 13 Oct 2012 22:32:50 +0000 (23:32 +0100)

Fix spelling error in post-receive-email hook

Signed-off-by: Richard Fearn <richardfearn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 12 Oct 2012 18:36:06 +0000 (11:36 -0700)

Merge branch 'maint'

* maint:
gitweb.cgi: fix "comitter_tz" typo in feed

http: do not set up curl auth after a 401Jeff King Fri, 12 Oct 2012 07:35:59 +0000 (03:35 -0400)

http: do not set up curl auth after a 401

When we get an http 401, we prompt for credentials and put
them in our global credential struct. We also feed them to
the curl handle that produced the 401, with the intent that
they will be used on a retry.

When the code was originally introduced in commit 42653c0,
this was a necessary step. However, since dfa1725, we always
feed our global credential into every curl handle when we
initialize the slot with get_active_slot. So every further
request already feeds the credential to curl.

Moreover, accessing the slot here is somewhat dubious. After
the slot has produced a response, we don't actually control
it any more. If we are using curl_multi, it may even have
been re-initialized to handle a different request.

It just so happens that we will reuse the curl handle within
the slot in such a case, and that because we only keep one
global credential, it will be the one we want. So the
current code is not buggy, but it is misleading.

By cleaning it up, we can remove the slot argument entirely
from handle_curl_result, making it much more obvious that
slots should not be accessed after they are marked as
finished.

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

remote-curl: do not call run_slot repeatedlyJeff King Fri, 12 Oct 2012 07:35:33 +0000 (03:35 -0400)

remote-curl: do not call run_slot repeatedly

Commit b81401c (http: prompt for credentials on failed POST)
taught post_rpc to call run_slot in a loop in order to retry
a request after asking the user for credentials. However,
after a call to run_slot we will have called
finish_active_slot. This means we have released the slot,
and we should no longer look at it.

As it happens, this does not cause any bugs in the current
code, since we know that we are not using curl_multi in this
code path, and therefore nobody will have taken over our
slot in the meantime. However, it is good form to actually
call get_active_slot again. It also future proofs us against
changes in the http code.

We can do this by jumping back to a retry label at the top
of our function. We just need to reorder a few setup lines
that should not be repeated; everything else within the loop
is either idempotent, needs to be repeated, or in a path we
do not follow (e.g., we do not even try when large_request
is set, because we don't know how much data we might have
streamed from our helper program).

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

http: fix segfault in handle_curl_resultJeff King Fri, 12 Oct 2012 06:22:49 +0000 (02:22 -0400)

http: fix segfault in handle_curl_result

When we create an http active_request_slot, we can set its
"results" pointer back to local storage. The http code will
fill in the details of how the request went, and we can
access those details even after the slot has been cleaned
up.

Commit 8809703 (http: factor out http error code handling)
switched us from accessing our local results struct directly
to accessing it via the "results" pointer of the slot. That
means we're accessing the slot after it has been marked as
finished, defeating the whole purpose of keeping the results
storage separate.

Most of the time this doesn't matter, as finishing the slot
does not actually clean up the pointer. However, when using
curl's multi interface with the dumb-http revision walker,
we might actually start a new request before handing control
back to the original caller. In that case, we may reuse the
slot, zeroing its results pointer, and leading the original
caller to segfault while looking for its results inside the
slot.

Instead, we need to pass a pointer to our local results
storage to the handle_curl_result function, rather than
relying on the pointer in the slot struct. This matches what
the original code did before the refactoring (which did not
use a separate function, and therefore just accessed the
results struct directly).

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

gitweb.cgi: fix "comitter_tz" typo in feedDylan Alex Simon Thu, 11 Oct 2012 20:40:35 +0000 (16:40 -0400)

gitweb.cgi: fix "comitter_tz" typo in feed

gitweb's feeds sometimes contained committer timestamps in the wrong timezone
due to a misspelling.

Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep: stop looking at random places for .gitattributesNguyễn Thái Ngọc Duy Fri, 12 Oct 2012 10:49:38 +0000 (17:49 +0700)

grep: stop looking at random places for .gitattributes

grep searches for .gitattributes using "name" field in struct
grep_source but that field is not real on-disk path name. For example,
"grep pattern rev" fills the field with "rev:path", and Git looks for
.gitattributes in the (non-existent but exploitable) path "rev:path"
instead of "path".

This patch passes real paths down to grep_source_load_driver() when:

- grep on work tree
- grep on the index
- grep a commit (or a tag if it points to a commit)

so that these cases look up .gitattributes at proper paths.
.gitattributes lookup is disabled in all other cases.

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

mergetools/p4merge: Handle "/dev/null"David Aguilar Thu, 11 Oct 2012 03:22:36 +0000 (20:22 -0700)

mergetools/p4merge: Handle "/dev/null"

p4merge does not properly handle the case where "/dev/null"
is passed as a filename.

Work it around by creating a temporary file for this purpose.

Reported-by: Jeremy Morton <admin@game-point.net>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---

Needs to be amended with Tested-by when a report comes...

Git 1.8.0-rc2 v1.8.0-rc2Junio C Hamano Thu, 11 Oct 2012 18:18:56 +0000 (11:18 -0700)

Git 1.8.0-rc2

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

test-lib: Fix say_color () not to interpret \a\b\c... Junio C Hamano Thu, 11 Oct 2012 17:40:36 +0000 (10:40 -0700)

test-lib: Fix say_color () not to interpret \a\b\c in the message

When running with color disabled (e.g. under prove to produce TAP
output), say_color() helper function is defined to use echo to show
the message. With a message that ends with "\c", echo is allowed to
interpret it as "Do not end the line with LF".

Use printf "%s\n" to emit the message literally.

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

Merge branch 'rr/git-uri-doc'Junio C Hamano Wed, 10 Oct 2012 21:57:26 +0000 (14:57 -0700)

Merge branch 'rr/git-uri-doc'

* rr/git-uri-doc:
Git url doc: mark ftp/ftps as read-only and deprecate them

Merge branch 'bw/cp-a-is-gnuism'Junio C Hamano Wed, 10 Oct 2012 21:57:09 +0000 (14:57 -0700)

Merge branch 'bw/cp-a-is-gnuism'

* bw/cp-a-is-gnuism:
tests: "cp -a" is a GNUism

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

Merge branch 'nd/doc-ignore'

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

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

Merge branch 'jc/doc-long-options'

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

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

Sync with maint

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

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

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

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

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

svn test: escape peg revision separator using empty peg rev

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

MALLOC_CHECK: Allow checking to be disabled from config.mak

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

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

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

attr: a note about the order of .gitattributes lookup

This is the documentation part of

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

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

git-send-email: introduce compose-encodingKrzysztof Mazur Tue, 9 Oct 2012 23:02:56 +0000 (01:02 +0200)

git-send-email: introduce compose-encoding

The introduction email (--compose option) have encoding hardcoded to
UTF-8, but invoked editor may not use UTF-8 encoding.
The encoding used by patches can be changed by the "8bit-encoding"
option, but this option does not have effect on introduction email
and equivalent for introduction email is missing.

Added compose-encoding command line option and sendemail.composeencoding
configuration option specify encoding of introduction email.

Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

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

log: honor grep.* configuration

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

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

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

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

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

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

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

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

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

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

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

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

revisions: initialize revs->grep_filter using grep_init()

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

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

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

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

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

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

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

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

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

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

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

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

builtin/grep.c: make configuration callback more reusable

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

This has three practical implications:

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

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

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

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

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

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

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

Merge branch 'maint'

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

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

configure.ac: Add missing comma to CC_LD_DYNPATH

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

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

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

during make.

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

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

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

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

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

tests: "cp -a" is a GNUism

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

Just use "cp -R" instead.

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

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

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

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

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

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

Git 1.8.0-rc1

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

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

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

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

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