git/jnareb-git.git
11 years agoMerge branch 'yd/doc-is-in-asciidoc'
Junio C Hamano [Thu, 28 Mar 2013 21:38:20 +0000 (28 14:38 -0700)]
Merge branch 'yd/doc-is-in-asciidoc'

* yd/doc-is-in-asciidoc:
  CodingGuidelines: our documents are in AsciiDoc

11 years agoMerge branch 'yd/doc-merge-annotated-tag'
Junio C Hamano [Thu, 28 Mar 2013 21:38:17 +0000 (28 14:38 -0700)]
Merge branch 'yd/doc-merge-annotated-tag'

Document the 1.7.9 feature to merge a signed tag and keep that in
the mergetag header in the resulting commit better.

* yd/doc-merge-annotated-tag:
  Documentation: merging a tag is a special case

11 years agoMerge branch 'jc/remove-treesame-parent-in-simplify-merges'
Junio C Hamano [Thu, 28 Mar 2013 21:37:53 +0000 (28 14:37 -0700)]
Merge branch 'jc/remove-treesame-parent-in-simplify-merges'

The --simplify-merges logic did not cull irrelevant parents from a
merge that is otherwise not interesting with respect to the paths
we are following.

This touches a fairly core part of the revision traversal
infrastructure; even though I think this change is correct, please
report immediately if you find any unintended side effect.

* jc/remove-treesame-parent-in-simplify-merges:
  simplify-merges: drop merge from irrelevant side branch

11 years agoMerge branch 'jk/checkout-attribute-lookup'
Junio C Hamano [Thu, 28 Mar 2013 21:37:46 +0000 (28 14:37 -0700)]
Merge branch 'jk/checkout-attribute-lookup'

Codepath to stream blob object contents directly from the object
store to filesystem did not use the correct path to find conversion
filters when writing to temporary files.

* jk/checkout-attribute-lookup:
  t2003: work around path mangling issue on Windows
  entry: fix filter lookup
  t2003: modernize style

11 years agoMerge branch 'jk/difftool-dir-diff-edit-fix'
Junio C Hamano [Thu, 28 Mar 2013 21:37:22 +0000 (28 14:37 -0700)]
Merge branch 'jk/difftool-dir-diff-edit-fix'

"git difftool --dir-diff" made symlinks to working tree files when
preparing a temporary directory structure, so that accidental edits
of these files in the difftool are reflected back to the working
tree, but the logic to decide when to do so was not quite right.

* jk/difftool-dir-diff-edit-fix:
  difftool --dir-diff: symlink all files matching the working tree
  difftool: avoid double slashes in symlink targets
  git-difftool(1): fix formatting of --symlink description

11 years agoMerge branch 'maint'
Junio C Hamano [Thu, 28 Mar 2013 21:34:55 +0000 (28 14:34 -0700)]
Merge branch 'maint'

* maint:
  git help config: s/insn/instruction/

11 years agoMerge branch 'maint-1.8.1' into maint
Junio C Hamano [Thu, 28 Mar 2013 21:34:07 +0000 (28 14:34 -0700)]
Merge branch 'maint-1.8.1' into maint

* maint-1.8.1:
  git help config: s/insn/instruction/

11 years agot5516: test interaction between pushURL and pushInsteadOf correctly
Junio C Hamano [Thu, 28 Mar 2013 15:39:39 +0000 (28 08:39 -0700)]
t5516: test interaction between pushURL and pushInsteadOf correctly

1c2eafb89bca (Add url.<base>.pushInsteadOf: URL rewriting for push
only, 2009-09-07) wants to make sure that a push destination read
from URL is not rewritten by pushInsteadOf because an explicit
pushURL exists; for that, a pushInsteadOf rewrite rule for the value
of remote.r.URL is set to a non-existent is set up.

We would also want to make sure that pushInsteadOf rewrite rule is
not applied to the location read from pushURL.

This way, we will make sure that

 - "testrepo/" (pushURL) gets updated;

 - the push does not try to update "trash2/" (the result of applying
   pushInsteadOf to pushURL);

 - the push does not try to update "trash3/" (the result of applying
   pushInsteadOf to URL).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit help config: s/insn/instruction/
Matthias Krüger [Wed, 27 Mar 2013 22:53:50 +0000 (27 23:53 +0100)]
git help config: s/insn/instruction/

"insn" appears to be an in-code abbreviation and should not appear
in manual/help pages.

Signed-off-by: Matthias Krüger <matthias.krueger@famsik.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5520: use test_config to set/unset git config variables (leftover bits)
Ramkumar Ramachandra [Thu, 28 Mar 2013 12:40:19 +0000 (28 18:10 +0530)]
t5520: use test_config to set/unset git config variables (leftover bits)

Configuration from test_config does not last beyond the end of the
current test assertion, making each test easier to think about in
isolation.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoAvoid loading commits twice in log with diffs
Thomas Rast [Thu, 28 Mar 2013 08:19:34 +0000 (28 09:19 +0100)]
Avoid loading commits twice in log with diffs

If you run a log with diffs (such as -p, --raw, --stat etc.) the
current code ends up loading many objects twice.  For example, for
'log -3000 -p' my instrumentation said the objects loaded more than
once are distributed as follows:

  2008 blob
  2103 commit
  2678 tree

Fixing blobs and trees will be harder, because those are really used
within the diff engine and need some form of caching.

However, fixing the commits is easy at least at the band-aid level.
They are triggered by log_tree_diff() invoking diff_tree_sha1() on
commits, which duly loads the specified object to dereference it to a
tree.  Since log_tree_diff() knows that it works with commits and they
must have trees, we can simply pass through the trees.

We add some parse_commit() calls.  The ones for the parents are
required; we do not know at this stage if they have been looked at.
The one for the commit itself is pure paranoia, but has about the same
cost as an assertion on commit->object.parsed.

This has a quite dramatic effect on log --raw, though only a
negligible impact on log -p:

Test                      this tree         HEAD
--------------------------------------------------------------------
4000.2: log --raw -3000   0.50(0.43+0.06)   0.54(0.46+0.06) +7.0%***
4000.3: log -p -3000      2.34(2.20+0.13)   2.37(2.22+0.13) +1.2%
--------------------------------------------------------------------
Significance hints:  '.' 0.1  '*' 0.05  '**' 0.01  '***' 0.001

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agolog: read gpg settings for signed commit verification
Jacob Sarvis [Wed, 27 Mar 2013 15:13:39 +0000 (27 10:13 -0500)]
log: read gpg settings for signed commit verification

"show --show-signature" and "log --show-signature" do not read the
gpg.program setting from git config, even though, commit signing,
tag signing, and tag verification honor it.

Signed-off-by: Jacob Sarvis <jsarvis@openspan.com>
Signed-off-by: Hans Brigman <hbrigman@openspan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoclone: run check_everything_connected
Jeff King [Mon, 25 Mar 2013 20:26:27 +0000 (25 16:26 -0400)]
clone: run check_everything_connected

When we fetch from a remote, we do a revision walk to make
sure that what we received is connected to our existing
history. We do not do the same check for clone, which should
be able to check that we received an intact history graph.

The upside of this patch is that it will make clone more
resilient against propagating repository corruption. The
downside is that we will now traverse "rev-list --objects
--all" down to the roots, which may take some time (it is
especially noticeable for a "--local --bare" clone).

Note that we need to adjust t5710, which tries to make such
a bogus clone. Rather than checking after the fact that our
clone is bogus, we can simplify it to just make sure "git
clone" reports failure.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoclone: die on errors from unpack_trees
Jeff King [Mon, 25 Mar 2013 20:23:59 +0000 (25 16:23 -0400)]
clone: die on errors from unpack_trees

When clone is populating the working tree, it ignores the
return status from unpack_trees; this means we may report a
successful clone, even when the checkout fails.

When checkout fails, we may want to leave the $GIT_DIR in
place, as it might be possible to recover the data through
further use of "git checkout" (e.g., if the checkout failed
due to a transient error, disk full, etc). However, we
already die on a number of other checkout-related errors, so
this patch follows that pattern.

In addition to marking a now-passing test, we need to adjust
t5710, which blindly assumed it could make bogus clones of
very deep alternates hierarchies. By using "--bare", we can
avoid it actually touching any objects.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoadd tests for cloning corrupted repositories
Jeff King [Mon, 25 Mar 2013 20:22:29 +0000 (25 16:22 -0400)]
add tests for cloning corrupted repositories

We try not to let corruption pass unnoticed over fetches and
clones. For the most part, this works, but there are some
broken corner cases, including:

  1. We do not detect missing objects over git-aware
     transports. This is a little hard to test, because the
     sending side will actually complain about the missing
     object.

     To fool it, we corrupt a repository such that we have a
     "misnamed" object: it claims to be sha1 X, but is
     really Y. This lets the sender blindly transmit it, but
     it is the receiver's responsibility to verify that what
     it got is sane (and it does not).

  2. We do not detect missing or misnamed blobs during the
     checkout phase of clone.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostreaming_write_entry: propagate streaming errors
Jeff King [Mon, 25 Mar 2013 21:49:36 +0000 (25 17:49 -0400)]
streaming_write_entry: propagate streaming errors

When we are streaming an index blob to disk, we store the
error from stream_blob_to_fd in the "result" variable, and
then immediately overwrite that with the return value of
"close". That means we catch errors on close (e.g., problems
committing the file to disk), but miss anything which
happened before then.

We can fix this by using bitwise-OR to accumulate errors in
our result variable.

While we're here, we can also simplify the error handling
with an early return, which makes it easier to see under
which circumstances we need to clean up.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoadd test for streaming corrupt blobs
Jeff King [Mon, 25 Mar 2013 20:21:34 +0000 (25 16:21 -0400)]
add test for streaming corrupt blobs

We do not have many tests for handling corrupt objects. This
new test at least checks that we detect a byte error in a
corrupt blob object while streaming it out with cat-file.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoavoid infinite loop in read_istream_loose
Jeff King [Mon, 25 Mar 2013 20:21:14 +0000 (25 16:21 -0400)]
avoid infinite loop in read_istream_loose

The read_istream_loose function loops on inflating a chunk of data
from an mmap'd loose object. We end the loop when we run out
of space in our output buffer, or if we see a zlib error.

We need to treat Z_BUF_ERROR specially, though, as it is not
fatal; it is just zlib's way of telling us that we need to
either feed it more input or give it more output space. It
is perfectly normal for us to hit this when we are at the
end of our buffer.

However, we may also get Z_BUF_ERROR because we have run out
of input. In a well-formed object, this should not happen,
because we have fed the whole mmap'd contents to zlib. But
if the object is truncated or corrupt, we will loop forever,
never giving zlib any more data, but continuing to ask it to
inflate.

We can fix this by considering it an error when zlib returns
Z_BUF_ERROR but we still have output space left (which means
it must want more input, which we know is a truncation
error). It would not be sufficient to just check whether
zlib had consumed all the input at the start of the loop, as
it might still want to generate output from what is in its
internal state.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoread_istream_filtered: propagate read error from upstream
Jeff King [Mon, 25 Mar 2013 20:18:16 +0000 (25 16:18 -0400)]
read_istream_filtered: propagate read error from upstream

The filter istream pulls data from an "upstream" stream,
running it through a filter function. However, we did not
properly notice when the upstream filter yielded an error,
and just returned what we had read. Instead, we should
propagate the error.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocheck_sha1_signature: check return value from read_istream
Jeff King [Mon, 25 Mar 2013 20:17:17 +0000 (25 16:17 -0400)]
check_sha1_signature: check return value from read_istream

It's possible for read_istream to return an error, in which
case we just end up in an infinite loop (aside from EOF, we
do not even look at the result, but just feed it straight
into our running hash).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agostream_blob_to_fd: detect errors reading from stream
Jeff King [Mon, 25 Mar 2013 20:16:50 +0000 (25 16:16 -0400)]
stream_blob_to_fd: detect errors reading from stream

We call read_istream, but never check its return value for
errors. This can lead to us looping infinitely, as we just
keep trying to write "-1" bytes (and we do not notice the
error, as we simply check that write_in_full reports the
same number of bytes we fed it, which of course is also -1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint'
Junio C Hamano [Wed, 27 Mar 2013 17:58:07 +0000 (27 10:58 -0700)]
Merge branch 'maint'

* maint:
  More fixes for 1.8.2.1
  merge-tree: fix typo in merge-tree.c::unresolved
  git-commit doc: describe use of multiple `-m` options
  git-pull doc: fix grammo ("conflicts" is plural)

11 years agoMore fixes for 1.8.2.1
Junio C Hamano [Wed, 27 Mar 2013 17:57:57 +0000 (27 10:57 -0700)]
More fixes for 1.8.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint-1.8.1' into maint
Junio C Hamano [Wed, 27 Mar 2013 17:51:10 +0000 (27 10:51 -0700)]
Merge branch 'maint-1.8.1' into maint

* maint-1.8.1:
  merge-tree: fix typo in merge-tree.c::unresolved
  git-commit doc: describe use of multiple `-m` options
  git-pull doc: fix grammo ("conflicts" is plural)

11 years agomerge-tree: fix typo in merge-tree.c::unresolved
John Keeping [Wed, 27 Mar 2013 15:58:50 +0000 (27 15:58 +0000)]
merge-tree: fix typo in merge-tree.c::unresolved

When calculating whether there is a d/f conflict, the calculation of
whether both sides are directories generates an incorrect references
mask because it does not use the loop index to set the correct bit.
Fix this typo.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-commit doc: describe use of multiple `-m` options
Christian Helmuth [Wed, 27 Mar 2013 14:19:35 +0000 (27 15:19 +0100)]
git-commit doc: describe use of multiple `-m` options

The text is copied from Documentation/git-tag.txt.

Signed-off-by: Christian Helmuth <christian.helmuth@genode-labs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-pull doc: fix grammo ("conflicts" is plural)
Mihai Capotă [Wed, 27 Mar 2013 11:04:51 +0000 (27 12:04 +0100)]
git-pull doc: fix grammo ("conflicts" is plural)

Signed-off-by: Mihai Capotă <mihai@mihaic.ro>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'master' of git://git.bogomips.org/git-svn
Junio C Hamano [Wed, 27 Mar 2013 16:29:05 +0000 (27 09:29 -0700)]
Merge branch 'master' of git://git.bogomips.org/git-svn

* 'master' of git://git.bogomips.org/git-svn:
  git-svn: Support custom tunnel schemes instead of SSH only

11 years agoMerge branch 'rs/archive-zip-raw-compression'
Junio C Hamano [Wed, 27 Mar 2013 16:28:53 +0000 (27 09:28 -0700)]
Merge branch 'rs/archive-zip-raw-compression'

* rs/archive-zip-raw-compression:
  archive-zip: use deflateInit2() to ask for raw compressed data

11 years agoMerge branch 'ap/combine-diff-ignore-whitespace'
Junio C Hamano [Wed, 27 Mar 2013 16:28:50 +0000 (27 09:28 -0700)]
Merge branch 'ap/combine-diff-ignore-whitespace'

Teach "diff --cc" output to honor options to ignore various forms
of whitespace changes.

* ap/combine-diff-ignore-whitespace:
  Allow combined diff to ignore white-spaces

11 years agocheckout: avoid unnecessary match_pathspec calls
Nguyễn Thái Ngọc Duy [Wed, 27 Mar 2013 05:58:21 +0000 (27 12:58 +0700)]
checkout: avoid unnecessary match_pathspec calls

In checkout_paths() we do this

 - for all updated items, call match_pathspec
 - for all items, call match_pathspec (inside unmerge_cache)
 - for all items, call match_pathspec (for showing "path .. is unmerged)
 - for updated items, call match_pathspec and update paths

That's a lot of duplicate match_pathspec(s) and the function is not
exactly cheap to be called so many times, especially on large indexes.
This patch makes it call match_pathspec once per updated index entry,
save the result in ce_flags and reuse the results in the following
loops.

The changes in 0a1283b (checkout $tree $path: do not clobber local
changes in $path not in $tree - 2011-09-30) limit the affected paths
to ones we read from $tree. We do not do anything to other modified
entries in this case, so the "for all items" above could be modified
to "for all updated items". But..

The command's behavior now is modified slightly: unmerged entries that
match $path, but not updated by $tree, are now NOT touched.  Although
this should be considered a bug fix, not a regression. A new test is
added for this change.

And while at there, free ps_matched after use.

The following command is tested on webkit, 215k entries. The pattern
is chosen mainly to make match_pathspec sweat:

git checkout -- "*[a-zA-Z]*[a-zA-Z]*[a-zA-Z]*"

        before      after
real    0m3.493s    0m2.737s
user    0m2.239s    0m1.586s
sys     0m1.252s    0m1.151s

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-svn: Support custom tunnel schemes instead of SSH only
Sebastian Schuberth [Tue, 26 Mar 2013 21:24:38 +0000 (26 22:24 +0100)]
git-svn: Support custom tunnel schemes instead of SSH only

This originates from an msysgit pull request, see:

https://github.com/msysgit/git/pull/58

Signed-off-by: Eric Wieser <wieser.eric@gmail.com>
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
11 years agosafe_create_leading_directories: fix race that could give a false negative
Steven Walter [Sun, 17 Mar 2013 14:09:27 +0000 (17 10:09 -0400)]
safe_create_leading_directories: fix race that could give a false negative

If two processes are racing to create the same directory tree, they
will both see that the directory doesn't exist, both try to mkdir(),
and one of them will fail.  This is okay, as we only care that the
directory gets created.  So, we add a check for EEXIST from mkdir,
and continue when the directory exists, taking the same codepath as
the case where the earlier stat() succeeds and finds a directory.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMore topics from the second batch for 1.8.3
Junio C Hamano [Tue, 26 Mar 2013 20:01:27 +0000 (26 13:01 -0700)]
More topics from the second batch for 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jc/reflog-reverse-walk'
Junio C Hamano [Tue, 26 Mar 2013 20:15:56 +0000 (26 13:15 -0700)]
Merge branch 'jc/reflog-reverse-walk'

An internal function used to implement "git checkout @{-1}" was
hard to use correctly.

* jc/reflog-reverse-walk:
  refs.c: fix fread error handling
  reflog: add for_each_reflog_ent_reverse() API
  for_each_recent_reflog_ent(): simplify opening of a reflog file
  for_each_reflog_ent(): extract a helper to process a single entry

11 years agoMerge branch 'kb/p4merge'
Junio C Hamano [Tue, 26 Mar 2013 20:15:24 +0000 (26 13:15 -0700)]
Merge branch 'kb/p4merge'

Adjust the order mergetools feeds the files to the p4merge backend
to match the p4 convention.

* kb/p4merge:
  merge-one-file: force content conflict for "both sides added" case
  git-merge-one-file: send "ERROR:" messages to stderr
  git-merge-one-file: style cleanup
  merge-one-file: remove stale comment
  mergetools/p4merge: create a base if none available
  mergetools/p4merge: swap LOCAL and REMOTE

11 years agoMerge branch 'maint'
Junio C Hamano [Tue, 26 Mar 2013 20:14:45 +0000 (26 13:14 -0700)]
Merge branch 'maint'

* maint:
  More corrections for 1.8.2.1
  Correct the docs about GIT_SSH.

11 years agoMore corrections for 1.8.2.1
Junio C Hamano [Tue, 26 Mar 2013 19:53:49 +0000 (26 12:53 -0700)]
More corrections for 1.8.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'maint-1.8.1' into maint
Junio C Hamano [Tue, 26 Mar 2013 20:14:11 +0000 (26 13:14 -0700)]
Merge branch 'maint-1.8.1' into maint

* maint-1.8.1:
  Correct the docs about GIT_SSH.

11 years agoMerge branch 'we/submodule-update-prefix-output' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:44:26 +0000 (26 12:44 -0700)]
Merge branch 'we/submodule-update-prefix-output' into maint

"git submodule update", when recursed into sub-submodules, did not
acccumulate the prefix paths.

* we/submodule-update-prefix-output:
  submodule update: when using recursion, show full path

11 years agoMerge branch 'jk/mailsplit-maildir-muttsort' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:44:11 +0000 (26 12:44 -0700)]
Merge branch 'jk/mailsplit-maildir-muttsort' into maint

Sort filenames read from the maildir/ in a way that is more likely
to sort messages in the order the writing MUA meant to, by sorting
numeric segment in numeric order and non-numeric segment in
alphabetical order.

* jk/mailsplit-maildir-muttsort:
  mailsplit: sort maildir filenames more cleverly

11 years agoMerge branch 'rs/zip-compresssed-size-with-export-subst' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:43:49 +0000 (26 12:43 -0700)]
Merge branch 'rs/zip-compresssed-size-with-export-subst' into maint

When export-subst is used, "zip" output recorded incorrect
size of the file.

* rs/zip-compresssed-size-with-export-subst:
  archive-zip: fix compressed size for stored export-subst files

11 years agoMerge branch 'jk/utf-8-can-be-spelled-differently' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:43:25 +0000 (26 12:43 -0700)]
Merge branch 'jk/utf-8-can-be-spelled-differently' into maint

Some platforms and users spell UTF-8 differently; retry with the
most official "UTF-8" when the system does not understand the
user-supplied encoding name that are the common alternative
spellings of UTF-8.

* jk/utf-8-can-be-spelled-differently:
  utf8: accept alternate spellings of UTF-8

11 years agoMerge branch 'nd/branch-error-cases' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:43:05 +0000 (26 12:43 -0700)]
Merge branch 'nd/branch-error-cases' into maint

"git branch" had more cases where it did not bother to check
nonsense command line parameters.

* nd/branch-error-cases:
  branch: segfault fixes and validation

11 years agoMerge branch 'ap/maint-update-index-h-is-for-help' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:42:42 +0000 (26 12:42 -0700)]
Merge branch 'ap/maint-update-index-h-is-for-help' into maint

"git update-index -h" did not do the usual "-h(elp)" thing.

* ap/maint-update-index-h-is-for-help:
  update-index: allow "-h" to also display options

11 years agoMerge branch 'jc/perl-cat-blob' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:42:24 +0000 (26 12:42 -0700)]
Merge branch 'jc/perl-cat-blob' into maint

perl/Git.pm::cat_blob slurped everything in core only to write it
out to a file descriptor, which was not a very smart thing to do.

* jc/perl-cat-blob:
  Git.pm: fix cat_blob crashes on large files

11 years agoMerge branch 'ob/imap-send-ssl-verify' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:41:59 +0000 (26 12:41 -0700)]
Merge branch 'ob/imap-send-ssl-verify' into maint

Correctly connect to SSL/TLS sites that serve multiple hostnames on
a single IP by including Server Name Indication in the client-hello.

* ob/imap-send-ssl-verify:
  imap-send: support Server Name Indication (RFC4366)

11 years agoMerge branch 'nd/index-pack-l10n-buf-overflow' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:40:19 +0000 (26 12:40 -0700)]
Merge branch 'nd/index-pack-l10n-buf-overflow' into maint

* nd/index-pack-l10n-buf-overflow:
  index-pack: fix buffer overflow caused by translations

11 years agoMerge branch 'jc/maint-push-refspec-default-doc' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:40:13 +0000 (26 12:40 -0700)]
Merge branch 'jc/maint-push-refspec-default-doc' into maint

* jc/maint-push-refspec-default-doc:
  Documentation/git-push: clarify the description of defaults

11 years agoMerge branch 'wk/user-manual-literal-format' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:40:11 +0000 (26 12:40 -0700)]
Merge branch 'wk/user-manual-literal-format' into maint

* wk/user-manual-literal-format:
  user-manual: Standardize backtick quoting

11 years agoMerge branch 'gp/avoid-explicit-mention-of-dot-git-refs' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:40:04 +0000 (26 12:40 -0700)]
Merge branch 'gp/avoid-explicit-mention-of-dot-git-refs' into maint

* gp/avoid-explicit-mention-of-dot-git-refs:
  Fix ".git/refs" stragglers

11 years agoMerge branch 'jc/maint-reflog-expire-clean-mark-typofix' into maint
Junio C Hamano [Tue, 26 Mar 2013 19:39:51 +0000 (26 12:39 -0700)]
Merge branch 'jc/maint-reflog-expire-clean-mark-typofix' into maint

In "git reflog expire", REACHABLE bit was not cleared from the
correct objects.

* jc/maint-reflog-expire-clean-mark-typofix:
  reflog: fix typo in "reflog expire" clean-up codepath

11 years agoattr.c::path_matches(): the basename is part of the pathname
Junio C Hamano [Tue, 26 Mar 2013 17:28:07 +0000 (26 10:28 -0700)]
attr.c::path_matches(): the basename is part of the pathname

The function takes two strings (pathname and basename) as if they
are independent strings, but in reality, the latter is always
pointing into a substring in the former.

Clarify this relationship by expressing the latter as an offset into
the former.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoCorrect the docs about GIT_SSH.
Dan Bornstein [Thu, 21 Mar 2013 23:06:40 +0000 (21 23:06 +0000)]
Correct the docs about GIT_SSH.

In particular, it can get called with four arguments if you happen to
be referring to a repo using the ssh:// scheme with a non-default port
number.

Signed-off-by: Dan Bornstein <danfuzz@milk.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocommit-tree: document -S option consistently
Brad King [Mon, 25 Mar 2013 21:00:07 +0000 (25 17:00 -0400)]
commit-tree: document -S option consistently

Commit ba3c69a9 (commit: teach --gpg-sign option, 2011-10-05) added the
-S option but documented it in the command usage without indicating that
the value is optional and forgot to mention it in the manpage.  Later
commit 098bbdc3 (Add -S, --gpg-sign option to manpage of "git commit",
2012-10-21) documented the option in the porcelain manpage.

Use wording from the porcelain manpage to document the option in the
plumbing manpage.  Also update the commit-tree usage summary to indicate
that the -S value is optional to be consistent with the manpage and with
the implementation.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMake core.sharedRepository work under cygwin 1.7
Torsten Bögershausen [Sat, 23 Mar 2013 12:40:29 +0000 (23 13:40 +0100)]
Make core.sharedRepository work under cygwin 1.7

When core.sharedRepository is used, set_shared_perm() in path.c
needs lstat() to return the correct POSIX permissions.

The default for cygwin is core.ignoreCygwinFSTricks = false, which
means that the fast implementation in do_stat() is used instead of
lstat().

lstat() under cygwin uses the Windows security model to implement
POSIX-like permissions.  The user, group or everyone bits can be set
individually.

do_stat() simplifes the file permission bits, and may return a wrong
value.  The read-only attribute of a file is used to calculate the
permissions, resulting in either rw-r--r-- or r--r--r--

One effect of the simplified do_stat() is that t1301 fails.

Add a function cygwin_get_st_mode_bits() which returns the POSIX
permissions.  When not compiling for cygwin, true_mode_bits() in
path.c is used.

Side note:

t1301 passes under cygwin 1.5.

The "user write" bit is synchronized with the "read only" attribute
of a file:

    $ chmod 444 x
    $ attrib x
    A    R     C:\temp\pt\x

    cygwin 1.7 would show
    A          C:\temp\pt\x

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agocombine-diff: coalesce lost lines optimally
Antoine Pelisse [Sat, 23 Mar 2013 17:23:28 +0000 (23 18:23 +0100)]
combine-diff: coalesce lost lines optimally

This replaces the greedy implementation to coalesce lost lines by using
dynamic programming to find the Longest Common Subsequence.

The O(n²) time complexity is obviously bigger than previous
implementation but it can produce shorter diff results (and most likely
easier to read).

List of lost lines is now doubly-linked because we reverse-read it when
reading the direction matrix.

Signed-off-by: Antoine Pelisse <apelisse@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoSecond wave of topics toward 1.8.3
Junio C Hamano [Mon, 25 Mar 2013 21:08:00 +0000 (25 14:08 -0700)]
Second wave of topics toward 1.8.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/fully-peeled-packed-ref'
Junio C Hamano [Mon, 25 Mar 2013 21:01:07 +0000 (25 14:01 -0700)]
Merge branch 'jk/fully-peeled-packed-ref'

Not that we do not actively encourage having annotated tags outside
refs/tags/ hierarchy, but they were not advertised correctly to the
ls-remote and fetch with recent version of Git.

* jk/fully-peeled-packed-ref:
  pack-refs: add fully-peeled trait
  pack-refs: write peeled entry for non-tags
  use parse_object_or_die instead of die("bad object")
  avoid segfaults on parse_object failure

11 years agoMerge branch 'jk/fast-export-object-lookup'
Junio C Hamano [Mon, 25 Mar 2013 21:01:05 +0000 (25 14:01 -0700)]
Merge branch 'jk/fast-export-object-lookup'

* jk/fast-export-object-lookup:
  fast-export: do not load blob objects twice
  fast-export: rename handle_object function

11 years agoMerge branch 'jk/peel-ref'
Junio C Hamano [Mon, 25 Mar 2013 21:01:02 +0000 (25 14:01 -0700)]
Merge branch 'jk/peel-ref'

Recent optimization broke shallow clones.

* jk/peel-ref:
  upload-pack: load non-tip "want" objects from disk
  upload-pack: make sure "want" objects are parsed
  upload-pack: drop lookup-before-parse optimization

11 years agoMerge branch 'lf/setup-prefix-pathspec'
Junio C Hamano [Mon, 25 Mar 2013 21:01:00 +0000 (25 14:01 -0700)]
Merge branch 'lf/setup-prefix-pathspec'

"git cmd -- ':(top'" was not diagnosed as an invalid syntax, and
instead the parser kept reading beyond the end of the string.

* lf/setup-prefix-pathspec:
  setup.c: check that the pathspec magic ends with ")"
  setup.c: stop prefix_pathspec() from looping past the end of string

11 years agoMerge branch 'ph/tag-force-no-warn-on-creation'
Junio C Hamano [Mon, 25 Mar 2013 21:00:57 +0000 (25 14:00 -0700)]
Merge branch 'ph/tag-force-no-warn-on-creation'

"git tag -f <tag>" always said "Updated tag '<tag>'" even when
creating a new tag (i.e. not overwriting nor updating).

* ph/tag-force-no-warn-on-creation:
  tag: --force does not have to warn when creating tags

11 years agoMerge branch 'mg/unsigned-time-t'
Junio C Hamano [Mon, 25 Mar 2013 21:00:56 +0000 (25 14:00 -0700)]
Merge branch 'mg/unsigned-time-t'

A few workarounds for systems with unsigned time_t.

* mg/unsigned-time-t:
  Fix time offset calculation in case of unsigned time_t
  date.c: fix unsigned time_t comparison

11 years agoMerge branch 'jk/suppress-clang-warning'
Junio C Hamano [Mon, 25 Mar 2013 21:00:54 +0000 (25 14:00 -0700)]
Merge branch 'jk/suppress-clang-warning'

* jk/suppress-clang-warning:
  fix clang -Wtautological-compare with unsigned enum

11 years agoMerge branch 'pw/p4-symlinked-root'
Junio C Hamano [Mon, 25 Mar 2013 21:00:49 +0000 (25 14:00 -0700)]
Merge branch 'pw/p4-symlinked-root'

"git p4" did not behave well when the path to the root of the P4
client was not its real path.

* pw/p4-symlinked-root:
  git p4: avoid expanding client paths in chdir
  git p4 test: should honor symlink in p4 client root
  git p4 test: make sure P4CONFIG relative path works

11 years agoMerge branch 'jk/empty-archive'
Junio C Hamano [Mon, 25 Mar 2013 21:00:48 +0000 (25 14:00 -0700)]
Merge branch 'jk/empty-archive'

"git archive" reports a failure when asked to create an archive out
of an empty tree.  It would be more intuitive to give an empty
archive back in such a case.

* jk/empty-archive:
  archive: handle commits with an empty tree
  test-lib: factor out $GIT_UNZIP setup

11 years agoMerge branch 'ks/rfc2047-one-char-at-a-time'
Junio C Hamano [Mon, 25 Mar 2013 21:00:46 +0000 (25 14:00 -0700)]
Merge branch 'ks/rfc2047-one-char-at-a-time'

When "format-patch" quoted a non-ascii strings on the header files,
it incorrectly applied rfc2047 and chopped a single character in
the middle of it.

* ks/rfc2047-one-char-at-a-time:
  format-patch: RFC 2047 says multi-octet character may not be split

11 years agoMerge branch 'jk/alias-in-bare'
Junio C Hamano [Mon, 25 Mar 2013 21:00:44 +0000 (25 14:00 -0700)]
Merge branch 'jk/alias-in-bare'

An aliased command spawned from a bare repository that does not say
it is bare with "core.bare = yes" is treated as non-bare by mistake.

* jk/alias-in-bare:
  setup: suppress implicit "." work-tree for bare repos
  environment: add GIT_PREFIX to local_repo_env
  cache.h: drop LOCAL_REPO_ENV_SIZE

11 years agoMerge branch 'jc/push-follow-tag'
Junio C Hamano [Mon, 25 Mar 2013 21:00:40 +0000 (25 14:00 -0700)]
Merge branch 'jc/push-follow-tag'

The new "--follow-tags" option tells "git push" to push relevant
annotated tags when pushing branches out.

* jc/push-follow-tag:
  push: --follow-tags
  commit.c: use clear_commit_marks_many() in in_merge_bases_many()
  commit.c: add in_merge_bases_many()
  commit.c: add clear_commit_marks_many()

11 years agoMerge branch 'jc/maint-reflog-expire-clean-mark-typofix'
Junio C Hamano [Mon, 25 Mar 2013 21:00:39 +0000 (25 14:00 -0700)]
Merge branch 'jc/maint-reflog-expire-clean-mark-typofix'

In "git reflog expire", REACHABLE bit was not cleared from the
correct objects.

* jc/maint-reflog-expire-clean-mark-typofix:
  reflog: fix typo in "reflog expire" clean-up codepath

11 years agoMerge branch 'ap/maint-diff-rename-avoid-overlap'
Junio C Hamano [Mon, 25 Mar 2013 21:00:37 +0000 (25 14:00 -0700)]
Merge branch 'ap/maint-diff-rename-avoid-overlap'

The logic used by "git diff -M --stat" to shorten the names of
files before and after a rename did not work correctly when the
common prefix and suffix between the two filenames overlapped.

* ap/maint-diff-rename-avoid-overlap:
  tests: make sure rename pretty print works
  diff: prevent pprint_rename from underrunning input
  diff: Fix rename pretty-print when suffix and prefix overlap

11 years agoMerge branch 'jl/submodule-deinit'
Junio C Hamano [Mon, 25 Mar 2013 21:00:29 +0000 (25 14:00 -0700)]
Merge branch 'jl/submodule-deinit'

There was no Porcelain way to say "I no longer am interested in
this submodule", once you express your interest in a submodule with
"submodule init".  "submodule deinit" is the way to do so.

* jl/submodule-deinit:
  submodule: add 'deinit' command

11 years agoMerge branch 'jc/describe'
Junio C Hamano [Mon, 25 Mar 2013 21:00:23 +0000 (25 14:00 -0700)]
Merge branch 'jc/describe'

The "--match=<pattern>" option of "git describe", when used with
"--all" to allow refs that are not annotated tags to be used as a
base of description, did not restrict the output from the command
to those that match the given pattern.

We may want to have a looser matching that does not restrict to tags,
but that can be done as a follow-up topic; this step is purely a bugfix.

* jc/describe:
  describe: --match=<pattern> must limit the refs even when used with --all

11 years agoMerge branch 'pe/pull-rebase-v-q'
Junio C Hamano [Mon, 25 Mar 2013 20:58:34 +0000 (25 13:58 -0700)]
Merge branch 'pe/pull-rebase-v-q'

Teach "git pull --rebase" to pass "-v/-q" command line options to
underlying "git rebase".

* pe/pull-rebase-v-q:
  pull: Apply -q and -v options to rebase mode as well

11 years agoMerge branch 'maint'
Junio C Hamano [Mon, 25 Mar 2013 20:52:25 +0000 (25 13:52 -0700)]
Merge branch 'maint'

* maint:
  Start preparing for 1.8.2.1
  transport.c: help gcc 4.6.3 users by squelching compiler warning

11 years agoStart preparing for 1.8.2.1
Junio C Hamano [Mon, 25 Mar 2013 20:51:13 +0000 (25 13:51 -0700)]
Start preparing for 1.8.2.1

... at the same time, preparation for 1.8.1.6 also has started ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agoMerge branch 'jk/graph-c-expose-symbols-for-cgit' into maint
Junio C Hamano [Mon, 25 Mar 2013 20:48:39 +0000 (25 13:48 -0700)]
Merge branch 'jk/graph-c-expose-symbols-for-cgit' into maint

In the v1.8.0 era, we changed symbols that do not have to be global
to file scope static, but a few functions in graph.c were used by
CGit from sideways bypassing the entry points of the API the
in-tree users use.

* jk/graph-c-expose-symbols-for-cgit:
  Revert "graph.c: mark private file-scope symbols as static"

11 years agoMerge branch 'maint-1.8.1' into maint
Junio C Hamano [Mon, 25 Mar 2013 20:46:42 +0000 (25 13:46 -0700)]
Merge branch 'maint-1.8.1' into maint

* maint-1.8.1:
  bundle: Add colons to list headings in "verify"
  bundle: Fix "verify" output if history is complete
  Documentation: filter-branch env-filter example
  git-filter-branch.txt: clarify ident variables usage
  git-compat-util.h: Provide missing netdb.h definitions
  describe: Document --match pattern format
  Documentation/githooks: Explain pre-rebase parameters
  update-index: list supported idx versions and their features
  diff-options: unconfuse description of --color
  read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
  index-format.txt: mention of v4 is missing in some places

11 years agoMerge branch 'lf/bundle-verify-list-prereqs' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:46:02 +0000 (25 13:46 -0700)]
Merge branch 'lf/bundle-verify-list-prereqs' into maint-1.8.1

"git bundle verify" did not say "records a complete history" for a
bundle that does not have any prerequisites.

* lf/bundle-verify-list-prereqs:
  bundle: Add colons to list headings in "verify"
  bundle: Fix "verify" output if history is complete

11 years agoMerge branch 'tk/doc-filter-branch' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:45:53 +0000 (25 13:45 -0700)]
Merge branch 'tk/doc-filter-branch' into maint-1.8.1

Add an example use of "--env-filter" in "filter-branch"
documentation.

* tk/doc-filter-branch:
  Documentation: filter-branch env-filter example
  git-filter-branch.txt: clarify ident variables usage

11 years agoMerge branch 'dm/ni-maxhost-may-be-missing' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:45:42 +0000 (25 13:45 -0700)]
Merge branch 'dm/ni-maxhost-may-be-missing' into maint-1.8.1

Some sources failed to compile on systems that lack NI_MAXHOST in
their system header.

* dm/ni-maxhost-may-be-missing:
  git-compat-util.h: Provide missing netdb.h definitions

11 years agoMerge branch 'gp/describe-match-uses-glob-pattern' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:45:33 +0000 (25 13:45 -0700)]
Merge branch 'gp/describe-match-uses-glob-pattern' into maint-1.8.1

The "--match=<pattern>" argument "git describe" takes uses glob
pattern but it wasn't obvious from the documentation.

* gp/describe-match-uses-glob-pattern:
  describe: Document --match pattern format

11 years agoMerge branch 'nd/doc-index-format' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:45:26 +0000 (25 13:45 -0700)]
Merge branch 'nd/doc-index-format' into maint-1.8.1

The v4 index format was not documented.

* nd/doc-index-format:
  update-index: list supported idx versions and their features
  read-cache.c: use INDEX_FORMAT_{LB,UB} in verify_hdr()
  index-format.txt: mention of v4 is missing in some places

11 years agoMerge branch 'wk/doc-pre-rebase' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:45:14 +0000 (25 13:45 -0700)]
Merge branch 'wk/doc-pre-rebase' into maint-1.8.1

The arguments given to pre-rebase hook were not documented.

* wk/doc-pre-rebase:
  Documentation/githooks: Explain pre-rebase parameters

11 years agoMerge branch 'jc/color-diff-doc' into maint-1.8.1
Junio C Hamano [Mon, 25 Mar 2013 20:44:53 +0000 (25 13:44 -0700)]
Merge branch 'jc/color-diff-doc' into maint-1.8.1

The "--color=<when>" argument to the commands in the diff family
was described poorly.

* jc/color-diff-doc:
  diff-options: unconfuse description of --color

11 years agomerge-one-file: force content conflict for "both sides added" case
Junio C Hamano [Mon, 25 Mar 2013 17:05:13 +0000 (25 10:05 -0700)]
merge-one-file: force content conflict for "both sides added" case

Historically, we tried to be lenient to "both sides added, slightly
differently" case and as long as the files can be merged using a
made-up common ancestor cleanly, since f7d24bbefb06 (merge with
/dev/null as base, instead of punting O==empty case, 2005-11-07).

This was later further refined to use a better made-up common file
with fd66dbf5297a (merge-one-file: use empty- or common-base
condintionally in two-stage merge., 2005-11-10), but the spirit has
been the same.

But the original fix in f7d24bbefb06 to avoid punting on "both sides
added" case had a code to unconditionally error out the merge.  When
this triggers, even though the content-level merge can be done
cleanly, we end up not saying "content conflict" in the message, but
still issue the error message, showing "ERROR: in <pathname>".

Move that "always fail for add/add conflict" logic a bit higher to
fix this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agotransport.c: help gcc 4.6.3 users by squelching compiler warning
Junio C Hamano [Mon, 25 Mar 2013 19:51:50 +0000 (25 12:51 -0700)]
transport.c: help gcc 4.6.3 users by squelching compiler warning

To a human reader, it is quite obvious that cmp is assigned before
it is used, but gcc 4.6.3 that ships with Ubuntu 12.04 is among
those that do not get this right.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-merge-one-file: send "ERROR:" messages to stderr
Kevin Bracey [Sun, 24 Mar 2013 12:26:24 +0000 (24 14:26 +0200)]
git-merge-one-file: send "ERROR:" messages to stderr

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agogit-merge-one-file: style cleanup
Kevin Bracey [Sun, 24 Mar 2013 12:26:23 +0000 (24 14:26 +0200)]
git-merge-one-file: style cleanup

Update style to match Documentation/CodingGuidelines.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomerge-one-file: remove stale comment
Junio C Hamano [Mon, 25 Mar 2013 17:48:24 +0000 (25 10:48 -0700)]
merge-one-file: remove stale comment

The "funny filename" comment was from b539c5e8fbd3 (git-merge-one:
new merge world order., 2005-12-07) where the removed code just
before that new comment ended with:

        merge "$4" "$orig" "$src2"

(yes, we used to use "merge" program from the RCS suite).  The
comment refers to one of the bad side effect the old code used to
have and warns against such a practice, i.e. it was talking about
the code that no longer existed.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agomatch-trees: simplify score_trees() using tree_entry()
René Scharfe [Sun, 24 Mar 2013 22:46:28 +0000 (24 23:46 +0100)]
match-trees: simplify score_trees() using tree_entry()

Convert the loop in score_trees() to tree_entry().  The code becomes
shorter and simpler because the calls to update_tree_entry() are not
needed any more.

Another benefit is that we need less variables to track the current
tree entries; as a side-effect of that the compiler has an easier
job figuring out the control flow and thus can avoid false warnings
about uninitialized variables.

Using struct name_entry also allows the use of tree_entry_len() for
finding the path length instead of strlen(), which may be slightly
more efficient.

Also unify the handling of missing entries in one of the two trees
(i.e. added or removed files): Just set cmp appropriately first, no
matter if we ran off the end of a tree or if we actually have two
entries to compare, and check its value a bit later without
duplicating the handler code.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7600: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:12 +0000 (24 22:06 +0100)]
t7600: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Tests are modified to assume default configuration at entry,
and to reset the modified configuration variables at the end.

Test 'merge log message' was relying on the presence of option `--no-ff`
in the configuration. With the option, git show -s --pretty=format:%b HEAD
produces an empty line and without the option, it produces an empty file.
The test is modified to check with and without `--no-ff` option.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7502: remove clear_config
Yann Droneaud [Sun, 24 Mar 2013 21:06:14 +0000 (24 22:06 +0100)]
t7502: remove clear_config

Using test_config ensure the configuration variable are removed
at the end of the test, there's no need to remove variable
at the beginning of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7502: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:10 +0000 (24 22:06 +0100)]
t7502: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot9500: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:13 +0000 (24 22:06 +0100)]
t9500: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7508: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:11 +0000 (24 22:06 +0100)]
t7508: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot7500: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:09 +0000 (24 22:06 +0100)]
t7500: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5541: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:08 +0000 (24 22:06 +0100)]
t5541: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 years agot5520: use test_config to set/unset git config variables
Yann Droneaud [Sun, 24 Mar 2013 21:06:07 +0000 (24 22:06 +0100)]
t5520: use test_config to set/unset git config variables

Instead of using construct such as:
    test_when_finished "git config --unset <key>"
    git config <key> <value>
uses
    test_config <key> <value>
The latter takes care of removing <key> at the end of the test.

Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>