unpack-file: allow output to be in $TMPDIR

The command always created the output file in the current directory,
but callers may want to have it in the directory given by $TMPDIR;
introduce -t option to do so.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Python scripts: check minimum compatible version after auditing

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Highlight the link target line in Gitweb using CSS

This is useful when a Gitweb link with a target (like #l100) refers to
a line in the last screenful of text.  Highlight the background in
yellow, and display a ⚓ character on the left.  Show the same
highlight when hovering the mouse over a line number.

Signed-off-by: Matthew Blissett <matt@blissett.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
oneway_merge(): only lstat() when told to update worktree

Although the subject line of 613f027 (read-tree -u one-way merge fix
to check out locally modified paths., 2006-05-15) mentions "read-tree
-u", it did not seem to check whether -u was in effect. Not checking
whether -u is in effect makes e.g. "read-tree --reset" lstat() the
worktree, even though the worktree stat should not matter for that
operation.

This speeds up e.g. "git reset" a little on the linux-2.6 repo (best
of five, warm cache):

        Before      After
real    0m0.288s    0m0.233s
user    0m0.190s    0m0.150s
sys     0m0.090s    0m0.080s

Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: paint known breakages in yellow

Yellow seems a more appropriate color than bold green when
considering the universal traffic lights coloring scheme, where
green conveys the impression that everything's OK, and amber that
something's not quite right.

Likewise, change the color of the summarized total number of known
breakages from bold red to the same yellow to be less alarmist and
more consistent with the above.

An earlier version of this patch used bold yellow but because these
are all long-known failures, reminding them to developers in bold
over and over does not help encouraging them to take a look at them
very much.  This iteration paints them in plain yellow instead to
make them less distracting.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: paint skipped tests in blue

Skipped tests indicate incomplete test coverage.  Whilst this is not a
test failure or other error, it's still not a complete success.

Other testsuite related software like automake, autotest and prove
seem to use blue for skipped tests, so let's follow suit.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: change info messages from yellow/brown to cyan

Now that we've adopted a "traffic lights" coloring scheme, yellow is
used for warning messages, so we need to re-color info messages to
something less alarmist.  Blue is a universal color for informational
messages; however we are using that for skipped tests in order to
align with the color schemes of other test suites.  Therefore we use
cyan which is also blue-ish, but visually distinct from blue.

This was suggested on the list a while ago and no-one raised any
objections:

    http://thread.gmane.org/gmane.comp.version-control.git/205675/focus=205966

An earlier iteration of this patch used bold cyan, but the point of
this change is to make them less alarming; let's drop the boldness.

Also paint the message to report skipping the whole thing via
GIT_SKIP_TESTS mechanism in the same color as the "info" color
that is used on the final summary line for the entire script.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: refactor mechanics of testing in a sub test-lib

This will allow us to test the test framework more thoroughly
without disrupting the top-level test metrics.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: test the test framework more thoroughly

Add 5 new full test suite runs each with a different number of
passing/failing/broken/fixed tests, in order to ensure that the
correct exit code and output are generated in each case.  As before,
these are run in a subdirectory to avoid disrupting the metrics for
the parent tests.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tests: paint unexpectedly fixed known breakages in bold red

Change color of unexpectedly fixed known breakages to bold red.  An
unexpectedly passing test indicates that the test code is somehow
broken or out of sync with the code it is testing.  Either way this is
an error which is potentially as bad as a failing test, and as such is
no longer portrayed as a pass in the output.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'as/test-tweaks' into jch

Various minor tweaks to the test framework to paint its output
lines in colors that match what they mean better.

Will merge to 'next'.

* as/test-tweaks:
  tests: paint unexpectedly fixed known breakages in bold red
  tests: test the test framework more thoroughly
  tests: refactor mechanics of testing in a sub test-lib
  tests: change info messages from yellow/brown to cyan
  tests: paint skipped tests in blue
  tests: paint known breakages in yellow
  tests: test number comes first in 'not ok $count - $message'
Merge branch 'dm/port' into jch

Will merge to 'next'.

* dm/port:
  git-compat-util.h: do not #include <sys/param.h> by default
  Generalize the inclusion of strings.h
  Detect when the passwd struct is missing pw_gecos
  Support builds when sys/param.h is missing
Merge branch 'mk/qnx' into jch

Port to QNX; we may want to rebase this on top of dm/port topic as
it also wants to use the HAVE_STRINGS_H mechanism it introduces.

Will merge to 'next'.

* mk/qnx:
  Port to QNX
  Make lock local to fetch_pack

Conflicts:
	builtin/fetch-pack.c
Merge branch 'jc/blame-no-follow' into jch

Teaches "--no-follow" option to "git blame" to disable its
whole-file rename detection.

Stalled mostly due to lack of responses.

* jc/blame-no-follow:
  blame: pay attention to --no-follow
  diff: accept --no-follow option
Merge branch 'jk/error-const-return' into jch

Help compilers' flow analysis by making it more explicit that
error() always returns -1, to reduce false "variable used
uninitialized" warnings.  Looks somewhat ugly but not too much.

Will merge to 'next'.

* jk/error-const-return:
  silence some -Wuninitialized false positives
  make error()'s constant return value more visible
Merge branch 'ap/log-mailmap' into jch

Clean up various codepaths around mailmap and teach the "log"
machinery to use it.

Will merge to 'next' after reading it over once again.

* ap/log-mailmap:
  test: Add test for --use-mailmap option
  log: Add --use-mailmap option
  pretty: Use mailmap to display username and email
  mailmap: Add mailmap structure to rev_info and pp
  mailmap: Simplify map_user() interface
  mailmap: Remove buffer length limit in map_user
  Use split_ident_line to parse author and committer

Conflicts:
	commit.h
	log-tree.c
Merge branch 'cc/no-gitk-build-dependency' into jch

Remove leftover bits from an earlier change to move gitk in its own
subdirectory.  Reimplementing the dependency tracking rules needs
to be done in gitk history separately.

* cc/no-gitk-build-dependency:
  Makefile: replace "echo 1>..." with "echo >..."
  Makefile: detect when PYTHON_PATH changes
  Makefile: remove tracking of TCLTK_PATH
Merge branch 'ss/svn-prompt' into jch

Waiting for an Ack from the area export.

* ss/svn-prompt:
  git-svn, perl/Git.pm: extend and use Git->prompt method for querying users
  perl/Git.pm: Honor SSH_ASKPASS as fallback if GIT_ASKPASS is not set
  git-svn, perl/Git.pm: add central method for prompting passwords
Merge branch 'mk/maint-graph-infinity-loop' into jch

The --graph code fell into infinite loop when asked to do what the
code did not expect ;-)

Anybody who worked on "--graph" wants to comment?
Stalled mostly due to lack of responses.

* mk/maint-graph-infinity-loop:
  graph.c: infinite loop in git whatchanged --graph -m
Merge branch 'jc/mkstemp-more-careful-error-reporting' into jch

An earlier patch to save original arguments to mkstemp() away and
use it to report what filename we failed to create incorrectly used
the buffer munged by failing mkstemp().

* jc/mkstemp-more-careful-error-reporting:
  xmkstemp(): avoid showing truncated template more carefully