gitweb.git
Merge branch 'jc/maint-push-refspec-default-doc' into... Junio C Hamano Tue, 26 Mar 2013 19:40:13 +0000 (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

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

Merge branch 'wk/user-manual-literal-format' into maint

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

Merge branch 'gp/avoid-explicit-mention-of-dot-git... Junio C Hamano Tue, 26 Mar 2013 19:40:04 +0000 (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

Merge branch 'jc/maint-reflog-expire-clean-mark-typofix... Junio C Hamano Tue, 26 Mar 2013 19:39:51 +0000 (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

attr.c::path_matches(): the basename is part of the... Junio C Hamano Tue, 26 Mar 2013 17:28:07 +0000 (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>

Correct the docs about GIT_SSH.Dan Bornstein Thu, 21 Mar 2013 23:06:40 +0000 (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>

commit-tree: document -S option consistentlyBrad King Mon, 25 Mar 2013 21:00:07 +0000 (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>

Make core.sharedRepository work under cygwin 1.7Torsten Bögershausen Sat, 23 Mar 2013 12:40:29 +0000 (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>

Second wave of topics toward 1.8.3Junio C Hamano Mon, 25 Mar 2013 21:08:00 +0000 (14:08 -0700)

Second wave of topics toward 1.8.3

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

Merge branch 'jk/fully-peeled-packed-ref'Junio C Hamano Mon, 25 Mar 2013 21:01:07 +0000 (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

Merge branch 'jk/fast-export-object-lookup'Junio C Hamano Mon, 25 Mar 2013 21:01:05 +0000 (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

Merge branch 'jk/peel-ref'Junio C Hamano Mon, 25 Mar 2013 21:01:02 +0000 (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

Merge branch 'lf/setup-prefix-pathspec'Junio C Hamano Mon, 25 Mar 2013 21:01:00 +0000 (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

Merge branch 'ph/tag-force-no-warn-on-creation'Junio C Hamano Mon, 25 Mar 2013 21:00:57 +0000 (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

Merge branch 'mg/unsigned-time-t'Junio C Hamano Mon, 25 Mar 2013 21:00:56 +0000 (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

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

Merge branch 'jk/suppress-clang-warning'

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

Merge branch 'pw/p4-symlinked-root'Junio C Hamano Mon, 25 Mar 2013 21:00:49 +0000 (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

Merge branch 'jk/empty-archive'Junio C Hamano Mon, 25 Mar 2013 21:00:48 +0000 (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

Merge branch 'ks/rfc2047-one-char-at-a-time'Junio C Hamano Mon, 25 Mar 2013 21:00:46 +0000 (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

Merge branch 'jk/alias-in-bare'Junio C Hamano Mon, 25 Mar 2013 21:00:44 +0000 (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

Merge branch 'jc/push-follow-tag'Junio C Hamano Mon, 25 Mar 2013 21:00:40 +0000 (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()

Merge branch 'jc/maint-reflog-expire-clean-mark-typofix'Junio C Hamano Mon, 25 Mar 2013 21:00:39 +0000 (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

Merge branch 'ap/maint-diff-rename-avoid-overlap'Junio C Hamano Mon, 25 Mar 2013 21:00:37 +0000 (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

Merge branch 'jl/submodule-deinit'Junio C Hamano Mon, 25 Mar 2013 21:00:29 +0000 (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

Merge branch 'jc/describe'Junio C Hamano Mon, 25 Mar 2013 21:00:23 +0000 (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

Merge branch 'pe/pull-rebase-v-q'Junio C Hamano Mon, 25 Mar 2013 20:58:34 +0000 (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

Merge branch 'maint'Junio C Hamano Mon, 25 Mar 2013 20:52:25 +0000 (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

Start preparing for 1.8.2.1Junio C Hamano Mon, 25 Mar 2013 20:51:13 +0000 (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>

Merge branch 'jk/graph-c-expose-symbols-for-cgit' into... Junio C Hamano Mon, 25 Mar 2013 20:48:39 +0000 (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"

Merge branch 'maint-1.8.1' into maintJunio C Hamano Mon, 25 Mar 2013 20:46:42 +0000 (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

Merge branch 'lf/bundle-verify-list-prereqs' into maint... Junio C Hamano Mon, 25 Mar 2013 20:46:02 +0000 (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

Merge branch 'tk/doc-filter-branch' into maint-1.8.1Junio C Hamano Mon, 25 Mar 2013 20:45:53 +0000 (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

Merge branch 'dm/ni-maxhost-may-be-missing' into maint... Junio C Hamano Mon, 25 Mar 2013 20:45:42 +0000 (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

Merge branch 'gp/describe-match-uses-glob-pattern'... Junio C Hamano Mon, 25 Mar 2013 20:45:33 +0000 (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

Merge branch 'nd/doc-index-format' into maint-1.8.1Junio C Hamano Mon, 25 Mar 2013 20:45:26 +0000 (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

Merge branch 'wk/doc-pre-rebase' into maint-1.8.1Junio C Hamano Mon, 25 Mar 2013 20:45:14 +0000 (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

Merge branch 'jc/color-diff-doc' into maint-1.8.1Junio C Hamano Mon, 25 Mar 2013 20:44:53 +0000 (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

merge-one-file: force content conflict for "both sides... Junio C Hamano Mon, 25 Mar 2013 17:05:13 +0000 (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>

transport.c: help gcc 4.6.3 users by squelching compile... Junio C Hamano Mon, 25 Mar 2013 19:51:50 +0000 (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>

git-merge-one-file: send "ERROR:" messages to stderrKevin Bracey Sun, 24 Mar 2013 12:26:24 +0000 (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>

git-merge-one-file: style cleanupKevin Bracey Sun, 24 Mar 2013 12:26:23 +0000 (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>

merge-one-file: remove stale commentJunio C Hamano Mon, 25 Mar 2013 17:48:24 +0000 (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>

match-trees: simplify score_trees() using tree_entry()René Scharfe Sun, 24 Mar 2013 22:46:28 +0000 (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>

t7600: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:12 +0000 (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>

t7502: remove clear_configYann Droneaud Sun, 24 Mar 2013 21:06:14 +0000 (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>

t7502: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:10 +0000 (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>

t9500: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:13 +0000 (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>

t7508: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:11 +0000 (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>

t7500: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:09 +0000 (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>

t5541: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:08 +0000 (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>

t5520: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:07 +0000 (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>

t4202: use test_config/test_unconfig to set/unset git... Yann Droneaud Sun, 24 Mar 2013 21:06:06 +0000 (22:06 +0100)

t4202: use test_config/test_unconfig 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.

Additionally, instead of
git config <key> ""
or
git config --unset <key>
uses
test_unconfig <key>
The latter doesn't failed if <key> is not defined.

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

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

t4034: use test_config/test_unconfig to set/unset git... Yann Droneaud Sun, 24 Mar 2013 21:06:05 +0000 (22:06 +0100)

t4034: use test_config/test_unconfig 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.

Additionally, instead of
git config <key> ""
or
git config --unset <key>
uses
test_unconfig <key>
The latter doesn't failed if <key> is not defined.

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

t4304: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:04 +0000 (22:06 +0100)

t4304: 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 correct (default) configuration at entry,
and to reset the modified configuration variables at the end.

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

t3400: use test_config to set/unset git config variablesYann Droneaud Sun, 24 Mar 2013 21:06:03 +0000 (22:06 +0100)

t3400: 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>

refs.c: fix fread error handlingJohn Keeping Sat, 23 Mar 2013 17:16:46 +0000 (17:16 +0000)

refs.c: fix fread error handling

fread returns the number of items read, with no special error return.

Commit 98f85ff (reflog: add for_each_reflog_ent_reverse() API -
2013-03-08) introduced a call to fread which checks for an error with
"nread < 0" which is tautological since nread is unsigned. The correct
check in this case (which tries to read a single item) is "nread != 1".

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

status, branch: fix the misleading "bisecting" messageNguyễn Thái Ngọc Duy Sat, 23 Mar 2013 03:52:44 +0000 (10:52 +0700)

status, branch: fix the misleading "bisecting" message

The current message is "bisecting %s" (or "bisecting branch %s").
"%s" is the current branch when we started bisecting. Clarify that to
avoid confusion with good and bad refs passed to "bisect" command.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix revision walk for commits with the same datesKacper Kornet Fri, 22 Mar 2013 18:38:19 +0000 (19:38 +0100)

Fix revision walk for commits with the same dates

Logic in still_interesting function allows to stop the commits
traversing if the oldest processed commit is not older then the
youngest commit on the list to process and the list contains only
commits marked as not interesting ones. It can be premature when dealing
with a set of coequal commits. For example git rev-list A^! --not B
provides wrong answer if all commits in the range A..B had the same
commit time and there are more then 7 of them.

To fix this problem the relevant part of the logic in still_interesting
is changed to: the walk can be stopped if the oldest processed commit is
younger then the youngest commit on the list to processed.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: clarify logic in show_submodule_summaryJeff King Fri, 22 Mar 2013 16:19:56 +0000 (12:19 -0400)

submodule: clarify logic in show_submodule_summary

There are two uses of the "left" and "right" commit variables that
make it hard to be sure what values they have (both for the reader,
and for gcc, which wrongly complains that they might be used
uninitialized).

The function starts with a cascading if statement, checking that the
input sha1s exist, and finally working up to preparing a revision
walk. We only prepare the walk if the cascading conditional did not
find any problems, which we check by seeing whether it set the
"message" variable or not. It's simpler and more obvious to just add
a condition to the end of the cascade.

Later, we check the same "message" variable when deciding whether to
clear commit marks on the left/right commits; if it is set, we
presumably never started the walk. This is wrong, though; we might
have started the walk and munged commit flags, only to encounter an
error afterwards. We should always clear the flags on left/right if
they exist, whether the walk was successful or not.

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

apply --whitespace=fix: avoid running over the postimag... Junio C Hamano Fri, 22 Mar 2013 18:10:03 +0000 (11:10 -0700)

apply --whitespace=fix: avoid running over the postimage buffer

Originally update-pre-post-images could assume that any whitespace
fixing will make the result only shorter by unexpanding runs of
leading SPs into HTs and removing trailing whitespaces at the end of
lines. Updating the post-image we read from the patch to match the
actual result can be performed in-place under this assumption.
These days, however, we have tab-in-indent (aka Python) rule whose
result can be longer than the original, and we do need to allocate
a larger buffer than the input and replace the result.

Fortunately the support for lengthening rewrite was already added
when we began supporting "match while ignoring whitespace
differences" mode in 86c91f91794c (git apply: option to ignore
whitespace differences, 2009-08-04). We only need to correctly
count the number of bytes necessary to hold the updated result and
tell the function to allocate a new buffer.

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

Documentation: merging a tag is a special caseJunio C Hamano Thu, 21 Mar 2013 21:57:48 +0000 (22:57 +0100)

Documentation: merging a tag is a special case

When asking Git to merge a tag (such as a signed tag or annotated tag),
it will always create a merge commit even if fast-forward was possible.
It's like having --no-ff present on the command line.

It's a difference from the default behavior described in git-merge.txt.
It should be documented as an exception of "FAST-FORWARD MERGE" section
and "--ff" option description.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.8.3Junio C Hamano Thu, 21 Mar 2013 22:29:42 +0000 (15:29 -0700)

Update draft release notes to 1.8.3

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

CodingGuidelines: our documents are in AsciiDocJunio C Hamano Thu, 21 Mar 2013 21:17:32 +0000 (14:17 -0700)

CodingGuidelines: our documents are in AsciiDoc

Before talking about notations such as optional [--option] enclosed
in brackets, state that the documents are in AsciiDoc and processed
into other formats.

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

Merge branch 'maint'Junio C Hamano Thu, 21 Mar 2013 21:06:55 +0000 (14:06 -0700)

Merge branch 'maint'

* maint:
diff.c: diff.renamelimit => diff.renameLimit in message
wt-status: fix possible use of uninitialized variable
fast-import: clarify "inline" logic in file_change_m
run-command: always set failed_errno in start_command
transport: drop "int cmp = cmp" hack
drop some obsolete "x = x" compiler warning hacks
fast-import: use pointer-to-pointer to keep list tail

diff.c: diff.renamelimit => diff.renameLimit in messageMax Nanasy Thu, 21 Mar 2013 19:53:38 +0000 (12:53 -0700)

diff.c: diff.renamelimit => diff.renameLimit in message

In the warning message printed when rename or unmodified copy
detection was skipped due to too many files, change "diff.renamelimit"
to "diff.renameLimit", in order to make it consistent with git
documentation, which consistently uses "diff.renameLimit".

Signed-off-by: Max Nanasy <max.nanasy@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

wt-status: fix possible use of uninitialized variableJeff King Thu, 21 Mar 2013 11:05:28 +0000 (07:05 -0400)

wt-status: fix possible use of uninitialized variable

In wt_status_print_change_data, we accept a change_type flag
that is meant to be either WT_STATUS_UPDATED or
WT_STATUS_CHANGED. We then switch() on this value to set
the local variable "status" for each case, but do not
provide a fallback "default" label to the switch statement.

As a result, the compiler realizes that "status" might be
unset, and complains with a warning. To silence this
warning, we use the "int status = status" trick. This is
correct with the current code, as all callers provide one of
the two expected change_type flags. However, it's also a
maintenance trap, as there is nothing to prevent future
callers from passing another flag, nor to document this
assumption.

Instead of using the "x = x" hack, let's handle the default
case in the switch() statement with a die("BUG"). That tells
the compiler and any readers of the code exactly what the
function's input assumptions are.

We could also convert the flag to an enum, which would
provide a compile-time check on the function input. However,
since these flags are part of a larger enum, that would make
the code unnecessarily complex (we would have to make a new
enum with just the two flags, and then convert it to the old
enum for passing to sub-functions).

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

fast-import: clarify "inline" logic in file_change_mJeff King Thu, 21 Mar 2013 15:44:39 +0000 (11:44 -0400)

fast-import: clarify "inline" logic in file_change_m

When we read a fast-import line like:

M 100644 :1 foo.c

we point the local object_entry variable "oe" to the object
named by the mark ":1". When the input uses the "inline"
construct, however, we do not have such an object_entry.

The current code is careful not to access "oe" in the inline
case, but we can make the assumption even more obvious (and
catch violations of it) by setting oe to NULL and adding a
comment. As a bonus, this also squelches an over-zealous gcc
-Wuninitialized warning, which means we can drop the "oe =
oe" initialization hack.

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

run-command: always set failed_errno in start_commandJeff King Thu, 21 Mar 2013 15:45:00 +0000 (11:45 -0400)

run-command: always set failed_errno in start_command

When we fail to fork, we set the failed_errno variable to
the value of errno so it is not clobbered by later syscalls.
However, we do so in a conditional, and it is hard to see
later under what conditions the variable has a valid value.

Instead of setting it only when fork fails, let's just
always set it after forking. This is more obvious for human
readers (as we are no longer setting it as a side effect of
a strerror call), and it is more obvious to gcc, which no
longer generates a spurious -Wuninitialized warning. It also
happens to match what the WIN32 half of the #ifdef does.

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

transport: drop "int cmp = cmp" hackJeff King Thu, 21 Mar 2013 11:13:33 +0000 (07:13 -0400)

transport: drop "int cmp = cmp" hack

According to 47ec794, this initialization is meant to
squelch an erroneous uninitialized variable warning from gcc
4.0.1. That version is quite old at this point, and gcc 4.1
and up handle it fine, with one exception. There seems to be
a regression in gcc 4.6.3, which produces the warning;
however, gcc versions 4.4.7 and 4.7.2 do not.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

drop some obsolete "x = x" compiler warning hacksJeff King Thu, 21 Mar 2013 11:10:28 +0000 (07:10 -0400)

drop some obsolete "x = x" compiler warning hacks

In cases where the setting and access of a variable are
protected by the same conditional flag, older versions of
gcc would generate a "might be used unitialized" warning. We
silence the warning by initializing the variable to itself,
a hack that gcc recognizes.

Modern versions of gcc are smart enough to get this right,
going back to at least version 4.3.5. gcc 4.1 does get it
wrong in both cases, but is sufficiently old that we
probably don't need to care about it anymore.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: use pointer-to-pointer to keep list tailJeff King Thu, 21 Mar 2013 11:08:17 +0000 (07:08 -0400)

fast-import: use pointer-to-pointer to keep list tail

This is shorter, idiomatic, and it means the compiler does
not get confused about whether our "e" pointer is valid,
letting us drop the "e = e" hack.

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'we/submodule-update-prefix-output'Junio C Hamano Thu, 21 Mar 2013 21:03:10 +0000 (14:03 -0700)

Merge branch 'we/submodule-update-prefix-output'

"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

Merge branch 'jk/mailsplit-maildir-muttsort'Junio C Hamano Thu, 21 Mar 2013 21:03:08 +0000 (14:03 -0700)

Merge branch 'jk/mailsplit-maildir-muttsort'

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

Merge branch 'rs/zip-compresssed-size-with-export-subst'Junio C Hamano Thu, 21 Mar 2013 21:03:04 +0000 (14:03 -0700)

Merge branch 'rs/zip-compresssed-size-with-export-subst'

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

Merge branch 'mn/send-email-works-with-credential'Junio C Hamano Thu, 21 Mar 2013 21:03:02 +0000 (14:03 -0700)

Merge branch 'mn/send-email-works-with-credential'

Hooks the credential system to send-email.

* mn/send-email-works-with-credential:
git-send-email: use git credential to obtain password
Git.pm: add interface for git credential command
Git.pm: allow pipes to be closed prior to calling command_close_bidi_pipe
Git.pm: refactor command_close_bidi_pipe to use _cmd_close
Git.pm: fix example in command_close_bidi_pipe documentation
Git.pm: allow command_close_bidi_pipe to be called as method

Merge branch 'tz/credential-authinfo'Junio C Hamano Thu, 21 Mar 2013 21:03:00 +0000 (14:03 -0700)

Merge branch 'tz/credential-authinfo'

A new read-only credential helper (in contrib/) to interact with
the .netrc/.authinfo files. Hopefully mn/send-email-authinfo topic
can rebuild on top of something like this.

* tz/credential-authinfo:
Add contrib/credentials/netrc with GPG support

Merge branch 'jk/utf-8-can-be-spelled-differently'Junio C Hamano Thu, 21 Mar 2013 21:02:58 +0000 (14:02 -0700)

Merge branch 'jk/utf-8-can-be-spelled-differently'

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

Merge branch 'mg/gpg-interface-using-status'Junio C Hamano Thu, 21 Mar 2013 21:02:55 +0000 (14:02 -0700)

Merge branch 'mg/gpg-interface-using-status'

Call "gpg" using the right API when validating the signature on
tags.

* mg/gpg-interface-using-status:
pretty: make %GK output the signing key for signed commits
pretty: parse the gpg status lines rather than the output
gpg_interface: allow to request status return
log-tree: rely upon the check in the gpg_interface
gpg-interface: check good signature in a reliable way

Merge branch 'rt/commit-cleanup-config'Junio C Hamano Thu, 21 Mar 2013 21:02:53 +0000 (14:02 -0700)

Merge branch 'rt/commit-cleanup-config'

Fix tests that contaminated their environments and affected new
tests introduced later in the sequence by containing their effects
in their own subshells.

* rt/commit-cleanup-config:
t7502: perform commits using alternate editor in a subshell

Merge branch 'nd/branch-error-cases'Junio C Hamano Thu, 21 Mar 2013 21:02:51 +0000 (14:02 -0700)

Merge branch 'nd/branch-error-cases'

"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

Merge branch 'ap/maint-update-index-h-is-for-help'Junio C Hamano Thu, 21 Mar 2013 21:02:48 +0000 (14:02 -0700)

Merge branch 'ap/maint-update-index-h-is-for-help'

"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

Merge branch 'jc/perl-cat-blob'Junio C Hamano Thu, 21 Mar 2013 21:02:46 +0000 (14:02 -0700)

Merge branch 'jc/perl-cat-blob'

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

Merge branch 'da/difftool-fixes'Junio C Hamano Thu, 21 Mar 2013 21:02:43 +0000 (14:02 -0700)

Merge branch 'da/difftool-fixes'

Minor maintenance updates to difftool, and updates to its tests.

* da/difftool-fixes:
t7800: "defaults" is no longer a builtin tool name
t7800: modernize tests
t7800: update copyright notice
difftool: silence uninitialized variable warning

Merge branch 'ob/imap-send-ssl-verify'Junio C Hamano Thu, 21 Mar 2013 21:02:39 +0000 (14:02 -0700)

Merge branch 'ob/imap-send-ssl-verify'

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)

Merge branch 'bc/commit-complete-lines-given-via-m... Junio C Hamano Thu, 21 Mar 2013 21:02:37 +0000 (14:02 -0700)

Merge branch 'bc/commit-complete-lines-given-via-m-option'

'git commit -m "$str"' when $str was already terminated with a LF
now avoids adding an extra LF to the message.

* bc/commit-complete-lines-given-via-m-option:
Documentation/git-commit.txt: rework the --cleanup section
git-commit: only append a newline to -m mesg if necessary
t7502: demonstrate breakage with a commit message with trailing newlines
t/t7502: compare entire commit message with what was expected

Merge branch 'nd/count-garbage'Junio C Hamano Thu, 21 Mar 2013 21:02:34 +0000 (14:02 -0700)

Merge branch 'nd/count-garbage'

"git count-objects -v" did not count leftover temporary packfiles
and other kinds of garbage.

* nd/count-garbage:
count-objects: report how much disk space taken by garbage files
count-objects: report garbage files in pack directory too
sha1_file: reorder code in prepare_packed_git_one()
git-count-objects.txt: describe each line in -v output

Merge branch 'jc/fetch-raw-sha1'Junio C Hamano Thu, 21 Mar 2013 21:02:27 +0000 (14:02 -0700)

Merge branch 'jc/fetch-raw-sha1'

Allows requests to fetch objects at any tip of refs (including
hidden ones). It seems that there may be use cases even outside
Gerrit (e.g. $gmane/215701).

* jc/fetch-raw-sha1:
fetch: fetch objects by their exact SHA-1 object names
upload-pack: optionally allow fetching from the tips of hidden refs
fetch: use struct ref to represent refs to be fetched
parse_fetch_refspec(): clarify the codeflow a bit

Merge branch 'nd/preallocate-hash'Junio C Hamano Thu, 21 Mar 2013 21:02:19 +0000 (14:02 -0700)

Merge branch 'nd/preallocate-hash'

When we know approximately how many entries we will have in the
hash-table, it makes sense to size the hash table to that number
from the beginning to avoid unnecessary rehashing.

* nd/preallocate-hash:
Preallocate hash tables when the number of inserts are known in advance

Merge branch 'nd/index-pack-l10n-buf-overflow'Junio C Hamano Thu, 21 Mar 2013 21:02:16 +0000 (14:02 -0700)

Merge branch 'nd/index-pack-l10n-buf-overflow'

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

Merge branch 'tb/document-status-u-tradeoff'Junio C Hamano Thu, 21 Mar 2013 21:02:10 +0000 (14:02 -0700)

Merge branch 'tb/document-status-u-tradeoff'

Suggest users to look into using--untracked=no option when "git
status" takes too long.

* tb/document-status-u-tradeoff:
status: advise to consider use of -u when read_directory takes too long
git status: document trade-offs in choosing parameters to the -u option

Merge branch 'jn/shell-disable-interactive'Junio C Hamano Thu, 21 Mar 2013 21:01:53 +0000 (14:01 -0700)

Merge branch 'jn/shell-disable-interactive'

When the interactive access to git-shell is not enabled, we issue a
message meant to help the system admininstrator to enable it. Add
an explicit way to help the end users who connect to the service by
issuing custom messages to refuse such an access.

* jn/shell-disable-interactive:
shell: new no-interactive-login command to print a custom message
shell doc: emphasize purpose and security model

Merge branch 'jc/maint-push-refspec-default-doc'Junio C Hamano Thu, 21 Mar 2013 21:01:47 +0000 (14:01 -0700)

Merge branch 'jc/maint-push-refspec-default-doc'

Clarify in the documentation "what" gets pushed to "where" when the
command line to "git push" does not say these explicitly.

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

git-am: show the final log message on "Applying:" indicatorSimon Ruderich Thu, 21 Mar 2013 02:40:17 +0000 (03:40 +0100)

git-am: show the final log message on "Applying:" indicator

The "Applying:" message "git am" shows to tell the user which patch
is being applied has traditionally been to help identifying the
input, but we started showing the edited result since f23272f3fd84
(git-am -i: report rewritten title, 2007-12-04), because it was
found more confusing to show the original during an interactive
session.

Treat the modification by the applypatch-msg hook in a similar way
and use the edited result in the progress indication, even though
this is usually not interactive.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

do not use GIT_TRACE_PACKET=3 in testsJeff King Wed, 20 Mar 2013 17:43:47 +0000 (13:43 -0400)

do not use GIT_TRACE_PACKET=3 in tests

Some test scripts use the GIT_TRACE mechanism to dump
debugging information to descriptor 3 (and point it to a
file using the shell). On Windows, however, bash is unable
to set up descriptor 3. We do not write our trace to the
file, and worse, we may interfere with other operations
happening on descriptor 3, causing tests to fail or even
behave inconsistently.

Prior to commit 97a83fa (upload-pack: remove packet debugging
harness), these tests used GIT_DEBUG_SEND_PACK, which only
supported output to a descriptor. The tests in t5503 were
always broken on Windows, and were marked to be skipped via
the NOT_MINGW prerequisite. In t5700, the tests used to pass
prior to 97a83fa, but only because they were not careful
enough; because we only grepped the trace file, an empty
file looked successful to us. But post-97a83fa, the writing
to descriptor 3 causes "git fetch" to hang (presumably
because we are throwing random bytes into the middle of the
protocol).

Now that we are using the GIT_TRACE mechanism, we can
improve both scripts by asking git to write directly to a
file rather than a descriptor. That fixes the hang in t5700,
and should allow t5503 to successfully run on Windows.

In both cases we now also use "test -s" to double-check that
our trace file actually contains output, which should reduce
the possibility of an erroneously passing test.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3200 (branch): modernize styleRamkumar Ramachandra Wed, 20 Mar 2013 12:30:12 +0000 (18:00 +0530)

t3200 (branch): modernize style

Style is inconsistent throughout the file. Make the following
changes:

1. Indent everything with tabs.

2. Put the opening quote (') for the test in the same line as
test_expect_success, and the closing quote on a line by itself.

3. Do not add extra space between redirection operator and filename,
i.e. "cmd >dst", not "cmd > dst".

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

index-pack: always zero-initialize object_entry listJeff King Tue, 19 Mar 2013 16:17:22 +0000 (12:17 -0400)

index-pack: always zero-initialize object_entry list

Commit 38a4556 (index-pack: start learning to emulate
"verify-pack -v", 2011-06-03) added a "delta_depth" counter
to each "struct object_entry". Initially, all object entries
have their depth set to 0; in resolve_delta, we then set the
depth of each delta to "base + 1". Base entries never have
their depth touched, and remain at 0.

To ensure that all depths start at 0, that commit changed
calls to xmalloc the object_entry list into calls to
xcalloc. However, it forgot that we grow the list with
xrealloc later. These extra entries are used when we add an
object from elsewhere to complete a thin pack. If we add a
non-delta object, its depth value will just be uninitialized
heap data.

This patch fixes it by zero-initializing entries we add to
the objects list via the xrealloc.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t2003: work around path mangling issue on WindowsJohannes Sixt Wed, 20 Mar 2013 08:47:57 +0000 (09:47 +0100)

t2003: work around path mangling issue on Windows

MSYS bash considers the part "/g" in the sed expression "s/./=/g" as an
absolute path after an assignment, and mangles it to a C:/something
string. Do not attract bash's attention by avoiding the equals sign.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

The first wave of topics for 1.8.3Junio C Hamano Tue, 19 Mar 2013 19:30:25 +0000 (12:30 -0700)

The first wave of topics for 1.8.3

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

Merge branch 'jc/add-2.0-u-A-sans-pathspec' (early... Junio C Hamano Tue, 19 Mar 2013 19:21:27 +0000 (12:21 -0700)

Merge branch 'jc/add-2.0-u-A-sans-pathspec' (early part)

* 'jc/add-2.0-u-A-sans-pathspec' (early part):
t2200: check that "add -u" limits itself to subdirectory

Merge branch 'lf/bundle-verify-list-prereqs'Junio C Hamano Tue, 19 Mar 2013 19:21:09 +0000 (12:21 -0700)

Merge branch 'lf/bundle-verify-list-prereqs'

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