gitweb.git
Merge branch 'pb/send-email-cccmd-fix'Junio C Hamano Sat, 27 Jun 2009 21:13:43 +0000 (14:13 -0700)

Merge branch 'pb/send-email-cccmd-fix'

* pb/send-email-cccmd-fix:
t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH

Merge branch 'maint'Junio C Hamano Sat, 27 Jun 2009 20:44:25 +0000 (13:44 -0700)

Merge branch 'maint'

* maint:
gitweb/README: fix AliasMatch in example
Test grep --and/--or/--not
Test git archive --remote
fread does not return negative on error

gitweb/README: fix AliasMatch in exampleGiuseppe Bilotta Sat, 27 Jun 2009 16:24:11 +0000 (18:24 +0200)

gitweb/README: fix AliasMatch in example

When combining "dumb client" and human-friendly access by using the
'.git' extension to switch between the two, make sure the AliasMatch
covers the entire request. Without a full match, a request for

http://git.example.com/project/shortlog/branch..gitsomething

would result in a 404 because the server would try to access the
the project 'project/shortlog/branch.'

The solution is still not bulletproof, so document the possible failing
case.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test grep --and/--or/--notThomas Rast Sat, 27 Jun 2009 18:47:44 +0000 (20:47 +0200)

Test grep --and/--or/--not

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

Test git archive --remoteThomas Rast Sat, 27 Jun 2009 18:47:43 +0000 (20:47 +0200)

Test git archive --remote

Add a small test case for git archive --remote (and thus
git-upload-archive), which so far went untested.

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

fread does not return negative on errorRoel Kluin Mon, 22 Jun 2009 16:42:33 +0000 (18:42 +0200)

fread does not return negative on error

size_t res cannot be less than 0. fread returns 0 on error.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-remote: (get_one_entry): use strbufBert Wesarg Mon, 22 Jun 2009 22:27:44 +0000 (00:27 +0200)

builtin-remote: (get_one_entry): use strbuf

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t9001-send-email.sh: ensure generated script is execu... Brandon Casey Mon, 22 Jun 2009 17:32:52 +0000 (12:32 -0500)

t/t9001-send-email.sh: ensure generated script is executed with $SHELL_PATH

If the shell is not specified using the '#!' notation, then the OS will
use '/bin/sh' to execute the script which may not produce the desired
results. In particular, /bin/sh on Solaris interprets '^' specially which
has an effect on the sed command that this patch touches.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 22 Jun 2009 07:44:34 +0000 (00:44 -0700)

Merge branch 'maint'

* maint:
t3700-add: add a POSIXPERM prerequisite to a new test

t3700-add: add a POSIXPERM prerequisite to a new testJohannes Sixt Mon, 22 Jun 2009 07:30:38 +0000 (09:30 +0200)

t3700-add: add a POSIXPERM prerequisite to a new test

The new test does a 'chmod 0', which does not have the intended
effect on Windows.

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

Merge branch 'sb/maint-1.6.0-add-config-fix' into maintJunio C Hamano Mon, 22 Jun 2009 07:44:09 +0000 (00:44 -0700)

Merge branch 'sb/maint-1.6.0-add-config-fix' into maint

* sb/maint-1.6.0-add-config-fix:
add: allow configurations to be overriden by command line

Sync with 1.6.3.3Junio C Hamano Mon, 22 Jun 2009 06:50:17 +0000 (23:50 -0700)

Sync with 1.6.3.3

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

GIT 1.6.3.3 v1.6.3.3Junio C Hamano Mon, 22 Jun 2009 04:02:49 +0000 (21:02 -0700)

GIT 1.6.3.3

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

Merge branch 'ak/maint-for-each-ref-no-lookup' into... Junio C Hamano Mon, 22 Jun 2009 04:15:39 +0000 (21:15 -0700)

Merge branch 'ak/maint-for-each-ref-no-lookup' into maint

* ak/maint-for-each-ref-no-lookup:
for-each-ref: Do not lookup objects when they will not be used

Merge branch 'rc/maint-http-local-slot-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:31 +0000 (21:15 -0700)

Merge branch 'rc/maint-http-local-slot-fix' into maint

* rc/maint-http-local-slot-fix:
http*: cleanup slot->local after fclose

Merge branch 'cb/maint-no-double-merge' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:27 +0000 (21:15 -0700)

Merge branch 'cb/maint-no-double-merge' into maint

* cb/maint-no-double-merge:
refuse to merge during a merge

Merge branch 'mn/maint-iconv-autoconf' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:25 +0000 (21:14 -0700)

Merge branch 'mn/maint-iconv-autoconf' into maint

* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

Merge branch 'lt/maint-unsigned-left-shift' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:09 +0000 (21:14 -0700)

Merge branch 'lt/maint-unsigned-left-shift' into maint

* lt/maint-unsigned-left-shift:
Fix big left-shifts of unsigned char

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:08:05 +0000 (21:08 -0700)

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maint

* pb/maint-1.6.2-userdiff-fix:
upload-archive: fix infinite loop on Cygwin
avoid exponential regex match for java and objc function names

attribute: whitespace set to true detects all errors... Junio C Hamano Sun, 21 Jun 2009 09:35:18 +0000 (02:35 -0700)

attribute: whitespace set to true detects all errors known to git

That is what the documentation says, but the code pretends as if all the
known whitespace error tokens were given.

Among the whitespace error tokens, there is one kind that loosens the rule
when set: cr-at-eol. Which means that whitespace error token that is set
to true ignores a newly introduced CR at the end, which is inconsistent
with the documentation.

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

.gitattributes: CR at the end of the line is an errorNanako Shiraishi Fri, 19 Jun 2009 10:42:53 +0000 (19:42 +0900)

.gitattributes: CR at the end of the line is an error

When a CR is accidentally added at the end of a C source file in the git
project tree, "git diff --check" doesn't detect it as an error.

$ echo abQ | tr Q '\015' >>fast-import.c
$ git diff --check

I think this is because the "whitespace" attribute is set to *.[ch] files
without specifying what kind of errors are caught. It makes git "notice
all types of errors" (as described in the documentation), but I think it
is incorrectly setting cr-at-eol, too, and hides this error.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3505: fix abuse of test_expect_codeJunio C Hamano Sun, 21 Jun 2009 09:01:28 +0000 (02:01 -0700)

t3505: fix abuse of test_expect_code

The test wanted to make sure that cherry-pick exits with status 1,
but with the way it was placed after "git checkout master &&" meant
that it could have misjudged success if checkout barfed with the
same failure status.

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

Merge branch 'maint'Junio C Hamano Sun, 21 Jun 2009 06:50:17 +0000 (23:50 -0700)

Merge branch 'maint'

* maint:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 21 Jun 2009 06:48:46 +0000 (23:48 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 21 Jun 2009 06:48:28 +0000 (23:48 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 21 Jun 2009 06:48:21 +0000 (23:48 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

git-show-ref.txt: remove word and make consistentStephen Boyd Sun, 21 Jun 2009 04:40:45 +0000 (21:40 -0700)

git-show-ref.txt: remove word and make consistent

Under is better than in because of the nested nature of the .git
directory.

"also using" sounds a little odd, plus we say combined with later on so
just use that.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix various sparse warnings in the git source codeLinus Torvalds Thu, 18 Jun 2009 17:28:43 +0000 (10:28 -0700)

Fix various sparse warnings in the git source code

There are a few remaining ones, but this fixes the trivial ones. It boils
down to two main issues that sparse complains about:

- warning: Using plain integer as NULL pointer

Sparse doesn't like you using '0' instead of 'NULL'. For various good
reasons, not the least of which is just the visual confusion. A NULL
pointer is not an integer, and that whole "0 works as NULL" is a
historical accident and not very pretty.

A few of these remain: zlib is a total mess, and Z_NULL is just a 0.
I didn't touch those.

- warning: symbol 'xyz' was not declared. Should it be static?

Sparse wants to see declarations for any functions you export. A lack
of a declaration tends to mean that you should either add one, or you
should mark the function 'static' to show that it's in file scope.

A few of these remain: I only did the ones that should obviously just
be made static.

That 'wt_status_submodule_summary' one is debatable. It has a few related
flags (like 'wt_status_use_color') which _are_ declared, and are used by
builtin-commit.c. So maybe we'd like to export it at some point, but it's
not declared now, and not used outside of that file, so 'static' it is in
this patch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ph/submodule-rebase'Junio C Hamano Sun, 21 Jun 2009 04:51:13 +0000 (21:51 -0700)

Merge branch 'ph/submodule-rebase'

* ph/submodule-rebase:
git-submodule: add support for --merge.

Conflicts:
Documentation/git-submodule.txt
git-submodule.sh

Merge branch 'jc/cache-tree'Junio C Hamano Sun, 21 Jun 2009 04:47:30 +0000 (21:47 -0700)

Merge branch 'jc/cache-tree'

* jc/cache-tree:
Avoid "diff-index --cached" optimization under --find-copies-harder
Optimize "diff-index --cached" using cache-tree
t4007: modernize the style
cache-tree.c::cache_tree_find(): simplify internal API
write-tree --ignore-cache-tree

Merge branch 'mg/pushurl'Junio C Hamano Sun, 21 Jun 2009 04:47:27 +0000 (21:47 -0700)

Merge branch 'mg/pushurl'

* mg/pushurl:
avoid NULL dereference on failed malloc
builtin-remote: Make "remote -v" display push urls
builtin-remote: Show push urls as well
technical/api-remote: Describe new struct remote member pushurl
t5516: Check pushurl config setting
Allow push and fetch urls to be different

Merge branch 'mn/maint-iconv-autoconf'Junio C Hamano Sun, 21 Jun 2009 04:47:22 +0000 (21:47 -0700)

Merge branch 'mn/maint-iconv-autoconf'

* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

Merge branch 'sb/pull-rebase'Junio C Hamano Sun, 21 Jun 2009 04:47:13 +0000 (21:47 -0700)

Merge branch 'sb/pull-rebase'

* sb/pull-rebase:
parse-remote: remove unused functions
parse-remote: support default reflist in get_remote_merge_branch
parse-remote: function to get the tracking branch to be merge

Merge branch 'pb/send-email-cccmd-fix'Junio C Hamano Sun, 21 Jun 2009 04:47:06 +0000 (21:47 -0700)

Merge branch 'pb/send-email-cccmd-fix'

* pb/send-email-cccmd-fix:
Test cccmd in t9001-send-email.sh and fix some bugs

Merge branch 'pb/maint-1.6.2-userdiff-fix'Junio C Hamano Sun, 21 Jun 2009 04:46:55 +0000 (21:46 -0700)

Merge branch 'pb/maint-1.6.2-userdiff-fix'

* pb/maint-1.6.2-userdiff-fix:
upload-archive: fix infinite loop on Cygwin
avoid exponential regex match for java and objc function names

Merge branch 'sb/maint-1.6.0-add-config-fix'Junio C Hamano Sun, 21 Jun 2009 04:46:38 +0000 (21:46 -0700)

Merge branch 'sb/maint-1.6.0-add-config-fix'

* sb/maint-1.6.0-add-config-fix:
add: allow configurations to be overriden by command line
use xstrdup, not strdup in ll-merge.c

Conflicts:
builtin-add.c

Merge branch 'lt/maint-unsigned-left-shift'Junio C Hamano Sun, 21 Jun 2009 04:46:10 +0000 (21:46 -0700)

Merge branch 'lt/maint-unsigned-left-shift'

* lt/maint-unsigned-left-shift:
Fix big left-shifts of unsigned char

git-svn documentation: fix typo in 'rebase vs. pull... Miklos Vajna Sat, 20 Jun 2009 11:27:15 +0000 (13:27 +0200)

git-svn documentation: fix typo in 'rebase vs. pull/merge' section

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Sat, 20 Jun 2009 18:54:37 +0000 (11:54 -0700)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Allow diff view without context lines
gitk: Add another string to translation
gitk: Add option 'Simple history' to the options menu
gitk: Handle msysGit version during version comparisons
gitk: Make more options easily accessible from Edit View dialog
gitk: Check git version before using --textconv flag
gitk: Use --textconv to generate diff text
gitk: Update German translation.

add: allow configurations to be overriden by command... Stephen Boyd Thu, 18 Jun 2009 09:17:54 +0000 (02:17 -0700)

add: allow configurations to be overriden by command line

Don't call git_config after parsing the command line options, otherwise
the config settings will override any settings made by the command line.

This can be seen by setting add.ignore_errors and then specifying
--no-ignore-errors when using git-add.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 18 Jun 2009 17:39:17 +0000 (10:39 -0700)

Merge branch 'maint'

* maint:
http.c: fix compiling with libcurl 7.9.2
import-tars: support symlinks
pull, rebase: simplify to use die()

Merge branch 'sb/parse-options-integer'Junio C Hamano Thu, 18 Jun 2009 17:36:22 +0000 (10:36 -0700)

Merge branch 'sb/parse-options-integer'

* sb/parse-options-integer:
parse-options: simplify usage argh handling
parse-options: make OPT_INTEGER's argh explicit

Merge branch 'ak/maint-for-each-ref-no-lookup'Junio C Hamano Thu, 18 Jun 2009 17:33:09 +0000 (10:33 -0700)

Merge branch 'ak/maint-for-each-ref-no-lookup'

* ak/maint-for-each-ref-no-lookup:
for-each-ref: Do not lookup objects when they will not be used

Add -k option to cvsexportcommit to revert expanded... Alex Bennée Tue, 16 Jun 2009 14:21:04 +0000 (15:21 +0100)

Add -k option to cvsexportcommit to revert expanded CVS keywords in CVS working tree before applying commit patch

Depending on how your CVS->GIT conversion went you will have some
unexpanded CVS keywords in your GIT repo. If any of your git commits
touch these lines then the patch application will fail. This patch
addresses that by adding an option that will revert and expanded CVS
keywords to files in the working CVS directory that are affected by
the commit being applied.

Signed-off-by: Alex Bennée <alex@bennee.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: fix compiling with libcurl 7.9.2Mark Lodato Mon, 15 Jun 2009 02:39:00 +0000 (22:39 -0400)

http.c: fix compiling with libcurl 7.9.2

Change the minimimum required libcurl version for the http.sslKey option
to 7.9.3. Previously, preprocessor macros checked for >= 7.9.2, which
is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3. This now
allows git to compile with libcurl 7.9.2.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test cccmd in t9001-send-email.sh and fix some bugsPaolo Bonzini Thu, 18 Jun 2009 12:31:32 +0000 (14:31 +0200)

Test cccmd in t9001-send-email.sh and fix some bugs

For another patch series I'm working on I needed some tests
for the cc-cmd feature of git-send-email.

This patch adds 3 tests for the feature and for the possibility
to specify --suppress-cc multiple times, and fixes two bugs.
The first bug is that the --suppress-cc option for `cccmd' was
misspelled as `ccmd' in the code. The second bug, which is
actually found only with my other series, is that the argument
to the cccmd is never quoted, so the cccmd would fail with
patch file names containing a space.

A third bug I fix (in the docs) is that the bodycc argument was
actually spelled ccbody in the documentation and bash completion.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Cc: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

import-tars: support symlinksJohannes Schindelin Wed, 17 Jun 2009 12:49:39 +0000 (14:49 +0200)

import-tars: support symlinks

Without this patch, symbolic links are turned into empty files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-archive: fix infinite loop on CygwinRené Scharfe Wed, 17 Jun 2009 10:11:10 +0000 (12:11 +0200)

upload-archive: fix infinite loop on Cygwin

On Cygwin, poll() reports POLLIN even for file descriptors that have
reached their end. This caused git upload-archive to be stuck in an
infinite loop, as it only looked at the POLLIN flag.

In addition to POLLIN, check if read() returned 0, which indicates
end-of-file, and keep looping only as long as at least one of the file
descriptors has input. This lets the following command finish on its
own when run in a git repository on Cygwin, instead of it getting stuck
after printing all file names:

$ git archive -v --remote . HEAD >/dev/null

Reported-by: Bob Kagy <bobkagy@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid exponential regex match for java and objc functio... Paolo Bonzini Wed, 17 Jun 2009 14:26:06 +0000 (16:26 +0200)

avoid exponential regex match for java and objc function names

In the old regex

^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus
causing an exponential number of backtracks. Ironically it also causes
the regex not to work as intended; for example "catch" can match the
underlined part of the regex, the first repetition matching "c" and
the second matching "atch".

The replacement regex avoids this problem, because it makes sure that
at least a space/tab is eaten on each repetition. In other words,
a suffix of a repetition can never be a prefix of the next repetition.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix big left-shifts of unsigned charLinus Torvalds Thu, 18 Jun 2009 00:22:27 +0000 (17:22 -0700)

Fix big left-shifts of unsigned char

Shifting 'unsigned char' or 'unsigned short' left can result in sign
extension errors, since the C integer promotion rules means that the
unsigned char/short will get implicitly promoted to a signed 'int' due to
the shift (or due to other operations).

This normally doesn't matter, but if you shift things up sufficiently, it
will now set the sign bit in 'int', and a subsequent cast to a bigger type
(eg 'long' or 'unsigned long') will now sign-extend the value despite the
original expression being unsigned.

One example of this would be something like

unsigned long size;
unsigned char c;

size += c << 24;

where despite all the variables being unsigned, 'c << 24' ends up being a
signed entity, and will get sign-extended when then doing the addition in
an 'unsigned long' type.

Since git uses 'unsigned char' pointers extensively, we actually have this
bug in a couple of places.

I may have missed some, but this is the result of looking at

git grep '[^0-9 ][ ]*<<[ ][a-z]' -- '*.c' '*.h'
git grep '<<[ ]*24'

which catches at least the common byte cases (shifting variables by a
variable amount, and shifting by 24 bits).

I also grepped for just 'unsigned char' variables in general, and
converted the ones that most obviously ended up getting implicitly cast
immediately anyway (eg hash_name(), encode_85()).

In addition to just avoiding 'unsigned char', this patch also tries to use
a common idiom for the delta header size thing. We had three different
variations on it: "& 0x7fUL" in one place (getting the sign extension
right), and "& ~0x80" and "& 0x7f" in two other places (not getting it
right). Apart from making them all just avoid using "unsigned char" at
all, I also unified them to then use a simple "& 0x7f".

I considered making a sparse extension which warns about doing implicit
casts from unsigned types to signed types, but it gets rather complex very
quickly, so this is just a hack.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull, rebase: simplify to use die()Stephen Boyd Sun, 14 Jun 2009 23:08:56 +0000 (16:08 -0700)

pull, rebase: simplify to use die()

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

use xstrdup, not strdup in ll-merge.cJim Meyering Sun, 14 Jun 2009 19:47:54 +0000 (21:47 +0200)

use xstrdup, not strdup in ll-merge.c

Otherwise, a fluky allocation failure would cause merge
configuration settings to be silently ignored.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

avoid NULL dereference on failed mallocJim Meyering Sun, 14 Jun 2009 19:46:10 +0000 (21:46 +0200)

avoid NULL dereference on failed malloc

* builtin-remote.c (get_one_entry): Use xmalloc, not malloc.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 14 Jun 2009 00:10:18 +0000 (17:10 -0700)

Merge branch 'maint'

* maint:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 14 Jun 2009 00:10:08 +0000 (17:10 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 14 Jun 2009 00:09:50 +0000 (17:09 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 14 Jun 2009 00:09:45 +0000 (17:09 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-rerere.txt: grammatical fixups and cleanups
http-push.c::remove_locks(): fix use after free

Merge branch 'mh/fix-send-email-threaded'Junio C Hamano Sat, 13 Jun 2009 19:55:50 +0000 (12:55 -0700)

Merge branch 'mh/fix-send-email-threaded'

* mh/fix-send-email-threaded:
send-email: fix a typo in a comment
send-email: fix threaded mails without chain-reply-to
add a test for git-send-email for threaded mails without chain-reply-to
doc/send-email: clarify the behavior of --in-reply-to with --no-thread
send-email: fix non-threaded mails
add a test for git-send-email for non-threaded mails

Merge branch 'rc/http-push'Junio C Hamano Sat, 13 Jun 2009 19:53:19 +0000 (12:53 -0700)

Merge branch 'rc/http-push'

* rc/http-push: (22 commits)
http*: add helper methods for fetching objects (loose)
http*: add helper methods for fetching packs
http: use new http API in fetch_index()
http*: add http_get_info_packs
http-push.c::fetch_symref(): use the new http API
http-push.c::remote_exists(): use the new http API
http.c::http_fetch_ref(): use the new http API
transport.c::get_refs_via_curl(): use the new http API
http.c: new functions for the http API
http: create function end_url_with_slash
http*: move common variables and macros to http.[ch]
transport.c::get_refs_via_curl(): do not leak refs_url
Don't expect verify_pack() callers to set pack_size
http-push: do not SEGV after fetching a bad pack idx file
http*: copy string returned by sha1_to_hex
http-walker: verify remote packs
http-push, http-walker: style fixes
t5550-http-fetch: test fetching of packed objects
http-push: fix missing "#ifdef USE_CURL_MULTI" around "is_running_queue"
http-push: send out fetch requests on queue
...

Merge branch 'cc/bisect' (early part)Junio C Hamano Sat, 13 Jun 2009 19:53:06 +0000 (12:53 -0700)

Merge branch 'cc/bisect' (early part)

* 'cc/bisect' (early part):
t6030: test skipping away from an already skipped commit
bisect: when skipping, choose a commit away from a skipped commit
bisect: add parameters to "filter_skipped"
bisect: display first bad commit without forking a new process
bisect: drop unparse_commit() and use clear_commit_marks()

Merge branch 'rc/maint-http-local-slot-fix'Junio C Hamano Sat, 13 Jun 2009 19:51:09 +0000 (12:51 -0700)

Merge branch 'rc/maint-http-local-slot-fix'

* rc/maint-http-local-slot-fix:
http*: cleanup slot->local after fclose

Merge branch 'sp/msysgit'Junio C Hamano Sat, 13 Jun 2009 19:50:42 +0000 (12:50 -0700)

Merge branch 'sp/msysgit'

* sp/msysgit:
compat/ has subdirectories: do not omit them in 'make clean'
Fix typo in nedmalloc warning fix
MinGW: Teach Makefile to detect msysgit and apply specific settings
Fix warnings in nedmalloc when compiling with GCC 4.4.0
Add custom memory allocator to MinGW and MacOS builds
MinGW readdir reimplementation to support d_type
connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows
git: browsing paths with spaces when using the start command
MinGW: fix warning about implicit declaration of _getch()
test-chmtime: work around Windows limitation
Work around a regression in Windows 7, causing erase_in_line() to crash sometimes
Quiet make: do not leave Windows behind
MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore

Conflicts:
Makefile

Merge branch 'cb/maint-no-double-merge'Junio C Hamano Sat, 13 Jun 2009 19:50:22 +0000 (12:50 -0700)

Merge branch 'cb/maint-no-double-merge'

* cb/maint-no-double-merge:
refuse to merge during a merge

Merge branch 'ph/submodule-rebase' (early part)Junio C Hamano Sat, 13 Jun 2009 19:49:50 +0000 (12:49 -0700)

Merge branch 'ph/submodule-rebase' (early part)

* 'ph/submodule-rebase' (early part):
Rename submodule.<name>.rebase to submodule.<name>.update
git-submodule: add support for --rebase.

Conflicts:
Documentation/git-submodule.txt
git-submodule.sh

Merge branch 'bc/solaris'Junio C Hamano Sat, 13 Jun 2009 19:48:34 +0000 (12:48 -0700)

Merge branch 'bc/solaris'

* bc/solaris:
configure: test whether -lresolv is needed
Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
Makefile: add section for SunOS 5.7
Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Makefile: define __sun__ on SunOS
git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall

Conflicts:
Makefile

Merge branch 'cb/match_refs_internal_tail'Junio C Hamano Sat, 13 Jun 2009 19:47:52 +0000 (12:47 -0700)

Merge branch 'cb/match_refs_internal_tail'

* cb/match_refs_internal_tail:
match_refs: search ref list tail internally

Merge branch 'nw/maint-cvsexportcommit'Junio C Hamano Sat, 13 Jun 2009 19:47:47 +0000 (12:47 -0700)

Merge branch 'nw/maint-cvsexportcommit'

* nw/maint-cvsexportcommit:
git-cvsexportcommit can't commit files which have been removed from CVS

Merge branch 'da/araxis-mergetool'Junio C Hamano Sat, 13 Jun 2009 19:47:08 +0000 (12:47 -0700)

Merge branch 'da/araxis-mergetool'

* da/araxis-mergetool:
mergetool--lib: add support for araxis merge

git-rerere.txt: grammatical fixups and cleanupsStephen Boyd Sat, 13 Jun 2009 18:20:00 +0000 (11:20 -0700)

git-rerere.txt: grammatical fixups and cleanups

Rewrite the gc section using unresolved and resolved instead of "not
recorded". Add plurals and missing articles. Make some sentences have
consistent tense. Try and be more active by removing "that" and
simplifying sentences.

The terms "hand-resolve" and "hand resolve" were used, so just use "hand
resolve" to be more consistent.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-remote: Make "remote -v" display push urlsMichael J Gruber Sat, 13 Jun 2009 16:29:11 +0000 (18:29 +0200)

builtin-remote: Make "remote -v" display push urls

Currently, "remote -v" simply lists all urls so that one has to remember
that only the first one is used for fetches, and all are used for
pushes.

Change this so that the role of an url is displayed in parentheses, and
also display push urls.

Example with "one" having one url, "two" two urls, "three" one url and
one pushurl:

one hostone.com:/somepath/repoone.git (fetch)
one hostone.com:/somepath/repoone.git (push)
three http://hostthree.com/otherpath/repothree.git (fetch)
three hostthree.com:/pathforpushes/repothree.git (push)
two hosttwo.com:/somepath/repotwo.git (fetch)
two hosttwo.com:/somepath/repotwo.git (push)
two hosttwobackup.com:/somewheresafe/repotwo.git (push)

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-remote: Show push urls as wellMichael J Gruber Sat, 13 Jun 2009 16:29:10 +0000 (18:29 +0200)

builtin-remote: Show push urls as well

Teach builtin remote to show push urls also when asked to
"show" a specific remote.

This improves upon the standard display mode: multiple specified "url"s
mean that the first one is for fetching, all are used for pushing. We
make this clearer now by displaying the first one prefixed with "Fetch
URL", and all "url"s (or, if present, all "pushurl"s) prefixed with
"Push URL".

Example with "one" having one url, "two" two urls, "three" one url and
one pushurl (URL part only):

* remote one
Fetch URL: hostone.com:/somepath/repoone.git
Push URL: hostone.com:/somepath/repoone.git
* remote two
Fetch URL: hosttwo.com:/somepath/repotwo.git
Push URL: hosttwo.com:/somepath/repotwo.git
Push URL: hosttwobackup.com:/somewheresafe/repotwo.git
* remote three
Fetch URL: http://hostthree.com/otherpath/repothree.git
Push URL: hostthree.com:/pathforpushes/repothree.git

Also, adjust t5505 accordingly and make it test for the new output.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'mh/maint-fix-send-email-threaded' into... Junio C Hamano Fri, 12 Jun 2009 16:23:43 +0000 (09:23 -0700)

Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threaded

* mh/maint-fix-send-email-threaded:
doc/send-email: clarify the behavior of --in-reply-to with --no-thread
send-email: fix non-threaded mails
add a test for git-send-email for non-threaded mails

Conflicts:
git-send-email.perl
t/t9001-send-email.sh

send-email: fix a typo in a commentMarkus Heidelberg Fri, 12 Jun 2009 10:51:42 +0000 (12:51 +0200)

send-email: fix a typo in a comment

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: fix threaded mails without chain-reply-toMarkus Heidelberg Fri, 12 Jun 2009 10:51:41 +0000 (12:51 +0200)

send-email: fix threaded mails without chain-reply-to

An earlier commit 15da108 ("send-email: 'References:' should only
reference what is sent", 2009-04-13) broke logic to set up threading
information for the next message by rewriting "!" to "not" without
understanding the precedence rules of the language.

Namely,

! defined $reply_to || length($reply_to) == 0

was changed to

not defined $reply_to || length($reply_to) == 0

which is

not (defined $reply_to || length($reply_to) == 0)

and different from what was intended, which is

(not defined $reply_to) || (length($reply_to) == 0)

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add a test for git-send-email for threaded mails withou... Markus Heidelberg Fri, 12 Jun 2009 10:51:40 +0000 (12:51 +0200)

add a test for git-send-email for threaded mails without chain-reply-to

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc/send-email: clarify the behavior of --in-reply... Markus Heidelberg Fri, 12 Jun 2009 10:51:39 +0000 (12:51 +0200)

doc/send-email: clarify the behavior of --in-reply-to with --no-thread

Also remove the argument from --[no-]chain-reply-to.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: fix non-threaded mailsMarkus Heidelberg Fri, 12 Jun 2009 10:51:38 +0000 (12:51 +0200)

send-email: fix non-threaded mails

After commit 3e0c4ff (send-email: respect in-reply-to regardless of
threading, 2009-03-01) the variable $thread was only used for prompting
for an "In-Reply-To", but not for controlling whether the "In-Reply-To"
and "References" fields should be written into the email.

Thus these fields were always used beginning with the second mail and it
was not possible to produce non-threaded mails anymore.

However, a later commit 15da108 ("send-email: 'References:' should only
reference what is sent", 2009-04-13) introduced a regression with the
side effect to make non-threaded mails possible again, but only when
--no-chain-reply-to was used.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add a test for git-send-email for non-threaded mailsMarkus Heidelberg Fri, 12 Jun 2009 10:51:37 +0000 (12:51 +0200)

add a test for git-send-email for non-threaded mails

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 12 Jun 2009 06:35:46 +0000 (23:35 -0700)

Merge branch 'maint'

* maint:
Documentation: git-send-mail can take rev-list arg to drive format-patch
rebase--interactive: remote stray closing parenthesis

Documentation: git-send-mail can take rev-list arg... Paolo Bonzini Thu, 11 Jun 2009 07:30:27 +0000 (09:30 +0200)

Documentation: git-send-mail can take rev-list arg to drive format-patch

The git-send-email docs do not mention except in the usage lines
the combined patch formatting/sending ability of git-send-email.
This patch expands on the possible arguments to git-send-email
and explains the meaning of the rev-list argument.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-remote: remove unused functionsSanti Béjar Thu, 11 Jun 2009 22:39:21 +0000 (00:39 +0200)

parse-remote: remove unused functions

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-remote: support default reflist in get_remote_mer... Santi Béjar Thu, 11 Jun 2009 22:39:19 +0000 (00:39 +0200)

parse-remote: support default reflist in get_remote_merge_branch

Expand get_remote_merge_branch to compute the tracking branch to merge
when called without arguments (or only the remote name). This allows
"git pull --rebase" without arguments (default upstream branch) to
work with a rebased upstream. With explicit arguments it already worked.

Also add a test to check for this case.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-remote: function to get the tracking branch to... Santi Béjar Thu, 11 Jun 2009 22:39:18 +0000 (00:39 +0200)

parse-remote: function to get the tracking branch to be merge

The only user of get_remote_refs_for_fetch was "git pull --rebase" and
it only wanted the tracking branch to be merge. So, add a simple
function (get_remote_merge_branch) with this new meaning.

No behavior changes. The new function behaves like the old code in
"git pull --rebase". In particular, it only works with the default
refspec mapping and with remote branches, not tags.

Signed-off-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

compat/ has subdirectories: do not omit them in 'make... Johannes Sixt Thu, 11 Jun 2009 20:56:12 +0000 (22:56 +0200)

compat/ has subdirectories: do not omit them in 'make clean'

[1. text/plain]

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

Fix typo in nedmalloc warning fixJohannes Sixt Thu, 11 Jun 2009 20:52:56 +0000 (22:52 +0200)

Fix typo in nedmalloc warning fix

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

Merge branch 'uk/maint-1.5.3-rebase-i-reflog' into... Junio C Hamano Thu, 11 Jun 2009 21:14:00 +0000 (14:14 -0700)

Merge branch 'uk/maint-1.5.3-rebase-i-reflog' into maint

* uk/maint-1.5.3-rebase-i-reflog:
rebase--interactive: remote stray closing parenthesis

Conflicts:
git-rebase--interactive.sh

rebase--interactive: remote stray closing parenthesisUwe Kleine-König Thu, 11 Jun 2009 20:27:55 +0000 (22:27 +0200)

rebase--interactive: remote stray closing parenthesis

it was introduced in 68a163c9b483ae352fcfee8c4505d113213daa73

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jöhännës "Dschö" Schindëlin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-options: add parse_options_check to validate... Pierre Habouzit Tue, 9 Jun 2009 08:23:44 +0000 (10:23 +0200)

parse-options: add parse_options_check to validate option specs.

It only searches for now for the dreaded LASTARG_DEFAULT | OPTARG
combination, but can be extended to check for any other forbidden
combination.

Options are checked each time we call parse_options_start.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

configure: test whether -lresolv is neededRalf Wildenhues Sun, 7 Jun 2009 05:40:29 +0000 (07:40 +0200)

configure: test whether -lresolv is needed

Check if -lresolv is needed for hstrerror; set NEEDS_RESOLV
accordingly, and substitute in config.mak.in.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: insert SANE_TOOL_PATH to PATH before /bin... Junio C Hamano Mon, 8 Jun 2009 16:41:49 +0000 (09:41 -0700)

Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin

In an earlier patch, we introduced SANE_TOOL_PATH that is prepended to
user's PATH. This had an unintended consequence of overriding user's
private binary directory that typically comes earlier in the PATH to holds
even saner commands than whatever comes with the system.

For example, a user may have ~/bin that is early in the path and contains
a shell script "vi" that launches system's /bin/vi with specific options.
Prepending SANE_TOOL_PATH to the PATH that happens to have "vi" in it
defeats such customization.

This fixes the issue by inserting SANE_TOOL_PATH just before /bin or
/usr/bin appears on the PATH.

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

git-repack.txt: Clarify implications of -a for dumb... Michael J Gruber Tue, 9 Jun 2009 16:15:47 +0000 (18:15 +0200)

git-repack.txt: Clarify implications of -a for dumb protocols

The current text makes some users feel uneasy, worrying whether
'-a' could lead to corrupt repositories. Clarify that '-a'
may lead to performance issues only for dumb protocols.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Helped-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

technical/api-remote: Describe new struct remote member... Michael J Gruber Tue, 9 Jun 2009 16:01:36 +0000 (18:01 +0200)

technical/api-remote: Describe new struct remote member pushurl

...and pushurl_nr

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5516: Check pushurl config settingMichael J Gruber Tue, 9 Jun 2009 16:01:35 +0000 (18:01 +0200)

t5516: Check pushurl config setting

Check whether the new remote.${remotename}.pushurl setting is obeyed
and whether it overrides remote.${remotename}.url.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow push and fetch urls to be differentMichael J Gruber Tue, 9 Jun 2009 16:01:34 +0000 (18:01 +0200)

Allow push and fetch urls to be different

This introduces a config setting remote.$remotename.pushurl which is
used for pushes only. If absent remote.$remotename.url is used for
pushes and fetches as before.
This is useful, for example, in order to do passwordless fetches
(remote update) over the git transport but pushes over ssh.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 9 Jun 2009 07:29:36 +0000 (00:29 -0700)

Merge branch 'maint'

* maint:
diff.c: plug a memory leak in an error path
fetch-pack: close output channel after sideband demultiplexer terminates
builtin-remote: Make "remote show" display all urls

bash: add support for 'git stash pop --index' optionSZEDER Gábor Mon, 8 Jun 2009 22:57:39 +0000 (00:57 +0200)

bash: add support for 'git stash pop --index' option

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: mention 'git stash pop --index' option... SZEDER Gábor Mon, 8 Jun 2009 22:57:06 +0000 (00:57 +0200)

Documentation: mention 'git stash pop --index' option explicitly

'git stash pop' supports the '--index' option since its initial
implementation (bd56ff54, git-stash: add new 'pop' subcommand,
2008-02-22), but its documentation does not mention it explicitly.
Moreover, both the usage shown by 'git stash -h' and the synopsis
section in the man page imply that 'git stash pop' does not have an
'--index' option.

First, this patch corrects the usage and the synopsis section.

Second, the patch moves the description of the '--index' option to the
'git stash pop' section in the documentation, and refers to it from
the 'git stash apply' section. This way it follows the intentions of
commit d1836637 (Documentation: teach stash/pop workflow instead of
stash/apply, 2009-05-28), as all 'git stash pop'-related documentation
will be in one place without references to 'git stash apply'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Simplify some 'fprintf(stderr); return -1;' by using... Johannes Sixt Mon, 8 Jun 2009 20:34:31 +0000 (22:34 +0200)

Simplify some 'fprintf(stderr); return -1;' by using 'return error()'

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

Simplify some instances of run_command() by using run_c... Johannes Sixt Mon, 8 Jun 2009 20:34:29 +0000 (22:34 +0200)

Simplify some instances of run_command() by using run_command_v_opt().

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

show-branch: don't use LASTARG_DEFAULT with OPTARGStephen Boyd Sun, 7 Jun 2009 23:39:15 +0000 (16:39 -0700)

show-branch: don't use LASTARG_DEFAULT with OPTARG

5734365 (show-branch: migrate to parse-options API 2009-05-21)
incorrectly set the --more option's flags to be
PARSE_OPT_LASTARG_DEFAULT and PARSE_OPT_OPTARG. These two flags
shouldn't be used together. An option taking a default should just set
the default value desired and parse options will take care of the rest.

Update the header comment to better convey this information.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>