l10n: Updated pt_PT language
l10n: New da.po file with 0 translations
l10n: Add Danish team (da) to list of teams
l10n: Add the German translation team and initialize de.po

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Merge master branch for tracking l10n updates of next release

Use master branch to track l10n updates for git next release, while
use maint branch to track l10n updates for git stable version.
l10n: Update git.pot (33 new, 24 deleted messages)

Changes of po/git.pot from v1.7.10 to v1.7.10-382-g62bc8

 * 33 new l10n messages at lines:
   401, 406, 411, 416, 1602, 1780, 2753, 2766, 2774, 2782, 3403, 3408,
   3423, 3428, 3433, 3438, 3443, 3448, 3453, 3458, 3463, 3468, 3473,
   3480, 3485, 3490, 3495, 3500, 3505, 3510, 3515, 3520, 3525

 * 24 deleted l10n messages at lines:
   2740, 3351, 3356, 3371, 3376, 3381, 3386, 3391, 3396, 3401, 3406,
   3411, 3416, 3421, 3428, 3433, 3438, 3443, 3448, 3453, 3458, 3463,
   3468, 3473

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Merge maint branch for tracking l10n updates of git stable version

Use master branch to track l10n updates for git next release, while
use maint branch to track l10n updates for git stable version.
l10n: Update git.pot (2 new messages)

Changes of po/git.pot from v1.7.10 to v1.7.10-55-g868d6

 * 2 new l10n messages at lines: 1583, 2730

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
l10n: Update Simplified Chinese translation

Translate 2 new messages come from git maint branch.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Merge branch 'maint'

By Jiang Xin
* maint:
  l10n: Update Simplified Chinese translation
  l10n: Update git.pot (2 new messages)
l10n: Update Simplified Chinese translation

Translate new messages for git master branch.

 - sha1_name.c: 4 new messages.
 - builtin/push.c: 3 new messages.
 - git-submodule.sh: variable name changed from '$path' to '$sm_path'.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
diff --stat: use less columns for change counts

Number of columns required for change counts is now computed based on
the maximum number of changed lines instead of being fixed. This means
that usually a few more columns will be available for the filenames
and the graph.

The graph width logic is also modified to include enough space for
"Bin XXX -> YYY bytes".

If changes to binary files are mixed with changes to text files,
change counts are padded to take at least three columns. And the other
way around, if change counts require more than three columns, then
"Bin"s are padded to align with the change count. This way, the +-
part starts in the same column as "XXX -> YYY" part for binary files.
This makes the graph easier to parse visually thanks to the empty
column. This mimics the layout of diff --stat before this change.

Tests and the tutorial are updated to reflect the new --stat output.
This means either the removal of extra padding and/or the addition of
up to three extra characters to truncated filenames. One test is added
to check the graph alignment when a binary file change and text file
change of more than 999 lines are committed together.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
l10n: Initial German translation

Helped-by: Thomas Kuchs
Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
send-pack: show progress when isatty(2)

The send_pack_args struct has two verbosity flags: "quiet"
and "progress". Originally, if "quiet" was set, we would
tell pack-objects explicitly to be quiet, and if "progress"
was set, we would tell it to show progress. Otherwise, we
told it neither, and it relied on isatty(2) to make the
decision itself.

However, commit 01fdc21 changed the meaning of these
variables. Now both "quiet" and "!progress" instruct us to
tell pack-objects to be quiet (and a non-zero "progress"
means the same as before). This works well for transports
which call send_pack directly, as the transport code copies
transport->progress into send_pack_args->progress, and they
both have the same meaning.

However, the code path of calling "git send-pack" was left
behind. It always sets "progress" to 0, and thus always
tells pack-objects to be quiet.  We can work around this by
checking isatty(2) ourselves in the cmd_send_pack code path,
restoring the original behavior of the send-pack command.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
teach send-pack about --[no-]progress

The send_pack function gets a "progress" flag saying "yes,
definitely show progress" or "no, definitely do not show
progress". This gets set properly by transport_push when
send_pack is called directly.

However, when the send-pack command is executed separately
(as it is for the remote-curl helper), there is no way to
tell it "definitely do this". As a result, we do not
properly respect "git push --no-progress" for smart-http
remotes; you will still get progress if stderr is a tty.

This patch teaches send-pack --progress and --no-progress,
and teaches remote-curl to pass the appropriate option to
override send-pack's isatty check. This fixes the
--no-progress case above, and as a bonus, also makes "git
push --progress" work when stderr is not a tty.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t5541: test more combinations of --progress

Previously, we tested only that "push --quiet --no-progress"
was silent. However, there are many other combinations that
were not tested:

  1. no options at all (but stderr as a tty)
  2. --no-progress by itself
  3. --quiet by itself
  4. --progress (when stderr not a tty)

These are tested elsewhere for general "push", but it is
important to test them separately for http. It follows a
very different code path than git://, and options must be
relayed across a remote helper to a separate send-pack
process (and in fact cases (1), (2), and (4) have all been
broken just for http at some point in the past).

We can drop the "--quiet --no-progress" test, as it is not
really interesting (it is already handled by testing them
separately in (2) and (3) above).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
test: modernize style of t4006

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: check --[short]stat output after chmod

Add a test to check 'diff --stat' output with a text file after chmod,
and the same for a binary file. This demonstrates that text and binary
files are treated differently, which can be misleading.

While at it, add tests to check --shortstat output, too.

Reported-by: Martin Mareš <mj@ucw.cz>
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/gitweb-lib: use $PERL_PATH to run gitweb

The current code runs "perl gitweb.cgi" to test gitweb. This
will use whatever version of perl happens to be first in the
PATH. We are better off using the specific perl that the
user specified via PERL_PATH, which matches what gets put on
the #!-line of the built gitweb.cgi.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff: choose XDL_FAST_HASH code on sizeof(long) instead of __WORDSIZE

Darwin does not define __WORDSIZE, and compiles the 32-bit code path
on 64-bit systems, resulting in a totally broken git.

I could not find an alternative -- other than the platform symbols
(__x86_64__ etc.) -- that does the test in the preprocessor.  However,
we can also just test for the size of a 'long', which is what really
matters here.  Any compiler worth its salt will leave only the branch
relevant for its platform, and indeed on Linux/GCC the numbers don't
change:

 Test                                  tr/darwin-xdl-fast-hash   origin/next              origin/master
 ------------------------------------------------------------------------------------------------------------------
 4000.1: log -3000 (baseline)          0.09(0.07+0.01)           0.09(0.07+0.01) -5.5%*   0.09(0.07+0.01) -4.1%
 4000.2: log --raw -3000 (tree-only)   0.47(0.41+0.05)           0.47(0.40+0.05) -0.5%    0.45(0.38+0.06) -3.5%.
 4000.3: log -p -3000 (Myers)          1.81(1.67+0.12)           1.81(1.67+0.13) +0.3%    1.99(1.84+0.12) +10.2%***
 4000.4: log -p -3000 --histogram      1.79(1.66+0.11)           1.80(1.67+0.11) +0.4%    1.96(1.82+0.10) +9.2%***
 4000.5: log -p -3000 --patience       2.17(2.02+0.13)           2.20(2.04+0.13) +1.3%.   2.33(2.18+0.13) +7.4%***
 ------------------------------------------------------------------------------------------------------------------
 Significance hints:  '.' 0.1  '*' 0.05  '**' 0.01  '***' 0.001

Noticed-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>