gitweb.git
argv-array: refactor empty_argv initializationJeff King Wed, 18 Apr 2012 21:08:49 +0000 (14:08 -0700)

argv-array: refactor empty_argv initialization

An empty argv-array is initialized to point to a static
empty NULL-terminated array. The original implementation
separates the actual storage of the NULL-terminator from the
pointer to the list. This makes the exposed type a "const
char **", which nicely matches the type stored by the
argv-array.

However, this indirection means that one cannot use
empty_argv to initialize a static variable, since it is
not a constant.

Instead, we can expose empty_argv directly, as an array of
pointers. The only place we use it is in the ARGV_ARRAY_INIT
initializer, and it decays to a pointer appropriately there.

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

Prevent graph_width of stat width from falling below minLucian Poston Wed, 18 Apr 2012 21:12:18 +0000 (14:12 -0700)

Prevent graph_width of stat width from falling below min

Update tests in t4052 fixed by this change.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4052: Test diff-stat output with minimum columnsLucian Poston Wed, 18 Apr 2012 21:09:33 +0000 (14:09 -0700)

t4052: Test diff-stat output with minimum columns

When COLUMNS or --stat-width restricts the diff-stat width to near the
minimum, 26 columns, the graph_width value becomes negative. Consequently, the
graph part of diff-stat is not resized properly.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin/merge.c: reduce parents earlyJunio C Hamano Tue, 17 Apr 2012 19:22:26 +0000 (12:22 -0700)

builtin/merge.c: reduce parents early

Instead of waiting until we record the parents of resulting merge, reduce
redundant parents (including our HEAD) immediately after reading them.

The change to t7602 illustrates the essence of the effect of this change.
The octopus merge strategy used to be fed with redundant commits only to
discard them as "up-to-date", but we no longer feed such redundant commits
to it and the affected test degenerates to a regular two-head merge.

And obviously the known-to-be-broken test in t6028 is now fixed.

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

builtin/merge.c: collect other parents earlyJunio C Hamano Tue, 17 Apr 2012 18:31:10 +0000 (11:31 -0700)

builtin/merge.c: collect other parents early

Move the code around to populate remoteheads list early in the process
before any decision regarding twohead vs octopus and fast-forwardness is
made.

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

builtin/merge.c: remove "remoteheads" global variableJunio C Hamano Mon, 16 Apr 2012 23:15:13 +0000 (16:15 -0700)

builtin/merge.c: remove "remoteheads" global variable

Instead pass it around starting from the toplevel cmd_merge()
as an explicit parameter.

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

merge tests: octopus with redundant parentsMichał Kiedrowicz Mon, 13 Feb 2012 11:48:56 +0000 (12:48 +0100)

merge tests: octopus with redundant parents

This happens when git merge is run to merge multiple commits that are
descendants of current HEAD (or are HEAD). We've hit this while updating
master to origin/master but accidentaly we called (while being on master):

$ git merge master origin/master

Here is a minimal testcase:

$ git init a && cd a
$ echo a >a && git add a
$ git commit -minitial
$ echo b >a && git add a
$ git commit -msecond
$ git checkout master^

$ git merge master master
Fast-forwarding to: master
Already up-to-date with master
Merge made by the 'octopus' strategy.
a | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

$ git cat-file commit HEAD
tree eebfed94e75e7760540d1485c740902590a00332
parent bd679e85202280b263e20a57639a142fa14c2c64
author Michał Kiedrowicz <michal.kiedrowicz@gmail.com> 1329132996 +0100
committer Michał Kiedrowicz <michal.kiedrowicz@gmail.com> 1329132996 +0100

Merge branches 'master' and 'master' into HEAD

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

fetch: describe new refs based on where it came fromMarc Branchaud Mon, 16 Apr 2012 22:08:50 +0000 (18:08 -0400)

fetch: describe new refs based on where it came from

update_local_ref() used to say "[new branch]" when we stored a new ref
outside refs/tags/ hierarchy, but the message is more about what we
fetched, so use the refname at the origin to make that decision.

Also, only call a new ref a "branch" if it's under refs/heads/.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Give remote_ref to update_local_ref() as wellMarc Branchaud Mon, 16 Apr 2012 22:08:49 +0000 (18:08 -0400)

fetch: Give remote_ref to update_local_ref() as well

This way, the function can look at the remote side to adjust the
informational message it gives.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4052: Adjust --graph --stat output for prefixesLucian Poston Mon, 16 Apr 2012 10:44:52 +0000 (03:44 -0700)

t4052: Adjust --graph --stat output for prefixes

Adjust tests to verify that the commit history graph tree is taken into
consideration when the diff stat output width is calculated.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Adjust stat width calculations to take --graph output... Lucian Poston Mon, 16 Apr 2012 10:44:51 +0000 (03:44 -0700)

Adjust stat width calculations to take --graph output into account

The recent change to compute the width of diff --stat did not take into
consideration the output from --graph. The consequence is that when both
options are used, e.g. in 'log --stat --graph', the lines are too long.

Adjust stat width calculations to take --graph output into account.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add output_prefix_length to diff_optionsLucian Poston Mon, 16 Apr 2012 10:44:50 +0000 (03:44 -0700)

Add output_prefix_length to diff_options

Add output_prefix_length to diff_options. Initialize the value to 0 and only
set it when graph.c:diff_output_prefix_callback() is called.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t4052: test --stat output with --graphZbigniew Jędrzejewski-Szmek Mon, 16 Apr 2012 10:44:49 +0000 (03:44 -0700)

t4052: test --stat output with --graph

Add tests which show that the width of the --prefix added by --graph
is not taken into consideration when the diff stat output width is
calculated.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: avoid stack-buffer-read-overrun for very long... Jim Meyering Mon, 16 Apr 2012 15:20:02 +0000 (17:20 +0200)

diff: avoid stack-buffer-read-overrun for very long name

Due to the use of strncpy without explicit NUL termination,
we could end up passing names n1 or n2 that are not NUL-terminated
to queue_diff, which requires NUL-terminated strings.
Ensure that each is NUL terminated.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cherry-pick: do not expect file argumentsClemens Buchacher Sat, 14 Apr 2012 19:04:48 +0000 (21:04 +0200)

cherry-pick: do not expect file arguments

If a commit-ish passed to cherry-pick or revert happens to have a file
of the same name, git complains that the argument is ambiguous and
advises to use '--'. To make things worse, the '--' argument is removed
by parse_options, und so passing '--' has no effect.

Instead, always interpret cherry-pick/revert arguments as revisions.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

properly keep track of current working directoryClemens Buchacher Thu, 12 Apr 2012 23:11:36 +0000 (01:11 +0200)

properly keep track of current working directory

Various failure modes in the repository detection code path currently
quote the wrong directory in their error message. The working directory
is changed iteratively to the parent directory until a git repository is
found. If the working directory cannot be changed to the parent
directory for some reason, the detection gives up and prints an error
message. The error message should report the current working directory.

Instead of continually updating the 'cwd' variable, which is actually
used to remember the original working directory, the 'offset' variable
is used to keep track of the current working directory. At the point
where the affected error handling code is called, 'offset' already
points to the end of the parent of the working directory, rather than
the current working directory.

Fix this by explicitly using a variable 'offset_parent' and update
'offset' concurrently with the call to chdir.

In a similar fashion, the function get_device_or_die() would print the
original working directory in case of a failure, rather than the current
working directory. Fix this as well by making use of the 'offset'
variable.

Lastly, replace the phrase 'mount parent' with 'mount point'. The former
appears to be a typo.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: use eval_gettextln correctlyRoss Lagerwall Sat, 14 Apr 2012 12:37:29 +0000 (14:37 +0200)

stash: use eval_gettextln correctly

Otherwise, passing an invalid option, git stash -v, gave:

git-stash: line 204: $'error: unknown option for \'stash save\':
$option\n To provide a message, use git stash save -- \'$option\'':
command not found

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodules: recursive fetch also checks new tags for... Jens Lehmann Fri, 13 Apr 2012 16:25:16 +0000 (18:25 +0200)

submodules: recursive fetch also checks new tags for submodule commits

Since 88a21979c (fetch/pull: recurse into submodules when necessary) all
fetched commits are examined if they contain submodule changes (unless
configuration or command line options inhibit that). If a newly recorded
submodule commit is not present in the submodule, a fetch is run inside
it to download that commit.

Checking new refs was done in an else branch where it wasn't executed for
tags. This normally isn't a problem because tags are only fetched with
the branches they live on, then checking the new commits in the fetched
branches for submodule commits will also process all tags. But when a
specific tag is fetched (or the refspec contains refs/tags/) commits only
reachable by tags won't be searched for submodule commits, which is a bug.

Fix that by moving the code outside the if/else construct to handle new
tags just like any other ref. The performance impact of adding tags that
most of the time lie on a branch which is checked anyway for new submodule
commit should be minimal, as since 6859de4 (fetch: avoid quadratic loop
checking for updated submodules) all ref-tips are collected first and then
fed to a single rev-list.

Spotted-by: Jeff King <peff@peff.net>
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: use newer curl options for setting credentialsJeff King Fri, 13 Apr 2012 06:19:25 +0000 (02:19 -0400)

http: use newer curl options for setting credentials

We give the username and password to curl by sticking them
in a buffer of the form "user:pass" and handing the result
to CURLOPT_USERPWD. Since curl 7.19.1, there is a split
mechanism, where you can specify each element individually.

This has the advantage that a username can contain a ":"
character. It also is less code for us, since we can hand
our strings over to curl directly. And since curl 7.17.0 and
higher promise to copy the strings for us, we we don't even
have to worry about memory ownership issues.

Unfortunately, we have to keep the ugly code for old curl
around, but as it is now nicely #if'd out, we can easily get
rid of it when we decide that 7.19.1 is "old enough".

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

http: clean up leak in init_curl_http_authJeff King Fri, 13 Apr 2012 06:18:35 +0000 (02:18 -0400)

http: clean up leak in init_curl_http_auth

When we have a credential to give to curl, we must copy it
into a "user:pass" buffer and then hand the buffer to curl.
Old versions of curl did not copy the buffer, and we were
expected to keep it valid. Newer versions of curl will copy
the buffer.

Our solution was to use a strbuf and detach it, giving
ownership of the resulting buffer to curl. However, this
meant that we were leaking the buffer on newer versions of
curl, since curl was just copying it and throwing away the
string we passed. Furthermore, when we replaced a
credential (e.g., because our original one was rejected), we
were also leaking on both old and new versions of curl.

This got even worse in the last patch, which started
replacing the credential (and thus leaking) on every http
request.

Instead, let's use a static buffer to make the ownership
more clear and less leaky. We already keep a static "struct
credential", so we are only handling a single credential at
a time, anyway.

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

Fix httpd tests that broke when non-ff push advice... Christopher Tiwald Thu, 12 Apr 2012 17:56:28 +0000 (13:56 -0400)

Fix httpd tests that broke when non-ff push advice changed

Signed-off-by: Christopher Tiwald <christiwald@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n: Add Danish team (da) to list of teamsByrial Jensen Wed, 11 Apr 2012 00:11:12 +0000 (02:11 +0200)

l10n: Add Danish team (da) to list of teams

l10n: New da.po file with 0 translationsByrial Jensen Tue, 10 Apr 2012 16:50:59 +0000 (18:50 +0200)

l10n: New da.po file with 0 translations

blame: accept --need-minimalJunio C Hamano Wed, 11 Apr 2012 20:08:08 +0000 (13:08 -0700)

blame: accept --need-minimal

Between v1.7.1 and v1.7.2, 582aa00bdffb switched the default "diff"
invocation not to use XDF_NEED_MINIMAL, but this breaks "git blame"
rather badly.

Allow the command line option to ask for an extra careful matching.

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

gc: do not explode objects which will be immediately... Jeff King Sat, 7 Apr 2012 10:30:09 +0000 (06:30 -0400)

gc: do not explode objects which will be immediately pruned

When we pack everything into one big pack with "git repack
-Ad", any unreferenced objects in to-be-deleted packs are
exploded into loose objects, with the intent that they will
be examined and possibly cleaned up by the next run of "git
prune".

Since the exploded objects will receive the mtime of the
pack from which they come, if the source pack is old, those
loose objects will end up pruned immediately. In that case,
it is much more efficient to skip the exploding step
entirely for these objects.

This patch teaches pack-objects to receive the expiration
information and avoid writing these objects out. It also
teaches "git gc" to pass the value of gc.pruneexpire to
repack (which in turn learns to pass it along to
pack-objects) so that this optimization happens
automatically during "git gc" and "git gc --auto".

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: modernise style: more uses of test_line_countStefano Lattarini Wed, 11 Apr 2012 11:24:01 +0000 (13:24 +0200)

tests: modernise style: more uses of test_line_count

Prefer:

test_line_count <OP> COUNT FILE

over:

test $(wc -l <FILE) <OP> COUNT

(or similar usages) in several tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

unpack-trees: plug minor memory leakRené Scharfe Tue, 6 Mar 2012 19:37:23 +0000 (20:37 +0100)

unpack-trees: plug minor memory leak

The allocations made by unpack_nondirectories() using create_ce_entry()
are never freed.

In the non-merge case, we duplicate them using add_entry() and later
only look at the first allocated element (src[0]), perhaps even only
by mistake. Split out the actual addition from add_entry() into the
new helper do_add_entry() and call this non-duplicating function
instead of add_entry() to avoid the leak.

Valgrind reports this for the command "git archive v1.7.9" without
the patch:

==13372== LEAK SUMMARY:
==13372== definitely lost: 230,986 bytes in 2,325 blocks
==13372== indirectly lost: 0 bytes in 0 blocks
==13372== possibly lost: 98 bytes in 1 blocks
==13372== still reachable: 2,259,198 bytes in 3,243 blocks
==13372== suppressed: 0 bytes in 0 blocks

And with the patch applied:

==13375== LEAK SUMMARY:
==13375== definitely lost: 65 bytes in 1 blocks
==13375== indirectly lost: 0 bytes in 0 blocks
==13375== possibly lost: 0 bytes in 0 blocks
==13375== still reachable: 2,364,417 bytes in 3,245 blocks
==13375== suppressed: 0 bytes in 0 blocks

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

unpack-trees: don't perform any index operation if... René Scharfe Tue, 10 Apr 2012 18:55:58 +0000 (20:55 +0200)

unpack-trees: don't perform any index operation if we're not merging

src[0] points to the index entry in the merge case and to the first
tree to unpack in the non-merge case. We only want to mark the index
entry, so check first if we're merging.

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

l10n: Updated pt_PT languageMarco Sousa Tue, 10 Apr 2012 22:04:30 +0000 (00:04 +0200)

l10n: Updated pt_PT language

remote-curl: main test case for the OS command line... Ivan Todoroski Mon, 2 Apr 2012 15:17:03 +0000 (17:17 +0200)

remote-curl: main test case for the OS command line overflow

This is main test case for the original problem that triggered this
patch series. We create a repo with 50k tags and then test whether
git-clone over the smart HTTP protocol succeeds.

Note that we construct the repo in a slightly different way than the
original script used to reproduce the problem. This is because the
original script just created 50k tags all pointing to the same commit,
so if there was a bug where remote-curl.c was not passing all the refs
to fetch-pack we wouldn't know. The clone would succeed even if only one
tag was passed, because all the other tags were pointing at the same SHA
and would be considered present.

Instead we create a repo with 50k independent (dangling) commits and
then tag each of those commits with a unique tag. This way if one of the
tags is not given to fetch-pack, later stages of the clone would
complain about it.

This allows us to test both that the command line overflow was fixed, as
well as that it was fixed in a way that doesn't leave out any of the
refs.

Signed-off-by: Ivan Todoroski <grnch@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: test cases for the new --stdin optionIvan Todoroski Mon, 2 Apr 2012 15:16:24 +0000 (17:16 +0200)

fetch-pack: test cases for the new --stdin option

These test cases focus only on testing the parsing of refs on stdin,
without bothering with the rest of the fetch-pack machinery. We pass in
the refs using different combinations of command line and stdin and then
we watch fetch-pack's stdout to see whether it prints all the refs we
specified (but we ignore their order).

Signed-off-by: Ivan Todoroski <grnch@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: send the refs to fetch-pack on stdinIvan Todoroski Mon, 2 Apr 2012 15:14:44 +0000 (17:14 +0200)

remote-curl: send the refs to fetch-pack on stdin

Now that we can throw an arbitrary number of refs at fetch-pack using
its --stdin option, we use it in the remote-curl helper to bypass the
OS command line length limit.

Signed-off-by: Ivan Todoroski <grnch@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: tighten parsing of datarefsPete Wyckoff Sat, 7 Apr 2012 22:59:20 +0000 (18:59 -0400)

fast-import: tighten parsing of datarefs

The syntax for the use of mark references in fast-import
demands either a SP (space) or LF (end-of-line) after
a mark reference. Fast-import does not complain when garbage
appears after a mark reference in some cases.

Factor out parsing of mark references and complain if
errant characters are found. Also be a little more careful
when parsing "inline" and SHA1s, complaining if extra
characters appear or if the form of the dataref is unrecognized.

Buggy input can cause fast-import to produce the wrong output,
silently, without error. This makes it difficult to track
down buggy generators of fast-import streams. An example is
seen in the last line of this commit command:

commit refs/heads/S2
committer Name <name@example.com> 1112912893 -0400
data <<COMMIT
commit message
COMMIT
from :1M 100644 :103 hello.c

It is missing a newline and should be:

[...]
from :1
M 100644 :103 hello.c

What fast-import does is to produce a commit with the same
contents for hello.c as in refs/heads/S2^. What the buggy
program was expecting was the contents of blob :103. While
the resulting commit graph looked correct, the contents in
some commits were wrong.

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

Merge branch 'maint-1.7.9' into maintJunio C Hamano Tue, 10 Apr 2012 19:44:58 +0000 (12:44 -0700)

Merge branch 'maint-1.7.9' into maint

* maint-1.7.9:

Merge branch 'maint-1.7.8' into maint-1.7.9Junio C Hamano Tue, 10 Apr 2012 19:44:45 +0000 (12:44 -0700)

Merge branch 'maint-1.7.8' into maint-1.7.9

* maint-1.7.8:
Documentation/gitweb: trivial English fixes
fetch/receive: remove over-pessimistic connectivity check

test-subprocess: fix segfault without argumentsRené Scharfe Tue, 10 Apr 2012 19:07:34 +0000 (21:07 +0200)

test-subprocess: fix segfault without arguments

Check if we even have a parameter before checking its value. Running
this command without any arguments may not make a lot of sense, but
reacting with a segmentation fault is unduly harsh.

While we're at it, avoid casting argv by declaring it const right away.

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

submodule: fix prototype of gitmodules_configRené Scharfe Tue, 10 Apr 2012 19:10:26 +0000 (21:10 +0200)

submodule: fix prototype of gitmodules_config

Add void to make it match its definition in submodule.c.

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

rev-parse --show-prefix: add in trailing newlineRoss Lagerwall Mon, 9 Apr 2012 13:27:56 +0000 (15:27 +0200)

rev-parse --show-prefix: add in trailing newline

Print out a trailing newline when --show-prefix is run with cwd
at the top level of the tree which results in an empty prefix.
Behavior is now like --show-cdup.

Fixes an expected failure in t1501.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix http auth with multiple curl handlesJeff King Tue, 10 Apr 2012 09:53:40 +0000 (11:53 +0200)

fix http auth with multiple curl handles

HTTP authentication is currently handled by get_refs and fetch_ref, but
not by fetch_object, fetch_pack or fetch_alternates. In the
single-threaded case, this is not an issue, since get_refs is always
called first. It recognigzes the 401 and prompts the user for
credentials, which will then be used subsequently.

If the curl multi interface is used, however, only the multi handle used
by get_refs will have credentials configured. Requests made by other
handles fail with an authentication error.

Fix this by setting CURLOPT_USERPWD whenever a slot is requested.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http auth fails with multiple curl handlesClemens Buchacher Tue, 10 Apr 2012 09:53:39 +0000 (11:53 +0200)

http auth fails with multiple curl handles

Create a repo with multiple loose objects in order to demonstrate http
authentication breakage.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i continue: don't skip commits that only change... John Keeping Sat, 7 Apr 2012 10:20:53 +0000 (11:20 +0100)

rebase -i continue: don't skip commits that only change submodules

When git-rebase--interactive stops due to a conflict and the only change
to be committed is in a submodule, the test for whether there is
anything to be committed ignores the staged submodule change. This
leads rebase to skip creating the commit for the change.

While unstaged submodule changes should be ignored to avoid needing to
update submodules during a rebase, it is safe to remove the
--ignore-submodules option to diff-index because --cached ensures that
it is only checking the index. This was discussed in [1] and a test is
included to ensure that unstaged changes are still ignored correctly.

[1] http://thread.gmane.org/gmane.comp.version-control.git/188713

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

Avoid bug in Solaris xpg4/sed as used in submoduleBen Walton Mon, 9 Apr 2012 20:08:02 +0000 (16:08 -0400)

Avoid bug in Solaris xpg4/sed as used in submodule

The sed provided by Solaris in /usr/xpg4/bin has a bug whereby an
unanchored regex using * for zero or more repetitions sees two
separate matches fed to the substitution engine in some cases.

This is evidenced by:

$ for sed in /usr/xpg4/bin/sed /usr/bin/sed /opt/csw/gnu/sed; do \
echo 'ab' | $sed -e 's|[a]*|X|g'; \
done
XXbX
XbX
XbX

This bug was triggered during a git submodule clone operation as
exercised in the setup stage of t5526-fetch-submodules when using the
default SANE_TOOL_PATH for Solaris. It led to paths such as
..../.. being used in the submodule .git gitdir reference.

Using the expression 's|\([^/]*\(/*\)\)|..\2|g' provides the desired
result with all three three tested sed implementations but is harder
to read. As we do not need to handle fully qualified paths though,
the expression could actually be [^/]+ which isn't properly handled
either. Instead, use [^/][^/]*, as suggested by Andreas Schwab, which
works on all three tested sed implementations.

The new expression is semantically different than the original one.
It will not place a leading '..' on a fully qualified path as the
original expression did. All of the paths being passed through this
regex are relative and did not rely on this behaviour so it's a safe
change.

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

Merge branch 'jc/maint-verify-objects-remove-pessimism... Junio C Hamano Mon, 9 Apr 2012 20:43:16 +0000 (13:43 -0700)

Merge branch 'jc/maint-verify-objects-remove-pessimism' into maint-1.7.8

* jc/maint-verify-objects-remove-pessimism:
fetch/receive: remove over-pessimistic connectivity check

Merge branch 'dw/gitweb-doc-grammo' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:42:56 +0000 (13:42 -0700)

Merge branch 'dw/gitweb-doc-grammo' into maint-1.7.8

* dw/gitweb-doc-grammo:
Documentation/gitweb: trivial English fixes

Merge branch 'tr/cache-tree' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:40:32 +0000 (13:40 -0700)

Merge branch 'tr/cache-tree' into maint-1.7.8

* tr/cache-tree:
t0090: be prepared that 'wc -l' writes leading blanks
reset: update cache-tree data when appropriate
commit: write cache-tree data when writing index anyway
Refactor cache_tree_update idiom from commit
Test the current state of the cache-tree optimization
Add test-scrap-cache-tree

Merge branch 'cb/maint-t5541-make-server-port-portable... Junio C Hamano Mon, 9 Apr 2012 20:38:41 +0000 (13:38 -0700)

Merge branch 'cb/maint-t5541-make-server-port-portable' into maint-1.7.8

* cb/maint-t5541-make-server-port-portable:
t5541: check error message against the real port number used
remote-curl: Fix push status report when all branches fail

Merge branch 'cn/maint-rev-list-doc' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:36:44 +0000 (13:36 -0700)

Merge branch 'cn/maint-rev-list-doc' into maint-1.7.8

* cn/maint-rev-list-doc:
Documentation: use {asterisk} in rev-list-options.txt when needed

Merge branch 'tr/maint-bundle-boundary' into maint... Junio C Hamano Mon, 9 Apr 2012 20:36:26 +0000 (13:36 -0700)

Merge branch 'tr/maint-bundle-boundary' into maint-1.7.8

* tr/maint-bundle-boundary:
bundle: keep around names passed to add_pending_object()
t5510: ensure we stay in the toplevel test dir
t5510: refactor bundle->pack conversion

Merge branch 'tr/maint-bundle-long-subject' into maint... Junio C Hamano Mon, 9 Apr 2012 20:36:20 +0000 (13:36 -0700)

Merge branch 'tr/maint-bundle-long-subject' into maint-1.7.8

* tr/maint-bundle-long-subject:
t5704: match tests to modern style
strbuf: improve strbuf_get*line documentation
bundle: use a strbuf to scan the log for boundary commits
bundle: put strbuf_readline_fd in strbuf.c with adjustments

Merge branch 'ph/rerere-doc' into maint-1.7.8Junio C Hamano Mon, 9 Apr 2012 20:34:09 +0000 (13:34 -0700)

Merge branch 'ph/rerere-doc' into maint-1.7.8

* ph/rerere-doc:
rerere: Document 'rerere remaining'

Git 1.7.10 v1.7.10Junio C Hamano Fri, 6 Apr 2012 17:47:58 +0000 (10:47 -0700)

Git 1.7.10

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

spec: add missing build dependencyFelipe Contreras Fri, 6 Apr 2012 12:22:30 +0000 (15:22 +0300)

spec: add missing build dependency

Otherwise:

/usr/bin/perl Makefile.PL PREFIX='/opt/git' INSTALL_BASE=''
Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: ...) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
make[1]: *** [perl.mak] Error 2
make: *** [perl/perl.mak] Error 2

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

run-command: treat inaccessible directories as ENOENTJeff King Fri, 30 Mar 2012 07:52:18 +0000 (03:52 -0400)

run-command: treat inaccessible directories as ENOENT

When execvp reports EACCES, it can be one of two things:

1. We found a file to execute, but did not have
permissions to do so.

2. We did not have permissions to look in some directory
in the $PATH.

In the former case, we want to consider this a
permissions problem and report it to the user as such (since
getting this for something like "git foo" is likely a
configuration error).

In the latter case, there is a good chance that the
inaccessible directory does not contain anything of
interest. Reporting "permission denied" is confusing to the
user (and prevents our usual "did you mean...?" lookup). It
also prevents git from trying alias lookup, since we do so
only when an external command does not exist (not when it
exists but has an error).

This patch detects EACCES from execvp, checks whether we are
in case (2), and if so converts errno to ENOENT. This
behavior matches that of "bash" (but not of simpler shells
that use execvp more directly, like "dash").

Test stolen from Junio.

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

compat/mingw.[ch]: Change return type of exec functions... Ramsay Jones Thu, 5 Apr 2012 17:48:46 +0000 (18:48 +0100)

compat/mingw.[ch]: Change return type of exec functions to int

The POSIX standard specifies a return type of int for all six exec
functions. In addition, all exec functions return -1 on error, and
simply do not return on success. However, the current emulation of
the exec functions on mingw are declared with a void return type.

This would cause a problem should any code attempt to call the
exec function in a non-void context. In particular, if an exec
function were used in a conditional it would fail to compile.

In order to improve the fidelity of the emulation, we change the
return type of the mingw_execv[p] functions to int and return -1
on error.

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

push: error out when the "upstream" semantics does... Junio C Hamano Fri, 30 Mar 2012 23:07:12 +0000 (16:07 -0700)

push: error out when the "upstream" semantics does not make sense

The user can say "git push" without specifying any refspec. When using
the "upstream" semantics via the push.default configuration, the user
wants to update the "upstream" branch of the current branch, which is the
branch at a remote repository the current branch is set to integrate with,
with this command.

However, there are cases that such a "git push" that uses the "upstream"
semantics does not make sense:

- The current branch does not have branch.$name.remote configured. By
definition, "git push" that does not name where to push to will not
know where to push to. The user may explicitly say "git push $there",
but again, by definition, no branch at repository $there is set to
integrate with the current branch in this case and we wouldn't know
which remote branch to update.

- The current branch does have branch.$name.remote configured, but it
does not specify branch.$name.merge that names what branch at the
remote this branch integrates with. "git push" knows where to push in
this case (or the user may explicitly say "git push $remote" to tell us
where to push), but we do not know which remote branch to update.

- The current branch does have its remote and upstream branch configured,
but the user said "git push $there", where $there is not the remote
named by "branch.$name.remote". By definition, no branch at repository
$there is set to integrate with the current branch in this case, and
this push is not meant to update any branch at the remote repository
$there.

The first two cases were already checked correctly, but the third case was
not checked and we ended up updating the branch named branch.$name.merge
at repository $there, which was totally bogus.

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

add--interactive: ignore unmerged entries in patch... Jeff King Thu, 5 Apr 2012 12:30:08 +0000 (08:30 -0400)

add--interactive: ignore unmerged entries in patch mode

When "add -p" sees an unmerged entry, it shows the combined
diff and then immediately skips the hunk. This can be
confusing in a variety of ways, depending on whether there
are other changes to stage (in which case you get the
superfluous combined diff output in between other hunks) or
not (in which case you get the combined diff and the program
exits immediately, rather than seeing "No changes").

The current behavior was not planned, and is just what the
implementation happens to do. Instead, let's explicitly
remove unmerged entries from our list of modified files, and
print a warning that we are ignoring them.

We can cheaply find which entries are unmerged by adding
"--raw" output to the "diff-files --numstat" we already run.
There is one non-obvious thing we must change when parsing
this combined output. Before this patch, when we saw a
numstat line for a file that did not have index changes, we
would create a new record with 'unchanged' in the 'INDEX'
field. Because "--raw" comes before "--numstat", we must
move this special-case down to the raw-line case (and it is
sufficient to move it rather than handle it in both places,
since any file which has a --numstat will also have a --raw
entry).

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

Documentation/git-commit: rephrase the "initial-ness... Junio C Hamano Tue, 3 Apr 2012 23:41:21 +0000 (16:41 -0700)

Documentation/git-commit: rephrase the "initial-ness" of templates

The description of "commit -t <file>" said the file is used "as the
initial version" of the commit message, but in the context of an SCM,
"version" is a loaded word that can needlesslyl confuse readers.

Explain the purpose of the mechanism without using "version".

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

Git 1.7.10-rc4 v1.7.10-rc4Junio C Hamano Tue, 3 Apr 2012 16:25:49 +0000 (09:25 -0700)

Git 1.7.10-rc4

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

Merge branch 'pt/gitk'Junio C Hamano Mon, 2 Apr 2012 22:06:25 +0000 (15:06 -0700)

Merge branch 'pt/gitk'

* pt/gitk:
gitk: fix setting font display with new tabbed dialog layout.
gitk: fix tabbed preferences construction when using tcl 8.4

fetch-pack: new --stdin option to read refs from stdinIvan Todoroski Mon, 2 Apr 2012 15:13:48 +0000 (17:13 +0200)

fetch-pack: new --stdin option to read refs from stdin

If a remote repo has too many tags (or branches), cloning it over the
smart HTTP transport can fail because remote-curl.c puts all the refs
from the remote repo on the fetch-pack command line. This can make the
command line longer than the global OS command line limit, causing
fetch-pack to fail.

This is especially a problem on Windows where the command line limit is
orders of magnitude shorter than Linux. There are already real repos out
there that msysGit cannot clone over smart HTTP due to this problem.

Here is an easy way to trigger this problem:

git init too-many-refs
cd too-many-refs
echo bla > bla.txt
git add .
git commit -m test
sha=$(git rev-parse HEAD)
tag=$(perl -e 'print "bla" x 30')
for i in `seq 50000`; do
echo $sha refs/tags/$tag-$i >> .git/packed-refs
done

Then share this repo over the smart HTTP protocol and try cloning it:

$ git clone http://localhost/.../too-many-refs/.git
Cloning into 'too-many-refs'...
fatal: cannot exec 'fetch-pack': Argument list too long

50k tags is obviously an absurd number, but it is required to
demonstrate the problem on Linux because it has a much more generous
command line limit. On Windows the clone fails with as little as 500
tags in the above loop, which is getting uncomfortably close to the
number of tags you might see in real long lived repos.

This is not just theoretical, msysGit is already failing to clone our
company repo due to this. It's a large repo converted from CVS, nearly
10 years of history.

Four possible solutions were discussed on the Git mailing list (in no
particular order):

1) Call fetch-pack multiple times with smaller batches of refs.

This was dismissed as inefficient and inelegant.

2) Add option --refs-fd=$n to pass a an fd from where to read the refs.

This was rejected because inheriting descriptors other than
stdin/stdout/stderr through exec() is apparently problematic on Windows,
plus it would require changes to the run-command API to open extra
pipes.

3) Add option --refs-from=$tmpfile to pass the refs using a temp file.

This was not favored because of the temp file requirement.

4) Add option --stdin to pass the refs on stdin, one per line.

In the end this option was chosen as the most efficient and most
desirable from scripting perspective.

There was however a small complication when using stdin to pass refs to
fetch-pack. The --stateless-rpc option to fetch-pack also uses stdin for
communication with the remote server.

If we are going to sneak refs on stdin line by line, it would have to be
done very carefully in the presence of --stateless-rpc, because when
reading refs line by line we might read ahead too much data into our
buffer and eat some of the remote protocol data which is also coming on
stdin.

One way to solve this would be to refactor get_remote_heads() in
fetch-pack.c to accept a residual buffer from our stdin line parsing
above, but this function is used in several places so other callers
would be burdened by this residual buffer interface even when most of
them don't need it.

In the end we settled on the following solution:

If --stdin is specified without --stateless-rpc, fetch-pack would read
the refs from stdin one per line, in a script friendly format.

However if --stdin is specified together with --stateless-rpc,
fetch-pack would read the refs from stdin in packetized format
(pkt-line) with a flush packet terminating the list of refs. This way we
can read the exact number of bytes that we need from stdin, and then
get_remote_heads() can continue reading from the same fd without losing
a single byte of remote protocol data.

This way the --stdin option only loses generality and scriptability when
used together with --stateless-rpc, which is not easily scriptable
anyway because it also uses pkt-line when talking to the remote server.

Signed-off-by: Ivan Todoroski <grnch@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.9.6Junio C Hamano Mon, 2 Apr 2012 20:09:21 +0000 (13:09 -0700)

Sync with 1.7.9.6

Git 1.7.9.6 v1.7.9.6Junio C Hamano Mon, 2 Apr 2012 20:07:58 +0000 (13:07 -0700)

Git 1.7.9.6

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

Merge branch 'jc/maint-merge-autoedit' into maintJunio C Hamano Mon, 2 Apr 2012 19:56:35 +0000 (12:56 -0700)

Merge branch 'jc/maint-merge-autoedit' into maint

* jc/maint-merge-autoedit:
merge: backport GIT_MERGE_AUTOEDIT support

gitk: fix setting font display with new tabbed dialog... Pat Thoyts Sun, 1 Apr 2012 22:00:52 +0000 (23:00 +0100)

gitk: fix setting font display with new tabbed dialog layout.

The changes to the dialog window tree broke the preview of the selected
font on the button. This corrects that issue.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: fix tabbed preferences construction when using... Pat Thoyts Sun, 1 Apr 2012 22:00:51 +0000 (23:00 +0100)

gitk: fix tabbed preferences construction when using tcl 8.4

In 8.5 the incr command creates the target variable if it does not exist
but in 8.4 using incr on a non-existing variable raises an error. Ensure
we have created our counter variable when creating the tabbed dialog for
non-themed preferences.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://github.com/git-l10n/git-poJunio C Hamano Mon, 2 Apr 2012 16:19:47 +0000 (09:19 -0700)

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

Portuguese Portuguese translations from Marco Sousa via Jiang Xin

* 'master' of git://github.com/git-l10n/git-po:
l10n: Add the Dutch translation team and initialize nl.po
l10n: Inital Portuguese Portugal language (pt_PT)
l10n: Improve zh_CN translation for Git 1.7.10-rc3

l10n: Add the Dutch translation team and initialize... Vincent van Ravesteijn Mon, 2 Apr 2012 12:14:08 +0000 (14:14 +0200)

l10n: Add the Dutch translation team and initialize nl.po

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>

l10n: Inital Portuguese Portugal language (pt_PT)Marco Sousa Sat, 31 Mar 2012 15:51:45 +0000 (17:51 +0200)

l10n: Inital Portuguese Portugal language (pt_PT)

Signed-off-by: Marco Sousa <marcomsousa@gmail.com>

git-commit.txt: clarify -t requires editing messageAdam Monsen Sat, 31 Mar 2012 19:28:15 +0000 (12:28 -0700)

git-commit.txt: clarify -t requires editing message

Make it clear that, when using commit --template, the message *must* be
changed or the commit will be aborted.

Helped-by: Junio C Hamano <gitster@pobox.com>
Helped-by: Ivan Heffner <iheffner@gmail.com>
Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sat, 31 Mar 2012 03:25:55 +0000 (20:25 -0700)

Merge branch 'maint'

* maint:
string-list: document that string_list_insert() inserts unique strings

commit: rephrase the error when user did not touch... Junio C Hamano Fri, 30 Mar 2012 19:14:33 +0000 (12:14 -0700)

commit: rephrase the error when user did not touch templated log message

When the user exited editor without editing the commit log template given
by "git commit -t <template>", the commit was aborted (correct) with an
error message that said "due to empty commit message" (incorrect).

This was because the original template support was done by piggybacking on
the check to detect an empty log message. Split the codepaths into two
independent checks to clarify the error.

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

commit: do not trigger bogus "has templated message... Junio C Hamano Fri, 30 Mar 2012 18:30:59 +0000 (11:30 -0700)

commit: do not trigger bogus "has templated message edited" check

When "-t template" and "-F msg" options are both given (or worse yet,
there is "commit.template" configuration but a message is given in some
other way), the documentation says that template is ignored. However,
the "has the user edited the message?" check still used the contents of
the template file as the basis of the emptyness check.

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

t7501: test the right kind of breakageJunio C Hamano Fri, 30 Mar 2012 18:04:08 +0000 (11:04 -0700)

t7501: test the right kind of breakage

These tests try to run "git commit" with various "forbidden" combinations
of options and expect the command to fail, but they do so without having
any change added to the index. We wouldn't be able to catch breakages
that would allow these combinations by mistake with them because the
command will fail with "nothing to commit" anyway.

Make sure we have something added to the index before running the command.

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

http-backend: respect existing GIT_COMMITTER_* variablesJeff King Fri, 30 Mar 2012 07:01:30 +0000 (03:01 -0400)

http-backend: respect existing GIT_COMMITTER_* variables

The http-backend program sets default GIT_COMMITTER_NAME and
GIT_COMMITTER_EMAIL variables based on the REMOTE_USER and
REMOTE_ADDR variables provided by the webserver. However, it
unconditionally overwrites any existing GIT_COMMITTER
variables, which may have been customized by site-specific
code in the webserver (or in a script wrapping http-backend).

Let's leave those variables intact if they already exist,
assuming that any such configuration was intentional. There
is a slight chance of a regression if somebody has set
GIT_COMMITTER_* for the entire webserver, not intending it
to leak through http-backend. We could protect against this
by passing the information in alternate variables. However,
it seems unlikely that anyone will care about that
regression, and there is value in the simplicity of using
the common variable names that are used elsewhere in git.

While we're tweaking the environment-handling in
http-backend, let's switch it to use argv_array to handle
the list of variables. That makes the memory management much
simpler.

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

string-list: document that string_list_insert() inserts... Heiko Voigt Thu, 29 Mar 2012 07:21:22 +0000 (09:21 +0200)

string-list: document that string_list_insert() inserts unique strings

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

l10n: Improve zh_CN translation for Git 1.7.10-rc3Jiang Xin Fri, 30 Mar 2012 02:55:34 +0000 (10:55 +0800)

l10n: Improve zh_CN translation for Git 1.7.10-rc3

Improvements of zh_CN translations:

- Update translation for msg "Changes not staged for commit:".
- Remove unnecessary leading spaces for some messages.

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

config: remove useless assignmentRené Scharfe Wed, 28 Mar 2012 20:18:37 +0000 (22:18 +0200)

config: remove useless assignment

v1.7.9-8-g270a344 (config: stop using config_exclusive_filename) replaced
config_exclusive_filename with given_config_file. In one case this
resulted in a self-assignment, which is reported by clang as a warning.
Remove the useless code.

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

Git 1.7.10-rc3 v1.7.10-rc3Junio C Hamano Wed, 28 Mar 2012 17:51:00 +0000 (10:51 -0700)

Git 1.7.10-rc3

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

correct a few doubled-word nits in comments and documen... Jim Meyering Wed, 28 Mar 2012 08:45:36 +0000 (10:45 +0200)

correct a few doubled-word nits in comments and documentation

Found by running this command:
$ git ls-files -z|xargs -0 perl -0777 -n \
-e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
-e ' {' \
-e ' $n = ($` =~ tr/\n/\n/ + 1);' \
-e ' ($v = $&) =~ s/\n/\\n/g;' \
-e ' print "$ARGV:$n:$v\n";' \
-e ' }'

Why not just git grep -E ...?
That wouldn't work then the doubled words are separated by a newline.
This is derived from a Makefile syntax-check rule in gnulib's maint.mk:
http://git.sv.gnu.org/cgit/gnulib.git/tree/top/maint.mk

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

correct spelling: an URL -> a URLJim Meyering Wed, 28 Mar 2012 08:41:54 +0000 (10:41 +0200)

correct spelling: an URL -> a URL

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

l10n updates for Git 1.7.10-rc1Junio C Hamano Tue, 27 Mar 2012 15:39:18 +0000 (08:39 -0700)

l10n updates for Git 1.7.10-rc1

* 'master' of git://github.com/git-l10n/git-po:
Add url of Swedish l10n team in TEAMS file
l10n: Review zh_CN translation for Git 1.7.10-rc1
Update Swedish translation (724t0f0u).
l10n: Update zh_CN translation for Git 1.7.10-rc1
l10n: Update git.pot (1 new message)

tests: unset COLUMNS inherited from environmentZbigniew Jędrzejewski-Szmek Tue, 27 Mar 2012 06:22:02 +0000 (08:22 +0200)

tests: unset COLUMNS inherited from environment

$COLUMNS must be unset to not interfere with the tests. The tests
already ignore the terminal size because output is redirected to a
file, but COLUMNS overrides terminal size detection and changes the
test output away from the standard 80.

Reported-by: Jeff King <peff@peff.net>
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add url of Swedish l10n team in TEAMS fileJiang Xin Tue, 27 Mar 2012 09:11:34 +0000 (17:11 +0800)

Add url of Swedish l10n team in TEAMS file

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

l10n: Review zh_CN translation for Git 1.7.10-rc1Jiang Xin Tue, 27 Mar 2012 06:46:11 +0000 (14:46 +0800)

l10n: Review zh_CN translation for Git 1.7.10-rc1

Overall review of the zh_CN translation:

- Distinguish the translations of index and stage, though they are the
same thing.

- Many other fixes, e.g., add the lost periods at the end of translated
sentences.

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

Update Swedish translation (724t0f0u).Peter Krefting Thu, 15 Mar 2012 09:47:06 +0000 (10:47 +0100)

Update Swedish translation (724t0f0u).

- Update for 1.7.10-rc1.
- Add a missing -e when generaring the "Untracked files" message.
- Fixed some wordings after playing with the localized version.

clean up struct ref's nonfastforward fieldJeff King Mon, 26 Mar 2012 19:51:50 +0000 (15:51 -0400)

clean up struct ref's nonfastforward field

Each ref structure contains a "nonfastforward" field which
is set during push to show whether the ref rewound history.
Originally this was a single bit, but it was changed in
f25950f (push: Provide situational hints for non-fast-forward
errors) to an enum differentiating a non-ff of the current
branch versus another branch.

However, we never actually set the member according to the
enum values, nor did we ever read it expecting anything but
a boolean value. But we did use the side effect of declaring
the enum constants to store those values in a totally
different integer variable. The code as-is isn't buggy, but
the enum declaration inside "struct ref" is somewhat
misleading.

Let's convert nonfastforward back into a single bit, and
then define the NON_FF_* constants closer to where they
would be used (they are returned via the "int *nonfastforward"
parameter to transport_push, so we can define them there).

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

Update draft release notes to 1.7.10Junio C Hamano Mon, 26 Mar 2012 19:38:34 +0000 (12:38 -0700)

Update draft release notes to 1.7.10

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

Sync with 1.7.9.5Junio C Hamano Mon, 26 Mar 2012 19:30:51 +0000 (12:30 -0700)

Sync with 1.7.9.5

Git 1.7.9.5 v1.7.9.5Junio C Hamano Mon, 26 Mar 2012 19:23:34 +0000 (12:23 -0700)

Git 1.7.9.5

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

Merge branch 'jn/maint-fast-import-empty-ls' into maintJunio C Hamano Mon, 26 Mar 2012 19:10:25 +0000 (12:10 -0700)

Merge branch 'jn/maint-fast-import-empty-ls' into maint

* jn/maint-fast-import-empty-ls:
fast-import: don't allow 'ls' of path with empty components
fast-import: leakfix for 'ls' of dirty trees

Merge branch 'ph/rerere-doc' into maintJunio C Hamano Mon, 26 Mar 2012 19:10:12 +0000 (12:10 -0700)

Merge branch 'ph/rerere-doc' into maint

* ph/rerere-doc:
rerere: Document 'rerere remaining'

Merge branch 'ms/maint-config-error-at-eol-linecount... Junio C Hamano Mon, 26 Mar 2012 19:10:05 +0000 (12:10 -0700)

Merge branch 'ms/maint-config-error-at-eol-linecount' into maint

* ms/maint-config-error-at-eol-linecount:
config: report errors at the EOL with correct line number

grep doc: add --break / --heading / -W to synopsisMark Lodato Mon, 26 Mar 2012 02:41:42 +0000 (22:41 -0400)

grep doc: add --break / --heading / -W to synopsis

All of the other options were included in the synopsis, so it makes
sense to include these as well.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: improve description of GIT_EDITOR and... Rodrigo Silva (MestreLion) Fri, 23 Mar 2012 12:38:42 +0000 (12:38 +0000)

Documentation: improve description of GIT_EDITOR and preference order

Previously GIT_EDITOR was not listed in git(1) "Environment Variables" section,
which could be very confusing to users. Include it in "other" subsection along
with a link to git-var(1), since that is the page that fully describes all
places where editor can be set and also their preference order.

Also, git-var(1) did not say that hardcoded fallback 'vi' may have been changed
at build time. A user could be puzzled if 'nano' pops up even when none of the
mentioned environment vars or config.editor are set. Clarify this.

Ideally, the build system should be changed to reflect the chosen fallback
editor when creating the man pages. Not sure if that is even possible though.

Signed-off-by: Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

documentation: fix alphabetic ordered list for git... Nelson Benitez Leon Fri, 23 Mar 2012 11:31:39 +0000 (12:31 +0100)

documentation: fix alphabetic ordered list for git-rebase man page

An alphabetic ordered list (a.) is converted to numerical in
the man page (1.) so context comments naming 'a' were confusing,
fix that by not using ordered list notation for 'a' anb 'b' items.

Signed-off-by: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

combine-diff: fix loop index underflowRené Scharfe Sat, 24 Mar 2012 15:18:46 +0000 (16:18 +0100)

combine-diff: fix loop index underflow

If both la and context are zero at the start of the loop, la wraps around
and we end up reading from memory far away. Skip the loop in that case
instead.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge gitk changes from Paul Mackerras at git://ozlabs... Junio C Hamano Sat, 24 Mar 2012 08:30:30 +0000 (01:30 -0700)

Merge gitk changes from Paul Mackerras at git://ozlabs.org/~paulus/gitk

* git://ozlabs.org/~paulus/gitk:
gitk: Teach gitk to respect log.showroot
gitk: Add menu items for comparing a commit with the marked commit
gitk: Speed up resolution of short SHA1 ids
gitk: Use symbolic font names "sans" and "monospace" when available
gitk: Skip over AUTHOR/COMMIT_DATE when searching all fields
gitk: Make "git describe" output clickable, too
gitk: Fix the display of files when filtered by path
gitk: Use a tabbed dialog to edit preferences
gitk: Use "gitk: repo-top-level-dir" as window title

gitk: Teach gitk to respect log.showrootMarcus Karlsson Tue, 4 Oct 2011 20:08:13 +0000 (22:08 +0200)

gitk: Teach gitk to respect log.showroot

In early days, all projects managed by git (except for git itself) had the
product of a fairly mature development history in their first commit, and
it was deemed unnecessary clutter to show additions of these thousands of
paths as a patch.

"git log" learned to show the patch for the initial commit without requiring
--root command line option at 0f03ca9 (config option log.showroot to show
the diff of root commits, 2006-11-23).

Teach gitk to respect log.showroot.

[paulus@samba.org: Cleaned up the Tcl a bit, use --bool on the
git config call]

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Git 1.7.10-rc2 v1.7.10-rc2Junio C Hamano Fri, 23 Mar 2012 21:50:23 +0000 (14:50 -0700)

Git 1.7.10-rc2

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

.mailmap: unify various old mail addresses of gitsterJunio C Hamano Fri, 23 Mar 2012 21:40:39 +0000 (14:40 -0700)

.mailmap: unify various old mail addresses of gitster

"git shortlog -s -e" should show a single current address with this.

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