gitweb.git
blame: handle broken commit headers gracefullyRené Scharfe Wed, 17 Apr 2013 18:33:54 +0000 (20:33 +0200)

blame: handle broken commit headers gracefully

split_ident_line() can leave us with the pointers date_begin, date_end,
tz_begin and tz_end all set to NULL. Check them before use and supply
the same fallback values as in the case of a negative return code from
split_ident_line().

The "(unknown)" is not actually shown in the output, though, because it
will be converted to a number (zero) eventually.

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

pretty: handle broken commit headers gracefullyRené Scharfe Wed, 17 Apr 2013 18:33:35 +0000 (20:33 +0200)

pretty: handle broken commit headers gracefully

Centralize the parsing of the date and time zone strings in the new
helper function show_ident_date() and make sure it checks the pointers
provided by split_ident_line() for NULL before use.

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

cat-file: print tags raw for "cat-file -p"Jeff King Wed, 17 Apr 2013 21:00:48 +0000 (17:00 -0400)

cat-file: print tags raw for "cat-file -p"

When "cat-file -p" prints commits, it shows them in their
raw format, since git's format is already human-readable.
For tags, however, we print the whole thing raw except for
one thing: we convert the timestamp on the tagger line into a
human-readable date.

This dates all the way back to a0f15fa (Pretty-print tagger
dates, 2006-03-01). At that time there was no other way to
pretty-print a tag. These days, however, neither of those
matters much. The normal way to pretty-print a tag is with
"git show", which is much more flexible than "cat-file -p".

Commit a0f15fa also built "verify-tag --verbose" (and
subsequently "tag -v") around the "cat-file -p" output.
However, that behavior was lost in commit 62e09ce (Make git
tag a builtin, 2007-07-20), and we went back to printing
the raw tag contents. Nobody seems to have noticed the bug
since then (and it is arguably a saner behavior anyway, as
it shows the actual bytes for which we verified the
signature).

Let's drop the tagger-date formatting for "cat-file -p". It
makes us more consistent with cat-file's commit
pretty-printer, and as a bonus, we can drop the hand-rolled
tag parsing code in cat-file (which happened to behave
inconsistently with the tag pretty-printing code elsewhere).

This is a change of output format, so it's possible that
some callers could considered this a regression. However,
the original behavior was arguably a bug (due to the
inconsistency with commits), likely nobody was relying on it
(even we do not use it ourselves these days), and anyone
relying on the "-p" pretty-printer should be able to expect
a change in the output format (i.e., while "cat-file" is
plumbing, the output format of "-p" was never guaranteed to
be stable).

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

convert.c: remove duplicate codeLukas Fleischer Sat, 13 Apr 2013 13:28:32 +0000 (15:28 +0200)

convert.c: remove duplicate code

The has_cr_in_index() function is an almost 1:1 copy of
read_blob_data_from_index() with some additions. Use the
latter instead of using copy-pasted code.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read_blob_data_from_index(): optionally return the... Lukas Fleischer Sat, 13 Apr 2013 13:28:31 +0000 (15:28 +0200)

read_blob_data_from_index(): optionally return the size of blob data

This allows for optionally getting the size of the returned data and
will be used in a follow-up patch.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

attr.c: extract read_index_data() as read_blob_data_fro... Lukas Fleischer Sat, 13 Apr 2013 13:28:30 +0000 (15:28 +0200)

attr.c: extract read_index_data() as read_blob_data_from_index()

Extract the read_index_data() function from attr.c and move it to
read-cache.c; rename it to read_blob_data_from_index() and update
the function signature of it to align better with index/cache API
functions.

This allows for reusing the function in convert.c later.

Signed-off-by: Lukas Fleischer <git@cryptocrack.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 16 Apr 2013 22:14:44 +0000 (15:14 -0700)

Merge branch 'maint'

* maint:
help.c: add a compatibility comment to cmd_version()

run-command: use thread-aware die_is_recursing routineJeff King Tue, 16 Apr 2013 19:50:07 +0000 (15:50 -0400)

run-command: use thread-aware die_is_recursing routine

If we die from an async thread, we do not actually exit the
program, but just kill the thread. This confuses the static
counter in usage.c's default die_is_recursing function; it
updates the counter once for the thread death, and then when
the main program calls die() itself, it erroneously thinks
we are recursing. The end result is that we print "recursion
detected in die handler" instead of the real error in such a
case (the easiest way to trigger this is having a remote
connection hang up while running a sideband demultiplexer).

This patch solves it by using a per-thread counter when the
async_die function is installed; we detect recursion in each
thread (including the main one), but they do not step on
each other's toes.

Other threaded code does not need to worry about this, as
they do not install specialized die handlers; they just let
a die() from a sub-thread take down the whole program.

Since we are overriding the default recursion-check
function, there is an interesting corner case that is not a
problem, but bears some explanation. Imagine the main thread
calls die(), and then in the die_routine starts an async
call. We will switch to using thread-local storage, which
starts at 0, for the main thread's counter, even though
the original counter was actually at 1. That's OK, though,
for two reasons:

1. It would miss only the first level of recursion, and
would still find recursive failures inside the async
helper.

2. We do not currently and are not likely to start doing
anything as heavyweight as starting an async routine
from within a die routine or helper function.

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

usage: allow pluggable die-recursion checksJeff King Tue, 16 Apr 2013 19:46:22 +0000 (15:46 -0400)

usage: allow pluggable die-recursion checks

When any git code calls die or die_errno, we use a counter
to detect recursion into the die functions from any of the
helper functions. However, such a simple counter is not good
enough for threaded programs, which may call die from a
sub-thread, killing only the sub-thread (but incrementing
the counter for everyone).

Rather than try to deal with threads ourselves here, let's
just allow callers to plug in their own recursion-detection
function. This is similar to how we handle the die routine
(the caller plugs in a die routine which may kill only the
sub-thread).

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

help.c: add a compatibility comment to cmd_version()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>

convert: The native line-ending is \r\n on MinGWJonathan Nieder Sat, 4 Sep 2010 08:25:09 +0000 (03:25 -0500)

convert: The native line-ending is \r\n on MinGW

If you try this:

1. Install Git for Windows (from the msysgit project)

2. Put

[core]
autocrlf = false
eol = native

in your .gitconfig.

3. Clone a project with

*.txt text

in its .gitattributes.

Then with current git, any text files checked out have LF line
endings, instead of the expected CRLF.

Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read_revisions_from_stdin: make copies for handle_revis... Thomas Rast Tue, 16 Apr 2013 09:57:45 +0000 (11:57 +0200)

read_revisions_from_stdin: make copies for handle_revision_arg

read_revisions_from_stdin() has passed pointers to its read buffer
down to handle_revision_arg() since its inception way back in 42cabc3
(Teach rev-list an option to read revs from the standard input.,
2006-09-05). Even back then, this was a bug: through
add_pending_object, the argument was recorded in the object_array's
'name' field.

Fix it by making a copy whenever read_revisions_from_stdin() passes an
argument down the callchain. The other caller runs handle_revision_arg()
on argv[], where it would be redundant to make a copy.

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

http: set curl FAILONERROR each time we select a handleJeff King Tue, 16 Apr 2013 00:30:38 +0000 (20:30 -0400)

http: set curl FAILONERROR each time we select a handle

Because we reuse curl handles for multiple requests, the
setup of a handle happens in two stages: stable, global
setup and per-request setup. The lifecycle of a handle is
something like:

1. get_curl_handle; do basic global setup that will last
through the whole program (e.g., setting the user
agent, ssl options, etc)

2. get_active_slot; set up a per-request baseline (e.g.,
clearing the read/write functions, making it a GET
request, etc)

3. perform the request with curl_*_perform functions

4. goto step 2 to perform another request

Breaking it down this way means we can avoid doing global
setup from step (1) repeatedly, but we still finish step (2)
with a predictable baseline setup that callers can rely on.

Until commit 6d052d7 (http: add HTTP_KEEP_ERROR option,
2013-04-05), setting curl's FAILONERROR option was a global
setup; we never changed it. However, 6d052d7 introduced an
option where some requests might turn off FAILONERROR. Later
requests using the same handle would have the option
unexpectedly turned off, which meant they would not notice
http failures at all.

This could easily be seen in the test-suite for the
"half-auth" cases of t5541 and t5551. The initial requests
turned off FAILONERROR, which meant it was erroneously off
for the rpc POST. That worked fine for a successful request,
but meant that we failed to react properly to the HTTP 401
(instead, we treated whatever the server handed us as a
successful message body).

The solution is simple: now that FAILONERROR is a
per-request setting, we move it to get_active_slot to make
sure it is reset for each request.

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

i18n: branch: mark strings for translationJiang Xin Tue, 16 Apr 2013 03:37:50 +0000 (11:37 +0800)

i18n: branch: mark strings for translation

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-bzr: fix prefix of tagsFelipe Contreras Mon, 15 Apr 2013 21:47:28 +0000 (16:47 -0500)

remote-bzr: fix prefix of tags

In the current transport-helper code, refs without namespaced refspecs don't
work correctly, so let's always use them.

Some people reported issues with 'git clone --mirror', and this fixes them, as
well as possibly others.

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

Update draft release notes to 1.8.3Junio C Hamano Mon, 15 Apr 2013 19:45:15 +0000 (12:45 -0700)

Update draft release notes to 1.8.3

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

Merge branch 'jk/diff-graph-submodule-summary'Junio C Hamano Mon, 15 Apr 2013 19:41:01 +0000 (12:41 -0700)

Merge branch 'jk/diff-graph-submodule-summary'

Make "git diff --graph" work better with submodule log output.

* jk/diff-graph-submodule-summary:
submodule: print graph output next to submodule log

Merge branch 'jk/diff-algo-finishing-touches'Junio C Hamano Mon, 15 Apr 2013 19:40:58 +0000 (12:40 -0700)

Merge branch 'jk/diff-algo-finishing-touches'

"git diff --diff-algorithm algo" is also understood as "git diff
--diff-algorithm=algo".

* jk/diff-algo-finishing-touches:
diff: allow unstuck arguments with --diff-algorithm
git-merge(1): document diff-algorithm option to merge-recursive

Merge branch 'rt/commentchar-fmt-merge-msg'Junio C Hamano Mon, 15 Apr 2013 19:40:56 +0000 (12:40 -0700)

Merge branch 'rt/commentchar-fmt-merge-msg'

The new core.commentchar configuration was not applied to a few
places.

* rt/commentchar-fmt-merge-msg:
fmt-merge-msg: use core.commentchar in tag signatures completely
fmt-merge-msg: respect core.commentchar in people credits

Merge branch 'lf/bundle-with-tip-wo-message'Junio C Hamano Mon, 15 Apr 2013 19:40:51 +0000 (12:40 -0700)

Merge branch 'lf/bundle-with-tip-wo-message'

"git bundle" did not like a bundle created using a commit without
any message as its one of the prerequistes.

* lf/bundle-with-tip-wo-message:
bundle: Accept prerequisites without commit messages

Merge branch 'jk/show-branch-strbuf'Junio C Hamano Mon, 15 Apr 2013 19:40:49 +0000 (12:40 -0700)

Merge branch 'jk/show-branch-strbuf'

"git show-branch" was not prepared to show a very long run of
ancestor operators e.g. foobar^2~2^2^2^2...^2~4 correctly.

* jk/show-branch-strbuf:
show-branch: use strbuf instead of static buffer

Merge branch 'jk/http-error-messages'Junio C Hamano Mon, 15 Apr 2013 19:40:46 +0000 (12:40 -0700)

Merge branch 'jk/http-error-messages'

Improve error reporting from the http transfer clients.

* jk/http-error-messages:
http: drop http_error function
remote-curl: die directly with http error messages
http: re-word http error message
http: simplify http_error helper function
remote-curl: consistently report repo url for http errors
remote-curl: always show friendlier 404 message
remote-curl: let servers override http 404 advice
remote-curl: show server content on http errors
http: add HTTP_KEEP_ERROR option

Merge branch 'tr/perl-keep-stderr-open'Junio C Hamano Mon, 15 Apr 2013 19:40:41 +0000 (12:40 -0700)

Merge branch 'tr/perl-keep-stderr-open'

Closing (not redirecting to /dev/null) the standard error stream is
not a very smart thing to do. Later open may return file
descriptor #2 for unrelated purpose, and error reporting code may
write into them.

* tr/perl-keep-stderr-open:
t9700: do not close STDERR
perl: redirect stderr to /dev/null instead of closing

dir.c: git-status --ignored: don't scan the work tree... Karsten Blees Mon, 15 Apr 2013 19:15:03 +0000 (21:15 +0200)

dir.c: git-status --ignored: don't scan the work tree twice

'git-status --ignored' still scans the work tree twice to collect
untracked and ignored files, respectively.

fill_directory / read_directory already supports collecting untracked and
ignored files in a single directory scan. However, the DIR_COLLECT_IGNORED
flag to enable this has some git-add specific side-effects (e.g. it
doesn't recurse into ignored directories, so listing ignored files with
--untracked=all doesn't work).

The DIR_SHOW_IGNORED flag doesn't list untracked files and returns ignored
files in dir_struct.entries[] (instead of dir_struct.ignored[] as
DIR_COLLECT_IGNORED). DIR_SHOW_IGNORED is used all throughout git.

We don't want to break the existing API, so lets introduce a new flag
DIR_SHOW_IGNORED_TOO that lists untracked as well as ignored files similar
to DIR_COLLECT_FILES, but will recurse into sub-directories based on the
other flags as DIR_SHOW_IGNORED does.

In dir.c::read_directory_recursive, add ignored files to either
dir_struct.entries[] or dir_struct.ignored[] based on the flags. Also move
the DIR_COLLECT_IGNORED case here so that filling result lists is in a
common place.

In wt-status.c::wt_status_collect_untracked, use the new flag and read
results from dir_struct.ignored[]. Remove the extra fill_directory call.

builtin/check-ignore.c doesn't call fill_directory, setting the git-add
specific DIR_COLLECT_IGNORED flag has no effect here. Remove for clarity.

Update API documentation to reflect the changes.

Performance: with this patch, 'git-status --ignored' is typically as fast
as 'git-status'.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status --ignored: don't scan the work tree... Karsten Blees Mon, 15 Apr 2013 19:14:22 +0000 (21:14 +0200)

dir.c: git-status --ignored: don't scan the work tree three times

'git-status --ignored' recursively scans directories up to three times:

1. To collect untracked files.

2. To collect ignored files.

3. When collecting ignored files, to check that an untracked directory
that potentially contains ignored files doesn't also contain untracked
files (i.e. isn't already listed as untracked).

Let's get rid of case 3 first.

Currently, read_directory_recursive returns a boolean whether a directory
contains the requested files or not (actually, it returns the number of
files, but no caller actually needs that), and DIR_SHOW_IGNORED specifies
what we're looking for.

To be able to test for both untracked and ignored files in a single scan,
we need to return a bit more info, and the result must be independent of
the DIR_SHOW_IGNORED flag.

Reuse the path_treatment enum as return value of read_directory_recursive.
Split path_handled in two separate values path_excluded and path_untracked
that don't change their meaning with the DIR_SHOW_IGNORED flag. We don't
need an extra value path_untracked_and_excluded, as directories with both
untracked and ignored files should be listed as untracked.

Rename path_ignored to path_none for clarity (i.e. "don't treat that path"
in contrast to "the path is ignored and should be treated according to
DIR_SHOW_IGNORED").

Replace enum directory_treatment with path_treatment. That's just another
enum with the same meaning, no need to translate back and forth.

In treat_directory, get rid of the extra read_directory_recursive call and
all the DIR_SHOW_IGNORED-specific code.

In read_directory_recursive, decide whether to dir_add_name path_excluded
or path_untracked paths based on the DIR_SHOW_IGNORED flag.

The return value of read_directory_recursive is the maximum path_treatment
of all files and sub-directories. In the check_only case, abort when we've
reached the most significant value (path_untracked).

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status: avoid is_excluded checks for tracked... Karsten Blees Mon, 15 Apr 2013 19:13:35 +0000 (21:13 +0200)

dir.c: git-status: avoid is_excluded checks for tracked files

Checking if a file is in the index is much faster (hashtable lookup) than
checking if the file is excluded (linear search over exclude patterns).

Skip is_excluded checks for files: move the cache_name_exists check from
treat_file to treat_one_path and return early if the file is tracked.

This can safely be done as all other code paths also return path_ignored
for tracked files, and dir_add_ignored skips tracked files as well.

There's just one line left in treat_file, so move this to treat_one_path
as well.

Here's some performance data for git-status from the linux and WebKit
repos (best of 10 runs on a Debian Linux on SSD, core.preloadIndex=true):

| status | status --ignored
| linux | WebKit | linux | WebKit
-------+-------+--------+-------+---------
before | 0.218 | 1.583 | 0.321 | 2.579
after | 0.156 | 0.988 | 0.202 | 1.279
gain | 1.397 | 1.602 | 1.589 | 2.016

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: replace is_path_excluded with now equivalent... Karsten Blees Mon, 15 Apr 2013 19:12:57 +0000 (21:12 +0200)

dir.c: replace is_path_excluded with now equivalent is_excluded API

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: unify is_excluded and is_path_excluded APIsKarsten Blees Mon, 15 Apr 2013 19:12:14 +0000 (21:12 +0200)

dir.c: unify is_excluded and is_path_excluded APIs

The is_excluded and is_path_excluded APIs are very similar, except for a
few noteworthy differences:

is_excluded doesn't handle ignored directories, results for paths within
ignored directories are incorrect. This is probably based on the premise
that recursive directory scans should stop at ignored directories, which
is no longer true (in certain cases, read_directory_recursive currently
calls is_excluded *and* is_path_excluded to get correct ignored state).

is_excluded caches parsed .gitignore files of the last directory in struct
dir_struct. If the directory changes, it finds a common parent directory
and is very careful to drop only as much state as necessary. On the other
hand, is_excluded will also read and parse .gitignore files in already
ignored directories, which are completely irrelevant.

is_path_excluded correctly handles ignored directories by checking if any
component in the path is excluded. As it uses is_excluded internally, this
unfortunately forces is_excluded to drop and re-read all .gitignore files,
as there is no common parent directory for the root dir.

is_path_excluded tracks state in a separate struct path_exclude_check,
which is essentially a wrapper of dir_struct with two more fields. However,
as is_path_excluded also modifies dir_struct, it is not possible to e.g.
use multiple path_exclude_check structures with the same dir_struct in
parallel. The additional structure just unnecessarily complicates the API.

Teach is_excluded / prep_exclude about ignored directories: whenever
entering a new directory, first check if the entire directory is excluded.
Remember the excluded state in dir_struct. Don't traverse into already
ignored directories (i.e. don't read irrelevant .gitignore files).

Directories could also be excluded by exclude patterns specified on the
command line or .git/info/exclude, so we cannot simply skip prep_exclude
entirely if there's no .gitignore file name (dir_struct.exclude_per_dir).
Move this check to just before actually reading the file.

is_path_excluded is now equivalent to is_excluded, so we can simply
redirect to it (the public API is cleaned up in the next patch).

The performance impact of the additional ignored check per directory is
hardly noticeable when reading directories recursively (e.g. 'git status').
However, performance of git commands using the is_path_excluded API (e.g.
'git ls-files --cached --ignored --exclude-standard') is greatly improved
as this no longer re-reads .gitignore files on each call.

Here's some performance data from the linux and WebKit repos (best of 10
runs on a Debian Linux on SSD, core.preloadIndex=true):

| ls-files -ci | status | status --ignored
| linux | WebKit | linux | WebKit | linux | WebKit
-------+-------+--------+-------+--------+-------+---------
before | 0.506 | 6.539 | 0.212 | 1.555 | 0.323 | 2.541
after | 0.080 | 1.191 | 0.218 | 1.583 | 0.321 | 2.579
gain | 6.325 | 5.490 | 0.972 | 0.982 | 1.006 | 0.985

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: move prep_excludeKarsten Blees Mon, 15 Apr 2013 19:11:37 +0000 (21:11 +0200)

dir.c: move prep_exclude

Move prep_exclude in preparation for the next patch.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: factor out parts of last_exclude_matching for... Karsten Blees Mon, 15 Apr 2013 19:11:02 +0000 (21:11 +0200)

dir.c: factor out parts of last_exclude_matching for later reuse

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-clean -d -X: don't delete tracked directoriesKarsten Blees Mon, 15 Apr 2013 19:10:05 +0000 (21:10 +0200)

dir.c: git-clean -d -X: don't delete tracked directories

The notion of "ignored tracked" directories introduced in 721ac4ed "dir.c:
Make git-status --ignored more consistent" has a few unwanted side effects:

- git-clean -d -X: deletes ignored tracked directories. git-clean should
never delete tracked content.

- git-ls-files --ignored --other --directory: lists ignored tracked
directories instead of "other" directories.

- git-status --ignored: lists ignored tracked directories while contained
files may be listed as modified. Paths listed by git-status should be
disjoint (except in long format where a path may be listed in both the
staged and unstaged section).

Additionally, the current behaviour violates documentation in gitignore(5)
("Specifies intentionally *untracked* files to ignore") and Documentation/
technical/api-directory-listing.txt ("DIR_SHOW_OTHER_DIRECTORIES: Include
a directory that is *not tracked*.").

In dir.c::treat_directory, remove the special handling of ignored tracked
directories, so that the DIR_SHOW_OTHER_DIRECTORIES flag only affects
"other" (i.e. untracked) directories. In dir.c::dir_add_name, check that
added paths are untracked even if DIR_SHOW_IGNORED is set.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: make 'git-status --ignored' work within leading... Karsten Blees Mon, 15 Apr 2013 19:09:25 +0000 (21:09 +0200)

dir.c: make 'git-status --ignored' work within leading directories

'git-status --ignored path/' doesn't list ignored files and directories
within 'path' if some component of 'path' is classified as untracked.

Disable the DIR_SHOW_OTHER_DIRECTORIES flag while traversing leading
directories. This prevents treat_leading_path() with DIR_SHOW_IGNORED flag
from aborting at the top level untracked directory.

As a side effect, this also eliminates a recursive directory scan per
leading directory level, as treat_directory() can no longer call
read_directory_recursive() when called from treat_leading_path().

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status --ignored: don't list empty directori... Karsten Blees Mon, 15 Apr 2013 19:08:42 +0000 (21:08 +0200)

dir.c: git-status --ignored: don't list empty directories as ignored

'git-status --ignored' lists empty untracked directories as ignored, even
though they don't have any ignored files.

When checking if a directory is already listed as untracked (i.e. shouldn't
be listed as ignored as well), don't assume that the directory has only
ignored files if it doesn't have untracked files, as the directory may be
empty.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-ls-files --directories: don't hide empty... Karsten Blees Mon, 15 Apr 2013 19:08:02 +0000 (21:08 +0200)

dir.c: git-ls-files --directories: don't hide empty directories

'git-ls-files --ignored --directories' hides empty directories even though
--no-empty-directory was not specified.

Treat the DIR_HIDE_EMPTY_DIRECTORIES flag independently from
DIR_SHOW_IGNORED to make all git-ls-files options work as expected.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status --ignored: don't list empty ignored... Karsten Blees Mon, 15 Apr 2013 19:07:16 +0000 (21:07 +0200)

dir.c: git-status --ignored: don't list empty ignored directories

'git-status --ignored' lists ignored tracked directories without any
ignored files if a tracked file happens to match an exclude pattern.

Always exclude tracked files.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status --ignored: don't list files in ignore... Karsten Blees Mon, 15 Apr 2013 19:06:30 +0000 (21:06 +0200)

dir.c: git-status --ignored: don't list files in ignored directories

'git-status --ignored' lists both the ignored directory and the ignored
files if the files are in a tracked sub directory.

When recursing into sub directories in read_directory_recursive, pass on
the check_only parameter so that we don't accidentally add the files.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

dir.c: git-status --ignored: don't drop ignored directoriesKarsten Blees Mon, 15 Apr 2013 19:05:19 +0000 (21:05 +0200)

dir.c: git-status --ignored: don't drop ignored directories

'git-status --ignored' drops ignored directories if they contain untracked
files in an untracked sub directory.

Fix it by getting exact (recursive) excluded status in treat_directory.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

glossary: improve definitions of refspec and pathspecThomas 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>

The name of the hash function is "SHA-1", not "SHA1"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>

glossary: improve description of SHA-1 related topicsThomas 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>

glossary: remove outdated/misleading/irrelevant entriesThomas 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>

branch: colour upstream branchesFelipe Contreras Mon, 15 Apr 2013 02:37:49 +0000 (21:37 -0500)

branch: colour upstream branches

Otherwise when using 'git branch -vv' it's hard to see them among so
much output.

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

bisect: Store first bad commit as comment in log fileTorstein Hegge Sat, 13 Apr 2013 15:22:57 +0000 (17:22 +0200)

bisect: Store first bad commit as comment in log file

When bisect successfully finds a single revision, the first bad commit
should be shown to human readers of 'git bisect log'.

This resolves the apparent disconnect between the bisection result and
the log when a bug reporter says "I know that the first bad commit is
$rev, as you can see from $(git bisect log)".

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: add 'signed-tags' capabilityJohn Keeping Sun, 14 Apr 2013 10:57:08 +0000 (11:57 +0100)

transport-helper: add 'signed-tags' capability

This allows a remote helper using the 'export' protocol to specify that
it supports signed tags, changing the handing from 'warn-strip' to
'verbatim'.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: pass --signed-tags=warn-strip to... John Keeping Sun, 14 Apr 2013 10:57:07 +0000 (11:57 +0100)

transport-helper: pass --signed-tags=warn-strip to fast-export

Currently, attempting to push a signed tag to a remote helper which uses
fast-export results in the remote helper failing because the default
fast-export action for signed tags is "abort". This is not helpful for
users because there is no way to pass additional arguments to
fast-export here, either from the remote helper or from the command
line.

In general, the signature will be invalidated by whatever transformation
a remote helper performs on a tag to push it to a repository in a
different format so the correct behaviour is to strip the tag. Doing
this silently may surprise people, so use "warn-strip" to issue a
warning when a signed tag is encountered.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: add --signed-tags=warn-strip modeJohn Keeping Sun, 14 Apr 2013 10:57:06 +0000 (11:57 +0100)

fast-export: add --signed-tags=warn-strip mode

This issues a warning while stripping signatures from signed tags, which
allows us to use it as default behaviour for remote helpers which cannot
specify how to handle signed tags.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

checkout: add --ignore-skip-worktree-bits in sparse... Nguyễn Thái Ngọc Duy Fri, 12 Apr 2013 23:12:08 +0000 (09:12 +1000)

checkout: add --ignore-skip-worktree-bits in sparse checkout mode

"git checkout -- <paths>" is usually used to restore all modified
files in <paths>. In sparse checkout mode, this command is overloaded
with another meaning: to add back all files in <paths> that are
excluded by sparse patterns.

As the former makes more sense for day-to-day use. Switch it to the
default and the latter enabled with --ignore-skip-worktree-bits.

While at there, add info/sparse-checkout to gitrepository-layout.txt

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

gitweb/INSTALL: Simplify description of GITWEB_CONFIG_S... Jakub Narębski Fri, 12 Apr 2013 22:20:48 +0000 (00:20 +0200)

gitweb/INSTALL: Simplify description of GITWEB_CONFIG_SYSTEM

The flow of the text describing GITWEB_CONFIG_SYSTEM and
GITWEB_CONFIG_COMMON in gitweb/INSTALL is awkward. "This is bad. Oh
the other hand, better is broken. Therefore we do this." forces
readers to make multiple guesses while reading: "ok, bad, so you
plan to change it and warn us about upcoming change? oh, not that,
changing it is bad, so we have to live with it? oh, not that, there
is another one that is common and that is what we can use".

Better rewrite said paragraph to avoid such a mental roller-coaster in
the first place.

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

Merge branch 'po/help-guides'Junio C Hamano Mon, 15 Apr 2013 06:33:17 +0000 (23:33 -0700)

Merge branch 'po/help-guides'

Finishing touches.

* po/help-guides:
help: mark common_guides[] as translatable

t/test-lib.sh: drop "$test" variableJeff 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>

t/test-lib.sh: fix TRASH_DIRECTORY handlingJohn 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>

completion: small optimizationFelipe Contreras Wed, 10 Apr 2013 06:57:57 +0000 (01:57 -0500)

completion: small optimization

No need to calculate a new $c with a space if we are not going to do
anything it with it.

There should be no functional changes, except that a word "foo " with no
suffixes can't be matched. But $cur cannot have a space at the end
anyway. So it's safe.

Based on the code from SZEDER Gábor.

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

completion: inline __gitcomp_1 to its sole callsiteFelipe Contreras Wed, 10 Apr 2013 06:57:56 +0000 (01:57 -0500)

completion: inline __gitcomp_1 to its sole callsite

There is no point in calling a separate function that is only used
in one place. Especially considering that there's no need to call
compgen, and we traverse the words ourselves both in __gitcompadd,
and __gitcomp_1.

Let's squash the functions together, and traverse only once.

This improves performance. For N number of words:

== 1 ==
original: 0.002s
new: 0.000s
== 10 ==
original: 0.005s
new: 0.001s
== 100 ==
original: 0.009s
new: 0.006s
== 1000 ==
original: 0.027s
new: 0.019s
== 10000 ==
original: 0.163s
new: 0.151s
== 100000 ==
original: 1.555s
new: 1.497s

No functional changes.

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

completion: get rid of compgenFelipe Contreras Wed, 10 Apr 2013 06:57:55 +0000 (01:57 -0500)

completion: get rid of compgen

The functionality we use from compgen is not much, we can do the same
manually, with drastic improvements in speed, especially when dealing
with only a few words.

This patch also has the sideffect that brekage reported by Jeroen Meijer
and SZEDER Gábor gets fixed because we no longer expand the resulting
words.

Here are some numbers filtering N amount of words:

== 1 ==
original: 0.002s
new: 0.000s
== 10 ==
original: 0.002s
new: 0.000s
== 100 ==
original: 0.003s
new: 0.002s
== 1000 ==
original: 0.012s
new: 0.011s
== 10000 ==
original: 0.056s
new: 0.066s
== 100000 ==
original: 2.669s
new: 0.622s

If the results are not narrowed:

== 1 ==
original: 0.002s
new: 0.000s
== 10 ==
original: 0.002s
new: 0.001s
== 100 ==
original: 0.004s
new: 0.004s
== 1000 ==
original: 0.020s
new: 0.015s
== 10000 ==
original: 0.101s
new: 0.355s
== 100000 ==
original: 2.850s
new: 31.941s

So, unless 'git checkout <tab>' usually gives you more than 10000
results, you'll get an improvement :)

Other possible solutions perform better after 1000 words, but worst if
less than that:

COMPREPLY=($(awk -v cur="$3" -v pre="$2" -v suf="$4"
'$0 ~ cur { print pre$0suf }' <<< "$1" ))

COMPREPLY=($(printf -- "$2%s$4\n" $1 | grep "^$2$3"))

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

completion: add __gitcomp_nl testsFelipe Contreras Wed, 10 Apr 2013 06:57:54 +0000 (01:57 -0500)

completion: add __gitcomp_nl tests

Original patch by SZEDER Gábor.

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

completion: add new __gitcompadd helperFelipe Contreras Wed, 10 Apr 2013 06:57:53 +0000 (01:57 -0500)

completion: add new __gitcompadd helper

The idea is to never touch the COMPREPLY variable directly.

This allows other completion systems (i.e. zsh) to override
__gitcompadd, and do something different instead.

Also, this allows further optimizations down the line.

There should be no functional changes.

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

rebase-am: explicitly disable cover-letterFelipe Contreras Sun, 14 Apr 2013 22:27:04 +0000 (17:27 -0500)

rebase-am: explicitly disable cover-letter

If the user has a cover-letter configuration set to anything other
than 'false', 'git format-patch' may generate a cover letter, which
has no place in "format-patch | am" pipeline.

The internal invocation of format-patch must explicitly override the
configuration from the command line, just like --src-prefix and other
options already do.

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

doc/http-backend: match query-string in apache half... 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>

test-bzr: portable shell and utf-8 strings for Mac OSTorsten Bögershausen Fri, 12 Apr 2013 21:18:20 +0000 (23:18 +0200)

test-bzr: portable shell and utf-8 strings for Mac OS

Make the shell script more portable:
- Split export X=Y into 2 lines
- Use printf instead of echo -e

Use UTF-8 code points which are not decomposed by the filesystem:
Code points like "á" will be decomposed by Mac OS X.
bzr is unable to find the file "á" on disk.
Use code points from unicode which can not be decomposed.
In other words, the precompsed form use the same bytes as decomposed.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Acked-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 'maint'Junio C Hamano Fri, 12 Apr 2013 20:54:01 +0000 (13:54 -0700)

Sync with 'maint'

* maint:
Correct common spelling mistakes in comments and tests
kwset: fix spelling in comments
precompose-utf8: fix spelling of "want" in error message
compat/nedmalloc: fix spelling in comments
compat/regex: fix spelling and grammar in comments
obstack: fix spelling of similar
contrib/subtree: fix spelling of accidentally
git-remote-mediawiki: spelling fixes
doc: various spelling fixes
fast-export: fix argument name in error messages
Documentation: distinguish between ref and offset deltas in pack-format
i18n: make the translation of -u advice in one go

Merge branch 'rr/test-3200-style' into maintJunio 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

Merge branch 'mg/texinfo-5' into maintJunio 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

Merge branch 'jk/diffcore-break-divzero' into maintJunio 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

Merge branch 'cn/commit-amend-doc' into maintJunio 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

Merge branch 'jk/bisect-prn-unsigned' into maintJunio 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

Merge branch 'jk/no-more-self-assignment' into maintJunio 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

Merge branch 'rr/send-email-perl-critique' into maintJunio 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

Merge branch 'jc/t5516-pushInsteadOf-vs-pushURL' into... 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

Correct common spelling mistakes in comments and testsStefano 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>

kwset: fix spelling in commentsStefano 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>

precompose-utf8: fix spelling of "want" in error messageStefano 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>

compat/nedmalloc: fix spelling in commentsStefano 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>

compat/regex: fix spelling and grammar in commentsStefano 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>

obstack: fix spelling of similarStefano 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>

contrib/subtree: fix spelling of accidentallyStefano 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>

git-remote-mediawiki: spelling fixesStefano 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>

doc: various spelling fixesStefano 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>

Merge branch 'maint-1.8.1' into maintJunio 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

completion: get rid of empty COMPREPLY assignmentsFelipe Contreras Wed, 10 Apr 2013 06:57:52 +0000 (01:57 -0500)

completion: get rid of empty COMPREPLY assignments

There's no functional reason for those, the only purpose they are
supposed to serve is to say "we don't provide any words here", but
even for that it's not used consistently.

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

completion: trivial test improvementFelipe Contreras Wed, 10 Apr 2013 06:57:51 +0000 (01:57 -0500)

completion: trivial test improvement

Instead of passing a dummy "", let's check if the last character is a
space, and then move the _cword accordingly.

Apparently we were passing "" all the way to compgen, which fortunately
expanded it to nothing.

Lets do the right thing though.

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

completion: add more cherry-pick optionsFelipe Contreras Wed, 10 Apr 2013 09:08:18 +0000 (04:08 -0500)

completion: add more cherry-pick options

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

doc: clarify that "git daemon --user=<user>" option... 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>

help: mark common_guides[] as translatableSimon Ruderich Fri, 12 Apr 2013 13:51:42 +0000 (15:51 +0200)

help: mark common_guides[] as translatable

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Acked-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: fix argument name in error messagesPaul 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>

Documentation: distinguish between ref and offset delta... 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>

Support FTP-over-SSL/TLS for regular FTPModestas Vainius Sun, 7 Apr 2013 19:10:39 +0000 (22:10 +0300)

Support FTP-over-SSL/TLS for regular FTP

Add a boolean http.sslTry option which allows to enable AUTH SSL/TLS and
encrypted data transfers when connecting via regular FTP protocol.

Default is false since it might trigger certificate verification errors on
misconfigured servers.

Signed-off-by: Modestas Vainius <modestas@vainius.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tb/document-status-u-tradeoff' into maintJunio 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

i18n: make the translation of -u advice in one goJiang 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>

l10n: zh_CN.po: translate 54 messages (2048t0f0u)Jiang Xin Thu, 11 Apr 2013 09:55:09 +0000 (17:55 +0800)

l10n: zh_CN.po: translate 54 messages (2048t0f0u)

Translate 54 new messages came from git.pot update in c138af5
(l10n: git.pot: v1.8.3 round 1 (54 new, 15 removed))

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

Merge remote-tracking branch 'sv-nafmo/master'Jiang Xin Fri, 12 Apr 2013 01:17:30 +0000 (09:17 +0800)

Merge remote-tracking branch 'sv-nafmo/master'

* sv-nafmo/master:
l10n: Update Swedish translation (2048t0f0u)

Merge branch 'maint'Junio C Hamano Fri, 12 Apr 2013 00:41:48 +0000 (17:41 -0700)

Merge branch 'maint'

* maint:
Typo fix: replacing it's -> its
t: make PIPE a standard test prerequisite
archive: clarify explanation of --worktree-attributes
t/README: --immediate skips cleanup commands for failed tests

Update dtaft release notes to 1.8.3Junio C Hamano Thu, 11 Apr 2013 23:03:55 +0000 (16:03 -0700)

Update dtaft release notes to 1.8.3

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

Merge branch 'ap/combine-diff-coalesce-lost'Junio C Hamano Fri, 12 Apr 2013 00:41:05 +0000 (17:41 -0700)

Merge branch 'ap/combine-diff-coalesce-lost'

Attempts to minimize "diff -c/--cc" output by coalescing the same
lines removed from the parents better, but with an O(n^2)
complexity.

* ap/combine-diff-coalesce-lost:
combine-diff: coalesce lost lines optimally

Merge branch 'sr/log-SG-no-textconv'Junio C Hamano Fri, 12 Apr 2013 00:41:04 +0000 (17:41 -0700)

Merge branch 'sr/log-SG-no-textconv'

"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()

Merge branch 'js/rerere-forget-protect-against-NUL'Junio C Hamano Fri, 12 Apr 2013 00:41:02 +0000 (17:41 -0700)

Merge branch 'js/rerere-forget-protect-against-NUL'

A few bugfixes to "git rerere" working on corner case merge
conflicts.

* js/rerere-forget-protect-against-NUL:
rerere forget: do not segfault if not all stages are present
rerere forget: grok files containing NUL

Merge branch 'po/help-guides'Junio C Hamano Fri, 12 Apr 2013 00:41:00 +0000 (17:41 -0700)

Merge branch 'po/help-guides'

"git help" learned "-g" option to show the list of guides just like
list of commands are given with "-a".

* po/help-guides:
doc: include --guide option description for "git help"
help: mention -a and -g option, and 'git help <concept>' usage.
builtin/help.c: add list_common_guides_help() function
builtin/help.c: add --guide option
builtin/help.c: split "-a" processing into two

Typo fix: replacing it's -> itsBenoit 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>

t: make PIPE a standard test prerequisiteAdam 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>

archive: clarify explanation of --worktree-attributesRené 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>

t9903: Don't fail when run from path accessed through... Torstein Hegge Thu, 11 Apr 2013 18:53:22 +0000 (20:53 +0200)

t9903: Don't fail when run from path accessed through symlink

When the git directory is accessed through a symlink like

ln -s /tmp/git /tmp/git-symlink
cd /tmp/git-symlink/t
make -C .. && ./t9903-bash-prompt.sh

$TRASH_DIRECTORY is /tmp/git-symlink/t/trash directory.t9903-bash-prompt
and $(pwd -P) is /tmp/git/t/trash directory.t9903-bash-prompt.

When __gitdir looks up the path through 'git rev-parse --git-dir', it
will return paths similar to $(pwd -P). This behavior is already tested in
t9903 'gitdir - resulting path avoids symlinks'.

Signed-off-by: Torstein Hegge <hegge@resisty.net>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>