]> rtime.felk.cvut.cz Git - git.git/log
git.git
13 years agoMerge branch 'np/malloc-threading'
Junio C Hamano [Fri, 21 May 2010 11:02:16 +0000 (04:02 -0700)]
Merge branch 'np/malloc-threading'

* np/malloc-threading:
  Thread-safe xmalloc and xrealloc needs a recursive mutex
  Make xmalloc and xrealloc thread-safe

13 years agoMerge branch 'sr/remote-helper-export'
Junio C Hamano [Fri, 21 May 2010 11:02:15 +0000 (04:02 -0700)]
Merge branch 'sr/remote-helper-export'

* sr/remote-helper-export:
  t5800: testgit helper requires Python support
  Makefile: Simplify handling of python scripts
  remote-helpers: add tests for testgit helper
  remote-helpers: add testgit helper
  remote-helpers: add support for an export command
  remote-helpers: allow requesing the path to the .git directory
  fast-import: always create marks_file directories
  clone: also configure url for bare clones
  clone: pass the remote name to remote_get

Conflicts:
Makefile

13 years agoMerge branch 'ld/discovery-limit-to-fs' (early part)
Junio C Hamano [Fri, 21 May 2010 11:02:15 +0000 (04:02 -0700)]
Merge branch 'ld/discovery-limit-to-fs' (early part)

* 'ld/discovery-limit-to-fs' (early part):
  Rename ONE_FILESYSTEM to DISCOVERY_ACROSS_FILESYSTEM
  GIT_ONE_FILESYSTEM: flip the default to stop at filesystem boundaries
  Add support for GIT_ONE_FILESYSTEM
  truncate cwd string before printing error message
  config.c: remove static keyword from git_env_bool()

13 years agoMerge branch 'ar/config-from-command-line'
Junio C Hamano [Fri, 21 May 2010 11:02:14 +0000 (04:02 -0700)]
Merge branch 'ar/config-from-command-line'

* ar/config-from-command-line:
  Complete prototype of git_config_from_parameters()
  Use strbufs instead of open-coded string manipulation
  Allow passing of configuration parameters in the command line

13 years agoMerge branch 'em/checkout-orphan'
Junio C Hamano [Fri, 21 May 2010 11:02:14 +0000 (04:02 -0700)]
Merge branch 'em/checkout-orphan'

* em/checkout-orphan:
  git checkout: create unparented branch by --orphan

13 years agoComplete prototype of git_config_from_parameters()
Thomas Rast [Fri, 21 May 2010 10:07:47 +0000 (12:07 +0200)]
Complete prototype of git_config_from_parameters()

Add the missing argument list.  (Its lack triggered a compiler warning
for me.)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Fri, 21 May 2010 10:13:07 +0000 (03:13 -0700)]
Merge branch 'maint'

* maint:
  Fix checkout of large files to network shares on Windows XP
  start_command: close cmd->err descriptor when fork/spawn fails
  Fix "Out of memory? mmap failed" for files larger than 4GB on Windows

13 years agoRecent MinGW has a C99 implementation of snprintf functions
Johannes Sixt [Mon, 20 Jul 2009 20:15:07 +0000 (22:15 +0200)]
Recent MinGW has a C99 implementation of snprintf functions

Starting with MinGW 3.14, released end of 2007, a working snprintf
is available. This means we do not need our own replacement that works
around the broken implementation in Microsoft's C runtime.

People who build git in an old MinGW environment are expected to set
SNPRINTF_RETURNS_BOGUS in their config.mak. msysgit is sufficiently
recent, of course.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomingw: use _commit to implement fsync
Erik Faye-Lund [Thu, 20 May 2010 18:57:54 +0000 (20:57 +0200)]
mingw: use _commit to implement fsync

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix checkout of large files to network shares on Windows XP
René Scharfe [Thu, 20 May 2010 18:57:53 +0000 (20:57 +0200)]
Fix checkout of large files to network shares on Windows XP

Bigger writes to network drives on Windows XP fail.  Cap them at 31MB to
allow them to succeed.  Callers need to be prepared for write() calls
that do less work than requested anyway.

On local drives, write() calls are translated to WriteFile() calls with
a cap of 64KB on Windows XP and 256KB on Vista.  Thus a cap of 31MB won't
affect the number of WriteFile() calls which do the actual work.  There's
still room for some other version of Windows to use a chunk size of 1MB
without increasing the number of system calls.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostart_command: close cmd->err descriptor when fork/spawn fails
bert Dvornik [Thu, 20 May 2010 18:57:52 +0000 (20:57 +0200)]
start_command: close cmd->err descriptor when fork/spawn fails

Fix the problem where the cmd->err passed into start_command wasn't
being properly closed when certain types of errors occurr.  (Compare
the affected code with the clean shutdown code later in the function.)

On Windows, this problem would be triggered if mingw_spawnvpe()
failed, which would happen if the command to be executed was malformed
(e.g. a text file that didn't start with a #! line).  If cmd->err was
a pipe, the failure to close it could result in a hang while the other
side was waiting (forever) for either input or pipe close, e.g. while
trying to shove the output into the side band.  On msysGit, this
problem was causing a hang in t5516-fetch-push.

[J6t: With a slight adjustment of the test case, the hang is also
observed on Linux.]

Signed-off-by: bert Dvornik <dvornik+git@gmail.com>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix "Out of memory? mmap failed" for files larger than 4GB on Windows
Ian McLean [Thu, 20 May 2010 18:57:51 +0000 (20:57 +0200)]
Fix "Out of memory? mmap failed" for files larger than 4GB on Windows

The git_mmap implementation was broken for file sizes that wouldn't fit
into a size_t (32 bits).  This was caused by intermediate variables that
were only 32 bits wide when they should be 64 bits.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agonotes: dry-run and verbose options for prune
Michael J Gruber [Fri, 14 May 2010 21:42:07 +0000 (23:42 +0200)]
notes: dry-run and verbose options for prune

Introduce -n and -v options for "git notes prune" in complete analogy to
"git prune" so that one can check for dangling notes easily.

The output is a list of names of objects whose notes would be resp.
are removed so that one can check the object ("git show sha1") as well as
the note ("git notes show sha1").

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 20 May 2010 04:28:51 +0000 (21:28 -0700)]
Merge branch 'maint'

* maint:
  post-receive-email: document command-line mode

13 years agodiff: fix coloring of extended diff headers
Bert Wesarg [Mon, 3 May 2010 22:38:07 +0000 (00:38 +0200)]
diff: fix coloring of extended diff headers

Coloring the extended headers where done as a whole not per line. less with
option -R (which is the default from git) does not support this coloring
mode because of performance reasons. The -r option would be an alternative
but has problems with lines that are longer than the screen. Therefore
stick to the idiom to color each line separately. The problem is, that the
result of ill_metainfo() will also be used as an parameter to an external
diff driver, so we need to disable coloring in this case.

Because coloring is now done inside fill_metainfo() we can simply add this
string to the diff header and therefore keep the last newline in the
extended header. This results also into the fact that the external diff
driver now gets this last newline too. Which is a change in behavior
but a good one.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: test for pserver authentication support
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:04 +0000 (02:46 +0000)]
git-cvsserver: test for pserver authentication support

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: document making a password without htpasswd
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:03 +0000 (02:46 +0000)]
git-cvsserver: document making a password without htpasswd

This perl snippet is useful for quickly making a password without
htpasswd(1).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: Improved error handling for pserver
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:02 +0000 (02:46 +0000)]
git-cvsserver: Improved error handling for pserver

  - Produce an error if the user tries to supply a password for anonymous

  - Clarify the error message produced when there's no [gitcvs.authdb]

  - Produce an E error if the authdb doesn't exist instead of spewing
    $! to the user

  - do crypt($user, descramble($pass)) eq $hash; crypt($user, $hash)
    eq $hash would accept any password

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: indent & clean up authdb code
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 02:46:01 +0000 (02:46 +0000)]
git-cvsserver: indent & clean up authdb code

 - Indent the last commit to fit with the rest of the code.

 - Use lexical filehandles instead of global globs

 - Close the filehandle after the password database has been read.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: use a password file cvsserver pserver
Sam Vilain [Sat, 15 May 2010 15:07:54 +0000 (15:07 +0000)]
git-cvsserver: use a password file cvsserver pserver

If a git repository is shared via HTTP, the config file is typically
visible.  Use an external file instead.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-cvsserver: authentication support for pserver
Ævar Arnfjörð Bjarmason [Sat, 15 May 2010 15:06:46 +0000 (15:06 +0000)]
git-cvsserver: authentication support for pserver

Allow git-cvsserver to use authentication over pserver mode.  The
pserver user/password database is stored in the config file for each
repository.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Worriedly-Acked-by: Martin Langhoff <martin.langhoff@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopost-receive-email: document command-line mode
Jonathan Nieder [Wed, 19 May 2010 19:01:47 +0000 (14:01 -0500)]
post-receive-email: document command-line mode

According to the default hooks/post-receive file, the hook is called
with three arguments on stdin:

  <oldrev> <newrev> <refname>

In command-line mode, the arguments come in a different order, because
the email hook instead calls:

  generate_email $2 $3 $1

Add a comment to explain why, based on comments from the mailing list
and the commit message to v1.5.1~9.  Thanks to Andy for the
explanation.

Requested-by: martin f. krafft <madduck@debian.org>
Cc: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 19 May 2010 05:39:56 +0000 (22:39 -0700)]
Merge branch 'maint'

* maint:
  Documentation/gitdiffcore: fix order in pickaxe description
  Documentation: fix minor inconsistency
  Documentation: rebase -i ignores options passed to "git am"
  hash_object: correction for zero length file

13 years agoAdd "Z" as an alias for the timezone "UTC"
Marcus Comstedt [Mon, 17 May 2010 19:07:10 +0000 (21:07 +0200)]
Add "Z" as an alias for the timezone "UTC"

The name "Z" for the UTC timezone is required to properly parse ISO 8601
timestamps.  Add it to the list of recognized timezones.

Because timezone names can be shorter than 3 letters, loosen the
restriction in match_alpha() that used to require at least 3 letters to
match to allow a short timezone name as long as it matches exactly.  Prior
to the introduction of the "Z" zone, this already affected the timezone
"NT" (Nome).

Signed-off-by: Marcus Comstedt <marcus@mc.pp.se>
Reviewed-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/gitdiffcore: fix order in pickaxe description
Michael J Gruber [Tue, 18 May 2010 10:49:33 +0000 (12:49 +0200)]
Documentation/gitdiffcore: fix order in pickaxe description

Reverse the order of "origin" and "result" so that the sentence
really describes an addition rather than a removal.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: fix minor inconsistency
Michael J Gruber [Thu, 13 May 2010 12:51:38 +0000 (14:51 +0200)]
Documentation: fix minor inconsistency

While we don't always write out commands in full (`git command`) we
should do it consistently in adjacent paragraphs.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: rebase -i ignores options passed to "git am"
Markus Heidelberg [Thu, 13 May 2010 12:47:53 +0000 (14:47 +0200)]
Documentation: rebase -i ignores options passed to "git am"

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff-options: make --patch a synonym for -p
Will Palmer [Thu, 13 May 2010 08:59:00 +0000 (09:59 +0100)]
diff-options: make --patch a synonym for -p

Here we simply make --patch a synonym for -p, whose mnemonic was "patch"
all along.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofor-each-ref: Field with abbreviated objectname
Michael J Gruber [Thu, 13 May 2010 12:31:46 +0000 (14:31 +0200)]
for-each-ref: Field with abbreviated objectname

Introduce a :short modifier to objectname which outputs the abbreviated
object name.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohash_object: correction for zero length file
Dmitry Potapov [Mon, 10 May 2010 21:38:17 +0000 (01:38 +0400)]
hash_object: correction for zero length file

The check whether size is zero was done after if size <= SMALL_FILE_SIZE,
as result, zero size case was never triggered. Instead zero length file
was treated as any other small file. This did not caused any problem, but
if we have a special case for size equal to zero, it is better to make it
work and avoid redundant malloc().

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: Use @diff_opts while using format-patch
Pavan Kumar Sunkara [Mon, 10 May 2010 16:41:35 +0000 (18:41 +0200)]
gitweb: Use @diff_opts while using format-patch

Make git-format-patch (used by 'patch' and 'patches' views) use the
same rename detection options that git-diff and git-diff-tree (used
by 'commitdiff', 'blobdiff', etc.) use.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodocs: clarify meaning of -M for git-log
Jeff King [Sat, 8 May 2010 04:44:34 +0000 (00:44 -0400)]
docs: clarify meaning of -M for git-log

As an option to the "diff" family, it is fairly obvious what
"detect renames" means. However, for revision traversal, the
"-M" option is just included in the long list of options,
with no indication that it is about showing renames in diffs
versus following renames. Let's make it more explicit.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 12 May 2010 06:04:47 +0000 (23:04 -0700)]
Merge branch 'maint'

* maint:
  GIT-VERSION-GEN: restrict tags used

13 years agoGIT-VERSION-GEN: restrict tags used
Tay Ray Chuan [Wed, 12 May 2010 03:29:20 +0000 (11:29 +0800)]
GIT-VERSION-GEN: restrict tags used

Restrict the tags used to generate the version string to those that
begin with "v", since git's tags for git-core (ie. excluding git-gui)
are all of the form "vX.Y...".

This is to avoid using private tags by the user in a clone of the git
code repository, which may break certain machinery (eg. Makefile, gitk).

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Tue, 11 May 2010 01:34:03 +0000 (18:34 -0700)]
Merge branch 'maint'

* maint:
  handle "git --bare init <dir>" properly

13 years agotests: chmod +x t5150
Jeff King [Mon, 10 May 2010 09:51:39 +0000 (05:51 -0400)]
tests: chmod +x t5150

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: rename duplicate t4205
Jeff King [Mon, 10 May 2010 09:47:39 +0000 (05:47 -0400)]
tests: rename duplicate t4205

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agohandle "git --bare init <dir>" properly
Jeff King [Mon, 10 May 2010 09:42:06 +0000 (05:42 -0400)]
handle "git --bare init <dir>" properly

If we know we are creating a bare repository, we use setenv
to set the GIT_DIR directory to the current directory
(either where we already were, or one we created and chdir'd
into with "git init --bare <dir>").

However, with "git --bare init <dir>" (note the --bare as a
git wrapper option), the setup code actually sets GIT_DIR
for us, but it uses the wrong, original cwd when a directory
is given. Because our setenv does not use the overwrite
flag, it is ignored.

We need to set the overwrite flag, but only when we are
given a directory on the command line. That still allows:

  GIT_DIR=foo.git git init --bare

to work. The behavior is changed for:

  GIT_DIR=foo.git git init --bare bar.git

which used to create the repository in foo.git, but now will
use bar.git. This is more sane, as command line options
should generally override the environment.

Noticed by Oliver Hoffmann.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn: mangle refnames forbidden in git
Torsten Schmutzler [Thu, 6 May 2010 20:20:43 +0000 (22:20 +0200)]
git-svn: mangle refnames forbidden in git

git-check-ref-format(1) describes names which
cannot be used as refnames for git.  Some are
legal branchnames in subversion however.
Mangle the not yet handled cases.

Signed-off-by: Torsten Schmutzler <git-ts@theblacksun.eu>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: Remove unused use of File::Temp
Ævar Arnfjörð Bjarmason [Sat, 8 May 2010 16:40:41 +0000 (16:40 +0000)]
git-svn: Remove unused use of File::Temp

The use line was added in ffe256f9. File::Temp calls were later moved
to Git.pm in 0b19138b, but that commit neglected to remove the
now-redundant import.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn documentation: minor grammar fix
Ævar Arnfjörð Bjarmason [Fri, 7 May 2010 19:50:03 +0000 (19:50 +0000)]
git-svn documentation: minor grammar fix

Use the definite article when talking about a configuration property.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit svn: avoid uninitialized var in 'reset'
Jonathan Nieder [Tue, 4 May 2010 23:36:47 +0000 (16:36 -0700)]
git svn: avoid uninitialized var in 'reset'

When "git svn reset" is called with an invalid revision, we
bail out and show the user a proper error message instead
of giving them a cryptic one related to git-svn internals.

ref: http://bugs.debian.org/578908
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reported-by: Jens Seidel <jensseidel@users.sf.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agoStart 1.7.2 cycle
Junio C Hamano [Sun, 9 May 2010 05:58:36 +0000 (22:58 -0700)]
Start 1.7.2 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'bg/apply-blank-trailing-context'
Junio C Hamano [Sun, 9 May 2010 05:37:41 +0000 (22:37 -0700)]
Merge branch 'bg/apply-blank-trailing-context'

* bg/apply-blank-trailing-context:
  apply: Allow blank *trailing* context lines to match beyond EOF

13 years agoMerge branch 'bg/send-email-smtpdomain'
Junio C Hamano [Sun, 9 May 2010 05:37:34 +0000 (22:37 -0700)]
Merge branch 'bg/send-email-smtpdomain'

* bg/send-email-smtpdomain:
  send-email: Cleanup smtp-domain and add config
  Document send-email --smtp-domain
  send-email: Don't use FQDNs without a '.'
  send-email: Cleanup { style

13 years agoMerge branch 'rc/ls-remote-default'
Junio C Hamano [Sun, 9 May 2010 05:37:28 +0000 (22:37 -0700)]
Merge branch 'rc/ls-remote-default'

* rc/ls-remote-default:
  ls-remote: fall-back to default remotes when no remote specified

13 years agoMerge branch 'rc/maint-curl-helper'
Junio C Hamano [Sun, 9 May 2010 05:37:24 +0000 (22:37 -0700)]
Merge branch 'rc/maint-curl-helper'

* rc/maint-curl-helper:
  remote-curl: ensure that URLs have a trailing slash
  http: make end_url_with_slash() public
  t5541-http-push: add test for URLs with trailing slash

Conflicts:
remote-curl.c

13 years agoMerge branch 'hg/maint-attr-fix'
Junio C Hamano [Sun, 9 May 2010 05:37:05 +0000 (22:37 -0700)]
Merge branch 'hg/maint-attr-fix'

* hg/maint-attr-fix:
  attr: Expand macros immediately when encountered.
  attr: Allow multiple changes to an attribute on the same line.
  attr: Fixed debug output for macro expansion.

13 years agoMerge branch 'eb/unpretty-b-format'
Junio C Hamano [Sun, 9 May 2010 05:36:40 +0000 (22:36 -0700)]
Merge branch 'eb/unpretty-b-format'

* eb/unpretty-b-format:
  Add `%B' in format strings for raw commit body in `git log' and friends

13 years agoMerge branch 'ab/commit-empty-message'
Junio C Hamano [Sun, 9 May 2010 05:36:31 +0000 (22:36 -0700)]
Merge branch 'ab/commit-empty-message'

* ab/commit-empty-message:
  Add option to git-commit to allow empty log messages

13 years agoMerge branch 'jc/test-sleepless'
Junio C Hamano [Sun, 9 May 2010 05:36:23 +0000 (22:36 -0700)]
Merge branch 'jc/test-sleepless'

* jc/test-sleepless:
  war on "sleep" in tests

13 years agoMerge branch 'jc/maint-reflog-expire-unreachable'
Junio C Hamano [Sun, 9 May 2010 05:36:16 +0000 (22:36 -0700)]
Merge branch 'jc/maint-reflog-expire-unreachable'

* jc/maint-reflog-expire-unreachable:
  reflog --expire-unreachable: avoid merge-base computation

13 years agoMerge branch 'sd/log-decorate'
Junio C Hamano [Sun, 9 May 2010 05:36:14 +0000 (22:36 -0700)]
Merge branch 'sd/log-decorate'

* sd/log-decorate:
  log.decorate: only ignore it under "log --pretty=raw"
  script with rev-list instead of log
  log --pretty/--oneline: ignore log.decorate
  log.decorate: usability fixes
  Add `log.decorate' configuration variable.
  git_config_maybe_bool()

Conflicts:
builtin/log.c

13 years agoMerge branch 'mh/status-optionally-refresh'
Junio C Hamano [Sun, 9 May 2010 05:35:39 +0000 (22:35 -0700)]
Merge branch 'mh/status-optionally-refresh'

* mh/status-optionally-refresh:
  t7508: add a test for "git status" in a read-only repository
  git status: refresh the index if possible
  t7508: add test for "git status" refreshing the index

13 years agoMerge branch 'cw/ws-indent-with-tab'
Junio C Hamano [Sun, 9 May 2010 05:35:35 +0000 (22:35 -0700)]
Merge branch 'cw/ws-indent-with-tab'

* cw/ws-indent-with-tab:
  whitespace: tests for git-apply --whitespace=fix with tab-in-indent
  whitespace: add tab-in-indent support for --whitespace=fix
  whitespace: replumb ws_fix_copy to take a strbuf *dst instead of char *dst
  whitespace: tests for git-diff --check with tab-in-indent error class
  whitespace: add tab-in-indent error class
  whitespace: we cannot "catch all errors known to git" anymore

13 years agoMerge branch 'cc/revert-strategy'
Junio C Hamano [Sun, 9 May 2010 05:34:47 +0000 (22:34 -0700)]
Merge branch 'cc/revert-strategy'

* cc/revert-strategy:
  revert: add "--strategy" option to choose merge strategy
  merge: make function try_merge_command non static
  merge: refactor code that calls "git merge-STRATEGY"
  revert: refactor merge recursive code into its own function
  revert: use strbuf to refactor the code that writes the merge message

Conflicts:
builtin/revert.c

13 years agoMerge branch 'sc/http-late-auth'
Junio C Hamano [Sun, 9 May 2010 05:33:16 +0000 (22:33 -0700)]
Merge branch 'sc/http-late-auth'

* sc/http-late-auth:
  Prompt for a username when an HTTP request 401s

13 years agoMerge branch 'jk/cached-textconv'
Junio C Hamano [Sun, 9 May 2010 05:33:08 +0000 (22:33 -0700)]
Merge branch 'jk/cached-textconv'

* jk/cached-textconv:
  diff: avoid useless filespec population
  diff: cache textconv output
  textconv: refactor calls to run_textconv
  introduce notes-cache interface
  make commit_tree a library function

13 years agoMerge branch 'pc/remove-warn'
Junio C Hamano [Sun, 9 May 2010 05:32:59 +0000 (22:32 -0700)]
Merge branch 'pc/remove-warn'

* pc/remove-warn:
  Remove a redundant errno test in a usage of remove_path
  Introduce remove_or_warn function
  Implement the rmdir_or_warn function
  Generalise the unlink_or_warn function

13 years agoMakefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES
Jonathan Nieder [Sun, 9 May 2010 04:00:10 +0000 (23:00 -0500)]
Makefile: let header dependency checker override COMPUTE_HEADER_DEPENDENCIES

This way, if you have “COMPUTE_HEADER_DEPENDENCIES = YesPlease” in your
config.mak, you can still “make CHECK_HEADER_DEPENDENCIES=Yes” to check
the makefile after a successful build.

This change does not affect the result of the command
“make CHECK_HEADER_DEPENDENCIES=Yes COMPUTE_HEADER_DEPENDENCIES=Yes”.
That will still die with an error message:

cannot compute header dependencies outside a normal build

The message is appropriate because still true.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: fix header dependency checker to allow NO_CURL builds
Jonathan Nieder [Sun, 9 May 2010 03:57:28 +0000 (22:57 -0500)]
Makefile: fix header dependency checker to allow NO_CURL builds

Do not expect to find http-related dependency fragments after a build
with HTTP support disabled.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: nitpicks
Jonathan Nieder [Sun, 9 May 2010 03:37:21 +0000 (22:37 -0500)]
Documentation/notes: nitpicks

Spell out “or” in the NAME line and simplify the leading sentence
in the DESCRIPTION.

Some other language cleanups, too.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: clean up description of rewriting configuration
Jonathan Nieder [Sun, 9 May 2010 03:33:28 +0000 (22:33 -0500)]
Documentation/notes: clean up description of rewriting configuration

Clarify that the GIT_NOTES_REWRITE_REFS environment variable
overrides both ‘[notes "rewrite"] <command>’ and ‘[notes] rewriteRef’.

Add explanations of GIT_NOTES_REWRITE_MODE and GIT_NOTES_REWRITE_REFS
to the ENVIRONMENT section.

Cc: Leif Arne Storset <lstorset@opera.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: simplify treatment of default display refs
Jonathan Nieder [Sun, 9 May 2010 03:32:24 +0000 (22:32 -0500)]
Documentation/notes: simplify treatment of default display refs

The main description of display refs for notes should be in
git-log.1, where there is a chance to give a leisurely description
of all the ways they can be set, what they are used for, and so
on.  The description in git-notes.1 is only meant to be a quick
reminder of how notes are used.

So simplify it.

Also add an entry for GIT_NOTES_DISPLAY_REF to the environment
section.

Cc: Thomas Rast <trast@student.ethz.ch>
Cc: Johan Herland <johan@herland.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/log: add a CONFIGURATION section
Jonathan Nieder [Sun, 9 May 2010 03:30:41 +0000 (22:30 -0500)]
Documentation/log: add a CONFIGURATION section

Add a configuration section summarizing variables that affect the
log family of commands.

Cc: Thomas Rast <trast@student.ethz.ch>
Cc: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: simplify treatment of default notes ref
Jonathan Nieder [Sun, 9 May 2010 03:23:58 +0000 (22:23 -0500)]
Documentation/notes: simplify treatment of default notes ref

Separate the documentation of the semantics, command-line option,
configuration item, and environment variable for the default notes
ref.  The documentation is easier to digest in bite-sized pieces.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: add configuration section
Jonathan Nieder [Sun, 9 May 2010 03:21:59 +0000 (22:21 -0500)]
Documentation/notes: add configuration section

Copy the descriptions of configuration variables from git-config.1.
Once the descriptions have been ironed out, it would be nice to
refactor them to share text, but for now it is simplest to experiment
with separate copies.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: describe content of notes blobs
Jonathan Nieder [Sun, 9 May 2010 03:21:34 +0000 (22:21 -0500)]
Documentation/notes: describe content of notes blobs

stripspace/text-based formatting kicks in when specifying the notes
content with -m or -F, or when an editor is used to edit the notes.
To binary-safely create notes from files, the following construct is
required:

    git notes add -C $(git hash-object -w <file>) <object>

Explain this trick (thanks, Johan!) in the manual.  Add an ordinary
example, too, to keep this esoteric one company.

Cc: Johan Herland <johan@herland.net>
Cc: Thomas Rast <trast@student.ethz.ch>
Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/notes: document format of notes trees
Jonathan Nieder [Sun, 9 May 2010 03:19:35 +0000 (22:19 -0500)]
Documentation/notes: document format of notes trees

Separate the specification of the notes format exposed in
git-config.1 from the description of the option; or in other
words, move the explanation for what to expect to find at
refs/notes/commits from git-config.1 to git-notes.1.

Suggested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDo not call release_pack_memory in malloc wrappers when GIT_TRACE is used
Johannes Sixt [Sat, 8 May 2010 15:18:06 +0000 (17:18 +0200)]
Do not call release_pack_memory in malloc wrappers when GIT_TRACE is used

This avoids a potential race condition when async procedures are
implemented as threads where release_pack_memory() can be called from
different threads without locking under memory pressure.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoHave set_try_to_free_routine return the previous routine
Johannes Sixt [Sat, 8 May 2010 15:13:49 +0000 (17:13 +0200)]
Have set_try_to_free_routine return the previous routine

This effectively requires from the callers of set_try_to_free_routine to
treat the try-to-free-routines as a stack.

We will need this for the next patch where the only current caller cannot
depend on that the previously set routine was the default routine.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocherry-pick: do not dump core when iconv fails
Jonathan Nieder [Sat, 8 May 2010 23:17:29 +0000 (18:17 -0500)]
cherry-pick: do not dump core when iconv fails

When cherry-picking, usually the new and old commit encodings are both
UTF-8.  Most old iconv implementations do not support this trivial
conversion, so on old platforms, out->message remains NULL, and later
attempts to read it segfault.

Fix this by noticing the input and output encodings match and skipping
the iconv step, like the other reencode_string() call sites already do.
Also stop segfaulting on other iconv failures: if iconv fails for some
other reason, the best we can do is to pass the old message through.

This fixes a regression introduced in v1.7.1-rc0~15^2~2 (revert:
clarify label on conflict hunks, 2010-03-20).

Reported-by: Andreas Krey <a.krey@gmx.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopretty: initialize new cmt_fmt_map to 0
Jonathan Nieder [Sat, 8 May 2010 21:07:39 +0000 (16:07 -0500)]
pretty: initialize new cmt_fmt_map to 0

Without this change, is_alias is likely to happen to be nonzero,
resulting in "fatal: invalid --pretty format" when the fake alias
cannot be resolved.

Use memset instead of initializing the members one by one to make it
easier to expand the struct in the future if needed.

t4205 (log --pretty) does not pass for me without this fix.

Cc: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: Fix 'clean' target to remove all gitweb build files
Ramsay Jones [Sat, 8 May 2010 17:36:15 +0000 (18:36 +0100)]
Makefile: Fix 'clean' target to remove all gitweb build files

In particular the gitweb/GITWEB-BUILD-OPTIONS file was not being
removed by the main Makefile. However, the gitweb/Makefile has a
'clean' target that correctly removes all the build products.
In order to fix the problem, rather than duplicate the clean-up
instructions, we change the main Makefile so that it delegates
the clean-up actions to the gitweb Makefile.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: git-add does not update files marked "assume unchanged"
Clemens Buchacher [Sat, 1 May 2010 09:27:20 +0000 (11:27 +0200)]
Documentation: git-add does not update files marked "assume unchanged"

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/config.txt: GIT_NOTES_REWRITE_REF overrides notes.rewriteRef
Leif Arne Storset [Wed, 5 May 2010 14:16:25 +0000 (16:16 +0200)]
Documentation/config.txt: GIT_NOTES_REWRITE_REF overrides notes.rewriteRef

The documentation erroneously mentions the GIT_NOTES_REWRITE_REF
override in the description of notes.rewrite.<command>.  Move it
under notes.rewriteRef where it belongs.

Signed-off-by: Leif Arne Storset <lstorset@opera.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTurn setup code in t2007-checkout-symlink.sh into a test
Ævar Arnfjörð Bjarmason [Fri, 7 May 2010 19:37:03 +0000 (19:37 +0000)]
Turn setup code in t2007-checkout-symlink.sh into a test

Previously the test would print to stdout which interfered with the
TAP output. Now this scaffolding code is just a normal test.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMove t6000lib.sh to lib-*
Ævar Arnfjörð Bjarmason [Fri, 7 May 2010 19:37:01 +0000 (19:37 +0000)]
Move t6000lib.sh to lib-*

The naming of this test library conflicted with the recommendation in
t/README's "Naming Tests" section.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoadapt request-pull tests for new pull request format
Jonathan Nieder [Sat, 24 Apr 2010 12:29:52 +0000 (07:29 -0500)]
adapt request-pull tests for new pull request format

10eb0007 (request-pull: avoid mentioning that the start point is a
single commit, 2010-01-29), changed the pull request format, so the
test needs some changes to still pass:

 - tolerate a missing blank line between “in the git repository at:”
   and the name of repository and branch

 - recognize subject and date in the new request format

 - update the expected request template to match the new format

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/maint-request-pull' into jn/request-pull
Junio C Hamano [Sat, 8 May 2010 04:32:56 +0000 (21:32 -0700)]
Merge branch 'jn/maint-request-pull' into jn/request-pull

13 years agot5150: protect backslash with backslash in shell
Junio C Hamano [Sat, 8 May 2010 04:29:50 +0000 (21:29 -0700)]
t5150: protect backslash with backslash in shell

At least /bin/sh on FreeBSD 8 interprets backslash followed by newline in an
unquoted here text as "empty".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblame-options.txt: Add default value for `-M/-C` options.
Bo Yang [Fri, 7 May 2010 04:51:57 +0000 (21:51 -0700)]
blame-options.txt: Add default value for `-M/-C` options.

Both `-M` and `-C` have default values and the <num> argument
the last `-C` option takes effect.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake git log --follow find copies among unmodified files.
Bo Yang [Fri, 7 May 2010 04:52:29 +0000 (21:52 -0700)]
Make git log --follow find copies among unmodified files.

'git log --follow <path>' don't track copies from unmodified
files, and this patch fix it.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMake diffcore_std only can run once before a diff_flush
Bo Yang [Fri, 7 May 2010 04:52:28 +0000 (21:52 -0700)]
Make diffcore_std only can run once before a diff_flush

When file renames/copies detection is turned on, the
second diffcore_std will degrade a 'C' pair to a 'R' pair.

And this may happen when we run 'git log --follow' with
hard copies finding. That is, the try_to_follow_renames()
will run diffcore_std to find the copies, and then
'git log' will issue another diffcore_std, which will reduce
'src->rename_used' and recognize this copy as a rename.
This is not what we want.

So, I think we really don't need to run diffcore_std more
than one time.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd a macro DIFF_QUEUE_CLEAR.
Bo Yang [Fri, 7 May 2010 04:52:27 +0000 (21:52 -0700)]
Add a macro DIFF_QUEUE_CLEAR.

Refactor the diff_queue_struct code, this macro help
to reset the structure.

Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agowt-status: take advice.statusHints seriously
Michael J Gruber [Thu, 22 Apr 2010 20:30:20 +0000 (22:30 +0200)]
wt-status: take advice.statusHints seriously

Currently, status gives a lot of hints even when advice.statusHints is
false. Change this so that all hints depend on the config variable.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot7508: test advice.statusHints
Michael J Gruber [Thu, 22 Apr 2010 20:30:19 +0000 (22:30 +0200)]
t7508: test advice.statusHints

edf563f (status: make "how to stage" messages optional, 2009-09-09)
introduced advice.statusHints without tests. Add a few tests to describe
and test the status quo.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest-lib: some shells do not let $? propagate into an eval
Jonathan Nieder [Thu, 6 May 2010 08:41:10 +0000 (03:41 -0500)]
test-lib: some shells do not let $? propagate into an eval

In 3bf7886 (test-lib: Let tests specify commands to be run at end of
test, 2010-05-02), the git test harness learned to run cleanup
commands unconditionally at the end of a test.  During each test,
the intended cleanup actions are collected in the test_cleanup variable
and evaluated.  That variable looks something like this:

eval_ret=$?; clean_something && (exit "$eval_ret")
eval_ret=$?; clean_something_else && (exit "$eval_ret")
eval_ret=$?; final_cleanup && (exit "$eval_ret")
eval_ret=$?

All cleanup actions are run unconditionally but if one of them fails
it is properly reported through $eval_ret.

On FreeBSD, unfortunately, $? is set at the beginning of an ‘eval’
to 0 instead of the exit status of the previous command.  This results
in tests using test_expect_code appearing to fail and all others
appearing to pass, unless their cleanup fails.  Avoid the problem by
setting eval_ret before the ‘eval’ begins.

Thanks to Jeff King for the explanation.

Cc: Jeff King <peff@peff.net>
Cc: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agopretty: Respect --abbrev option
Will Palmer [Tue, 4 May 2010 03:18:57 +0000 (22:18 -0500)]
pretty: Respect --abbrev option

Prior to this, the output of git log -1 --format=%h was always 7
characters long, without regard to whether --abbrev had been passed.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoshortlog: Document and test --format option
Jonathan Nieder [Tue, 4 May 2010 02:59:55 +0000 (21:59 -0500)]
shortlog: Document and test --format option

Do not document the --pretty synonym, since it takes too long to
explain the name to people.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot4201 (shortlog): Test output format with multiple authors
Jonathan Nieder [Tue, 4 May 2010 02:58:04 +0000 (21:58 -0500)]
t4201 (shortlog): Test output format with multiple authors

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot4201 (shortlog): guard setup with test_expect_success
Jonathan Nieder [Tue, 4 May 2010 02:57:36 +0000 (21:57 -0500)]
t4201 (shortlog): guard setup with test_expect_success

Follow the current prevailing style.  This also has the benefit of
capturing any stray output and noticing if any of the setup commands
start failing.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/shortlog: scripted users should not rely on implicit HEAD
Jonathan Nieder [Tue, 4 May 2010 02:57:10 +0000 (21:57 -0500)]
Documentation/shortlog: scripted users should not rely on implicit HEAD

When passed no revision arguments, ‘git shortlog’ reads a log from
stdin if and only if stdin is not a tty.  So scripts that need to
function identically when standard input is a terminal (as when run
interactively) and not (as when run through a cron job) should either
supply a log themselves or specify the desired revisions explicitly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocommit --amend: cope with missing display name
Jonathan Nieder [Sun, 2 May 2010 08:57:12 +0000 (03:57 -0500)]
commit --amend: cope with missing display name

Though I have not seen this in the wild, it has been said that there
are likely to be git repositories converted from other version control
systems with an invalid ident line like this one:

  author <user@example.com> 18746342 +0000

Because there is no space between the (empty) user name and the email
address, commit --amend chokes.  When searching for a
space-left-bracket sequence on the ident line, it finds it in the
committer line, ending up utterly confused.

Better for commit --amend to treat this like a valid ident line with
empty username and complain.

The tests remove the questionable commit objects after use so there is
no chance for them to confuse later tests.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest-lib: Let tests specify commands to be run at end of test
Jonathan Nieder [Sun, 2 May 2010 08:53:41 +0000 (03:53 -0500)]
test-lib: Let tests specify commands to be run at end of test

Certain actions can imply that if the test fails early, recovery from
within other tests is too much to expect:

 - creating unwritable directories, like the EACCESS test in t0001-init
 - setting unusual configuration, like user.signingkey in t7004-tag
 - crashing and leaving the index lock held, like t3600-rm once did

Some test scripts work around this by running cleanup actions outside
the supervision of the test harness, with the unfortunate consequence
that those commands are not appropriately echoed and their output not
suppressed.  Others explicitly save exit status, clean up, and then
reset the exit status within the tests, which has excellent behavior
but makes the tests hard to read.  Still others ignore the problem.

Allow tests a fourth option: by calling this function, tests can
stack up commands they would like to be run to clean up.

Commands passed to test_when_finished during a test are
unconditionally run in the test environment immediately before the
test is completed, in last-in-first-out order.  If some cleanup
command fails, then the other cleanup commands are still run before
the failure is reported and the test script allowed to continue.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.7.0' into maint
Junio C Hamano [Tue, 4 May 2010 22:20:47 +0000 (15:20 -0700)]
Merge branch 'maint-1.7.0' into maint

* maint-1.7.0:
  remove ecb parameter from xdi_diff_outf()

14 years agoremove ecb parameter from xdi_diff_outf()
René Scharfe [Tue, 4 May 2010 20:41:34 +0000 (22:41 +0200)]
remove ecb parameter from xdi_diff_outf()

xdi_diff_outf() overrides the structure members of its last parameter,
ignoring any value that callers pass in.  It's no surprise then that all
callers pass a pointer to an uninitialized structure.  They also don't
read it after the call, so the parameter is neither used for input nor
for output.   Turn it into a local variable of xdi_diff_outf().

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>
14 years agoDocumentation/git-send-email: Add "Use gmail as the smtp server"
Ping Yin [Sat, 24 Apr 2010 07:34:02 +0000 (15:34 +0800)]
Documentation/git-send-email: Add "Use gmail as the smtp server"

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Acked by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoclone: quell the progress report from init and report on clone
Junio C Hamano [Fri, 23 Apr 2010 12:37:22 +0000 (14:37 +0200)]
clone: quell the progress report from init and report on clone

Currently, a local git clone reports only initializing an empty
git dir, which is potentially confusing.

Instead, report that cloning is in progress and when it is done
(unless -q) is given, and suppress the init report.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest-lib.sh: Add explicit license detail, with change from GPLv2 to GPLv2+.
Michal Sojka [Fri, 16 Apr 2010 13:53:59 +0000 (15:53 +0200)]
test-lib.sh: Add explicit license detail, with change from GPLv2 to GPLv2+.

Dear Junio,

this is a resend of relicensing patch for test suite library, which
was initially sent by Carl Worth. Since the time you sent me acks for
this patch collected by you, I collected 8 additional acks as is
documented at
https://git.wiki.kernel.org/index.php/Test-lib_reclicensing. There are
still three contributors missing: Bert Wesarg, Stephan Beyer and Bryan
Donlan. The contributions of first two are clearly not copyrightable.
I'm not sure about the copyrightability of Bryan Donlan's
contributions (git log -p --author='Bryan Donlan' t/test-lib.sh).

Carl told me that in your ack collection process you missed only three
acks. So I wonder whether you already did some analysis of which
contributions are copyrightable. If so, are the missing acks in the
list bellow?

Thanks
Michal

8<--------8<--------8<--------
This file has had no explicit license information noted in it, but
has clearly been created and modified according to the terms of GPLv2
as with the rest of the git code base.

The purpose of relicensing is to allow other GPLv3+ projects (in
particular, the notmuch project: http://notmuchmail.org) to use this
same test-suite structure and to contribute changes back as well.

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Brandon Casey <drafnel@gmail.com>
Acked-by: Clemens Buchacher <drizzd@aon.at>
Acked-by: David Reiss <dreiss@facebook.com>
Acked-by: Emil Sit <sit@emilsit.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Fredrik Kuivinen <frekui@gmail.com>
Acked-by: Gerrit Pape <pape@smarden.org>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Acked-by: Johan Herland <johan@herland.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Lea Wiemann <lewiemann@gmail.com>
Acked-by: Markus Heidelberg <markus.heidelberg@web.de>
Acked-by: Martin Waitz <tali@admingilde.org>
Acked-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Acked-by: Matthias Lederhofer <matled@gmx.net>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Michele Ballabio <barra_cuda@katamail.com>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Acked-by: Pavel Roskin <proski@gnu.org>
Acked-by: Petr Baudis <pasky@ucw.cz>
Acked-by: Pierre Habouzit <madcoder@debian.org>
Acked-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>