gitweb.git
Merge branch 'maint'Junio C Hamano Fri, 5 Mar 2010 06:39:54 +0000 (22:39 -0800)

Merge branch 'maint'

* maint:
Update draft release notes to 1.7.0.2
Remove extra '-' from git-am(1)

Update draft release notes to 1.7.0.2Junio C Hamano Fri, 5 Mar 2010 06:39:38 +0000 (22:39 -0800)

Update draft release notes to 1.7.0.2

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

Merge branch 'jn/gitweb-config-error-die' into maintJunio C Hamano Fri, 5 Mar 2010 06:27:12 +0000 (22:27 -0800)

Merge branch 'jn/gitweb-config-error-die' into maint

* jn/gitweb-config-error-die:
gitweb: Die if there are parsing errors in config file

Merge branch 'jn/maint-fix-pager' into maintJunio C Hamano Fri, 5 Mar 2010 06:27:04 +0000 (22:27 -0800)

Merge branch 'jn/maint-fix-pager' into maint

* jn/maint-fix-pager:
tests: Fix race condition in t7006-pager
t7006-pager: if stdout is not a terminal, make a new one
tests: Add tests for automatic use of pager
am: Fix launching of pager
git svn: Fix launching of pager
git.1: Clarify the behavior of the --paginate option
Make 'git var GIT_PAGER' always print the configured pager
Fix 'git var' usage synopsis

Merge branch 'tr/maint-cherry-pick-list' into maintJunio C Hamano Fri, 5 Mar 2010 06:26:44 +0000 (22:26 -0800)

Merge branch 'tr/maint-cherry-pick-list' into maint

* tr/maint-cherry-pick-list:
cherry_pick_list: quit early if one side is empty

Merge branch 'ld/maint-diff-quiet-w' into maintJunio C Hamano Fri, 5 Mar 2010 06:26:39 +0000 (22:26 -0800)

Merge branch 'ld/maint-diff-quiet-w' into maint

* ld/maint-diff-quiet-w:
git-diff: add a test for git diff --quiet -w
git diff --quiet -w: check and report the status

Merge branch 'rs/optim-text-wrap' into maintJunio C Hamano Fri, 5 Mar 2010 06:26:33 +0000 (22:26 -0800)

Merge branch 'rs/optim-text-wrap' into maint

* rs/optim-text-wrap:
utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
utf8.c: remove strbuf_write()
utf8.c: remove print_spaces()
utf8.c: remove print_wrapped_text()

Merge branch 'dp/read-not-mmap-small-loose-object'... Junio C Hamano Fri, 5 Mar 2010 06:26:17 +0000 (22:26 -0800)

Merge branch 'dp/read-not-mmap-small-loose-object' into maint

* dp/read-not-mmap-small-loose-object:
hash-object: don't use mmap() for small files

Merge branch 'np/compress-loose-object-memsave' into... Junio C Hamano Fri, 5 Mar 2010 06:26:05 +0000 (22:26 -0800)

Merge branch 'np/compress-loose-object-memsave' into maint

* np/compress-loose-object-memsave:
sha1_file: be paranoid when creating loose objects
sha1_file: don't malloc the whole compressed result when writing out objects

Merge branch 'jc/maint-status-preload' into maintJunio C Hamano Fri, 5 Mar 2010 06:25:45 +0000 (22:25 -0800)

Merge branch 'jc/maint-status-preload' into maint

* jc/maint-status-preload:
status: preload index to optimize lstat(2) calls

Merge branch 'gf/maint-sh-setup-nongit-ok' into maintJunio C Hamano Fri, 5 Mar 2010 06:25:37 +0000 (22:25 -0800)

Merge branch 'gf/maint-sh-setup-nongit-ok' into maint

* gf/maint-sh-setup-nongit-ok:
require_work_tree broken with NONGIT_OK

Merge branch 'cc/maint-bisect-paths' into maintJunio C Hamano Fri, 5 Mar 2010 06:25:23 +0000 (22:25 -0800)

Merge branch 'cc/maint-bisect-paths' into maint

* cc/maint-bisect-paths:
bisect: error out when passing bad path parameters

Merge branch 'maint-1.6.6' into maintJunio C Hamano Fri, 5 Mar 2010 06:24:25 +0000 (22:24 -0800)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
Remove extra '-' from git-am(1)

Merge branch 'maint-1.6.5' into maint-1.6.6Junio C Hamano Fri, 5 Mar 2010 06:24:19 +0000 (22:24 -0800)

Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
Remove extra '-' from git-am(1)

Documentation: fix a few typos in git-notes.txtMichael J Gruber Thu, 4 Mar 2010 14:31:17 +0000 (15:31 +0100)

Documentation: fix a few typos in git-notes.txt

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

Remove extra '-' from git-am(1)Michal Sojka Thu, 4 Mar 2010 12:08:28 +0000 (13:08 +0100)

Remove extra '-' from git-am(1)

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9119-git-svn-info.sh: test with svn 1.6.* as wellMichael J Gruber Wed, 3 Mar 2010 20:34:32 +0000 (21:34 +0100)

t9119-git-svn-info.sh: test with svn 1.6.* as well

All tests in t9119 were disabled for subversion versions other than
1.[45].*. Make the test script run with subversion 1.[456].*.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: req_svn when neededMichael J Gruber Wed, 3 Mar 2010 20:34:31 +0000 (21:34 +0100)

git-svn: req_svn when needed

The delayed loading of SVN missed a place where SVN::Core is used. Make
sure to load the package before trying to use it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Eric Wong <normalperson@yhbt.net>

run-command.c: fix build warnings on UbuntuMichael Wookey Fri, 29 Jan 2010 22:38:19 +0000 (09:38 +1100)

run-command.c: fix build warnings on Ubuntu

Building git on Ubuntu 9.10 warns that the return value of write(2)
isn't checked. These warnings were introduced in commits:

2b541bf8 ("start_command: detect execvp failures early")
a5487ddf ("start_command: report child process setup errors to the
parent's stderr")

GCC details:

$ gcc --version
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1

Silence the warnings by reading (but not making use of) the return value
of write(2).

Signed-off-by: Michael Wookey <michaelwookey@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 3 Mar 2010 22:56:13 +0000 (14:56 -0800)

Merge branch 'maint'

* maint:
Start preparing for 1.7.0.2

Conflicts:
RelNotes

Merge branch 'jh/maint-submodule-status-in-void' (early... Junio C Hamano Wed, 3 Mar 2010 22:50:22 +0000 (14:50 -0800)

Merge branch 'jh/maint-submodule-status-in-void' (early part)

* 'jh/maint-submodule-status-in-void' (early part):
submodule summary: do not shift a non-existent positional variable

submodule summary: do not shift a non-existent position... Jeff King Wed, 3 Mar 2010 22:19:09 +0000 (14:19 -0800)

submodule summary: do not shift a non-existent positional variable

When "git submodule summary" is run without any argument, we default to
compare the state of index with the HEAD, but tried to shift out $1 that
does not exist (and worse yet, we didn't use it).

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

Start preparing for 1.7.0.2Junio C Hamano Wed, 3 Mar 2010 07:11:36 +0000 (23:11 -0800)

Start preparing for 1.7.0.2

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

Merge branch 'tc/maint-transport-ls-remote-with-void... Junio C Hamano Wed, 3 Mar 2010 06:55:22 +0000 (22:55 -0800)

Merge branch 'tc/maint-transport-ls-remote-with-void' into maint

* tc/maint-transport-ls-remote-with-void:
transport: add got_remote_refs flag

Merge branch 'hm/maint-imap-send-crlf' into maintJunio C Hamano Wed, 3 Mar 2010 06:55:03 +0000 (22:55 -0800)

Merge branch 'hm/maint-imap-send-crlf' into maint

* hm/maint-imap-send-crlf:
git-imap-send: Convert LF to CRLF before storing patch to draft box

Merge branch 'sp/maint-push-sideband' into maintJunio C Hamano Wed, 3 Mar 2010 06:54:50 +0000 (22:54 -0800)

Merge branch 'sp/maint-push-sideband' into maint

* sp/maint-push-sideband:
receive-pack: Send internal errors over side-band #2
t5401: Use a bare repository for the remote peer
receive-pack: Send hook output over side band #2
receive-pack: Wrap status reports inside side-band-64k
receive-pack: Refactor how capabilities are shown to the client
send-pack: demultiplex a sideband stream with status data
run-command: support custom fd-set in async
run-command: Allow stderr to be a caller supplied pipe

Conflicts:
builtin-receive-pack.c
run-command.c
t/t5401-update-hooks.sh

Merge branch 'jc/maint-fix-test-perm' into maintJunio C Hamano Wed, 3 Mar 2010 06:38:02 +0000 (22:38 -0800)

Merge branch 'jc/maint-fix-test-perm' into maint

* jc/maint-fix-test-perm:
lib-patch-mode.sh: Fix permission
t6000lib: Fix permission

Merge branch 'np/fast-import-idx-v2' into maintJunio C Hamano Wed, 3 Mar 2010 06:28:49 +0000 (22:28 -0800)

Merge branch 'np/fast-import-idx-v2' into maint

* np/fast-import-idx-v2:
fast-import: use the diff_delta() max_delta_size argument
fast-import: honor pack.indexversion and pack.packsizelimit config vars
fast-import: make default pack size unlimited
fast-import: use write_idx_file() instead of custom code
fast-import: use sha1write() for pack data
fast-import: start using struct pack_idx_entry

merge-file: add option to select union merge favorBert Wesarg Mon, 1 Mar 2010 21:46:28 +0000 (22:46 +0100)

merge-file: add option to select union merge favor

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

merge-file: add option to specify the marker sizeBert Wesarg Mon, 1 Mar 2010 21:46:27 +0000 (22:46 +0100)

merge-file: add option to specify the marker size

This adds the abbility to specify the conflict marker size for merges outside
a git repository.

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

wrap-for-bin: do not export an empty GIT_TEMPLATE_DIRJunio C Hamano Wed, 3 Mar 2010 00:27:03 +0000 (16:27 -0800)

wrap-for-bin: do not export an empty GIT_TEMPLATE_DIR

With bash on some platforms (e.g. FreeBSD 8.0), exporting an unset
variable does not "unexport" it. The called process gets an empty
string from getenv(3) instead of NULL.

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

Merge branch 'maint'Junio C Hamano Tue, 2 Mar 2010 20:44:16 +0000 (12:44 -0800)

Merge branch 'maint'

* maint:
gitweb: Fix project-specific feature override behavior
gitweb multiple project roots documentation

Merge branch 'jn/maint-fix-pager'Junio C Hamano Tue, 2 Mar 2010 20:44:11 +0000 (12:44 -0800)

Merge branch 'jn/maint-fix-pager'

* jn/maint-fix-pager:
tests: Fix race condition in t7006-pager
t7006-pager: if stdout is not a terminal, make a new one
tests: Add tests for automatic use of pager
am: Fix launching of pager
git svn: Fix launching of pager
git.1: Clarify the behavior of the --paginate option
Make 'git var GIT_PAGER' always print the configured pager
Fix 'git var' usage synopsis

Merge branch 'ml/encode-header-refactor'Junio C Hamano Tue, 2 Mar 2010 20:44:11 +0000 (12:44 -0800)

Merge branch 'ml/encode-header-refactor'

* ml/encode-header-refactor:
move encode_in_pack_object_header() to a better place
refactor duplicated encode_header in pack-objects and fast-import

Merge branch 'jn/gitweb-config-error-die'Junio C Hamano Tue, 2 Mar 2010 20:44:11 +0000 (12:44 -0800)

Merge branch 'jn/gitweb-config-error-die'

* jn/gitweb-config-error-die:
gitweb: Die if there are parsing errors in config file

Merge branch 'jc/for-each-ref'Junio C Hamano Tue, 2 Mar 2010 20:44:10 +0000 (12:44 -0800)

Merge branch 'jc/for-each-ref'

* jc/for-each-ref:
for-each-ref --format='%(flag)'
for-each-ref --format='%(symref) %(symref:short)'
builtin-for-each-ref.c: check if we need to peel onion while parsing the format
builtin-for-each-ref.c: comment fixes

Merge branch 'ld/maint-diff-quiet-w'Junio C Hamano Tue, 2 Mar 2010 20:44:10 +0000 (12:44 -0800)

Merge branch 'ld/maint-diff-quiet-w'

* ld/maint-diff-quiet-w:
git-diff: add a test for git diff --quiet -w
git diff --quiet -w: check and report the status

Merge branch 'tr/maint-cherry-pick-list'Junio C Hamano Tue, 2 Mar 2010 20:44:10 +0000 (12:44 -0800)

Merge branch 'tr/maint-cherry-pick-list'

* tr/maint-cherry-pick-list:
cherry_pick_list: quit early if one side is empty

Merge branch 'rs/optim-text-wrap'Junio C Hamano Tue, 2 Mar 2010 20:44:10 +0000 (12:44 -0800)

Merge branch 'rs/optim-text-wrap'

* rs/optim-text-wrap:
utf8.c: speculatively assume utf-8 in strbuf_add_wrapped_text()
utf8.c: remove strbuf_write()
utf8.c: remove print_spaces()
utf8.c: remove print_wrapped_text()

Merge branch 'ml/send-pack-transport-refactor'Junio C Hamano Tue, 2 Mar 2010 20:44:09 +0000 (12:44 -0800)

Merge branch 'ml/send-pack-transport-refactor'

* ml/send-pack-transport-refactor:
refactor duplicated code in builtin-send-pack.c and transport.c

Merge branch 'ml/fill-mm-refactor'Junio C Hamano Tue, 2 Mar 2010 20:44:09 +0000 (12:44 -0800)

Merge branch 'ml/fill-mm-refactor'

* ml/fill-mm-refactor:
refactor duplicated fill_mm() in checkout and merge-recursive

Merge branch 'ml/connect-refactor'Junio C Hamano Tue, 2 Mar 2010 20:44:09 +0000 (12:44 -0800)

Merge branch 'ml/connect-refactor'

* ml/connect-refactor:
connect.c: move duplicated code to a new function 'get_host_and_port'

Merge branch 'np/compress-loose-object-memsave'Junio C Hamano Tue, 2 Mar 2010 20:44:09 +0000 (12:44 -0800)

Merge branch 'np/compress-loose-object-memsave'

* np/compress-loose-object-memsave:
sha1_file: be paranoid when creating loose objects
sha1_file: don't malloc the whole compressed result when writing out objects

Merge branch 'dp/read-not-mmap-small-loose-object'Junio C Hamano Tue, 2 Mar 2010 20:44:08 +0000 (12:44 -0800)

Merge branch 'dp/read-not-mmap-small-loose-object'

* dp/read-not-mmap-small-loose-object:
hash-object: don't use mmap() for small files

Merge branch 'jn/makedepend'Junio C Hamano Tue, 2 Mar 2010 20:44:08 +0000 (12:44 -0800)

Merge branch 'jn/makedepend'

* jn/makedepend:
Makefile: clarify definition of TEST_OBJS
Makefile: always remove .depend directories on 'make clean'
Makefile: tuck away generated makefile fragments in .depend
Teach Makefile to check header dependencies
Makefile: list standalone program object files in PROGRAM_OBJS
Makefile: lazily compute header dependencies
Makefile: list generated object files in OBJECTS
Makefile: disable default implicit rules
Makefile: rearrange dependency rules
Makefile: transport.o depends on branch.h now
Makefile: drop dependency on $(wildcard */*.h)
Makefile: clean up http-walker.o dependency rules
Makefile: remove wt-status.h from LIB_H
Makefile: make sure test helpers are rebuilt when headers change
Makefile: add missing header file dependencies

Conflicts:
Makefile

Merge branch 'jc/maint-status-preload'Junio C Hamano Tue, 2 Mar 2010 20:44:07 +0000 (12:44 -0800)

Merge branch 'jc/maint-status-preload'

* jc/maint-status-preload:
status: preload index to optimize lstat(2) calls

Merge branch 'gf/maint-sh-setup-nongit-ok'Junio C Hamano Tue, 2 Mar 2010 20:44:07 +0000 (12:44 -0800)

Merge branch 'gf/maint-sh-setup-nongit-ok'

* gf/maint-sh-setup-nongit-ok:
require_work_tree broken with NONGIT_OK

Merge branch 'jh/maint-submodule-status-in-void'Junio C Hamano Tue, 2 Mar 2010 20:44:07 +0000 (12:44 -0800)

Merge branch 'jh/maint-submodule-status-in-void'

* jh/maint-submodule-status-in-void:
submodule summary: Don't barf when invoked in an empty repo

Merge branch 'hm/imap-send-cram-md5'Junio C Hamano Tue, 2 Mar 2010 20:44:06 +0000 (12:44 -0800)

Merge branch 'hm/imap-send-cram-md5'

* hm/imap-send-cram-md5:
imap-send: support CRAM-MD5 authentication

Merge branch 'ml/color-when'Junio C Hamano Tue, 2 Mar 2010 20:44:06 +0000 (12:44 -0800)

Merge branch 'ml/color-when'

* ml/color-when:
Add an optional argument for --color options

Merge branch 'ac/cvsimport-revision-mapping'Junio C Hamano Tue, 2 Mar 2010 20:44:06 +0000 (12:44 -0800)

Merge branch 'ac/cvsimport-revision-mapping'

* ac/cvsimport-revision-mapping:
cvsimport: new -R option: generate .git/cvs-revisions mapping

Merge branch 'jc/grep-author-all-match-implicit'Junio C Hamano Tue, 2 Mar 2010 20:44:06 +0000 (12:44 -0800)

Merge branch 'jc/grep-author-all-match-implicit'

* jc/grep-author-all-match-implicit:
"log --author=me --grep=it" should find intersection, not union

fallback SSH_ASKPASS when GIT_ASKPASS not setFrank Li Tue, 2 Mar 2010 11:52:11 +0000 (19:52 +0800)

fallback SSH_ASKPASS when GIT_ASKPASS not set

If GIT_ASKPASS is not set and SSH_ASKPASS set, GIT_ASKPASS will
use SSH_ASKPASS.

Signed-off-by: Frank Li <lznuaa@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Fix project-specific feature override behaviorJakub Narebski Mon, 1 Mar 2010 21:51:34 +0000 (22:51 +0100)

gitweb: Fix project-specific feature override behavior

This commit fixes a bug in processing project-specific override in
a situation when there is no project, e.g. for the projects list page.

When 'snapshot' feature had project specific config override enabled
by putting
$feature{'snapshot'}{'override'} = 1;

(or equivalent) in $GITWEB_CONFIG, and when viewing toplevel gitweb
page, which means the projects list page (to be more exact this
happens for any project-less action), gitweb would put the following
Perl warnings in error log:

gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2065.
fatal: error processing config file(s)
gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2221.
gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2218.

The problem is in the following fragment of code:

# path to the current git repository
our $git_dir;
$git_dir = "$projectroot/$project" if $project;

# list of supported snapshot formats
our @snapshot_fmts = gitweb_get_feature('snapshot');
@snapshot_fmts = filter_snapshot_fmts(@snapshot_fmts);

For the toplevel gitweb page, which is the list of projects, $project is not
defined, therefore neither is $git_dir. gitweb_get_feature() subroutine
calls git_get_project_config() if project specific override is turned
on... but we don't have project here.

Those errors mentioned above occur in the following fragment of code in
git_get_project_config():

# get config
if (!defined $config_file ||
$config_file ne "$git_dir/config") {
%config = git_parse_project_config('gitweb');
$config_file = "$git_dir/config";
}

git_parse_project_config() calls git_cmd() which has '--git-dir='.$git_dir

There are (at least) three possible solutions:
1. Harden gitweb_get_feature() so that it doesn't call
git_get_project_config() if $project (and therefore $git_dir) is not
defined; there is no project for project specific config.
2. Harden git_get_project_config() like you did in your fix, returning early
if $git_dir is not defined.
3. Harden git_cmd() so that it doesn't add "--git-dir=$git_dir" if $git_dir
is not defined, and change git_get_project_config() so that it doesn't
even try to access $git_dir if it is not defined.

This commit implements both 1.) and 2.), i.e. gitweb_get_feature() doesn't
call project-specific override if $git_dir is not defined (if there is no
project), and git_get_project_config() returns early if $git_dir is not
defined.

Add a test for this bug to t/t9500-gitweb-standalone-no-errors.sh test.

Reported-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb multiple project roots documentationSylvain Rabot Tue, 2 Mar 2010 00:04:57 +0000 (01:04 +0100)

gitweb multiple project roots documentation

This commit adds in the gitweb/README file a description of how to use gitweb
with several project roots using apache virtualhost rewrite rules.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refactor merge flags into xmparam_tBert Wesarg Mon, 1 Mar 2010 21:46:26 +0000 (22:46 +0100)

refactor merge flags into xmparam_t

Include the merge level, favor, and style flags into the xmparam_t struct.
This removes the bit twiddling with these three values into the one flags
parameter.

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

make union merge an xdl merge favorBert Wesarg Mon, 1 Mar 2010 21:46:25 +0000 (22:46 +0100)

make union merge an xdl merge favor

The current union merge driver is implemented as an post process. But the
xdl_merge code is quite capable to produce the result by itself. Therefore
move it there.

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

remote-curl: init walker only when neededTay Ray Chuan Tue, 2 Mar 2010 10:49:31 +0000 (18:49 +0800)

remote-curl: init walker only when needed

Invoke get_http_walker() only when fetching with the dumb protocol.
Additionally, add an invocation to walker_free() after we're done using
the walker.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: use http_fetch_ref() instead of walker... Tay Ray Chuan Tue, 2 Mar 2010 10:49:30 +0000 (18:49 +0800)

remote-curl: use http_fetch_ref() instead of walker wrapper

The http-walker implementation of walker->fetch_ref() doesn't do
anything special compared to http_fetch_ref() anyway.

Remove init_walker() invocation before fetching the ref, since we aren't
using the walker wrapper and don't need a walker instance anymore.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: init and cleanup separately from http-walkerTay Ray Chuan Tue, 2 Mar 2010 10:49:29 +0000 (18:49 +0800)

http: init and cleanup separately from http-walker

Previously, all our http operations were done with http-walker. With the
new remote-curl helper, we find ourselves using http methods outside of
http-walker - for example, fetching info/refs.

Accomodate this by separating http_init() and http_cleanup() invocations
from http-walker.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-walker: cleanup more thoroughlyTay Ray Chuan Tue, 2 Mar 2010 10:49:28 +0000 (18:49 +0800)

http-walker: cleanup more thoroughly

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-push: remove "|| 1" to enable verbose checkTay Ray Chuan Tue, 2 Mar 2010 10:49:27 +0000 (18:49 +0800)

http-push: remove "|| 1" to enable verbose check

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t554[01]-http-push: refactor, add non-ff testsTay Ray Chuan Tue, 2 Mar 2010 10:49:26 +0000 (18:49 +0800)

t554[01]-http-push: refactor, add non-ff tests

Move non-fast forward tests to lib-httpd.sh so that we don't have to
duplicate the tests in both t5540 and t5541.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5541-http-push: check that ref is unchanged for non... Tay Ray Chuan Tue, 2 Mar 2010 10:49:25 +0000 (18:49 +0800)

t5541-http-push: check that ref is unchanged for non-ff test

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cc/maint-bisect-paths'Junio C Hamano Mon, 1 Mar 2010 09:09:21 +0000 (01:09 -0800)

Merge branch 'cc/maint-bisect-paths'

* cc/maint-bisect-paths:
bisect: error out when passing bad path parameters

bisect: error out when passing bad path parametersChristian Couder Sun, 28 Feb 2010 22:19:09 +0000 (23:19 +0100)

bisect: error out when passing bad path parameters

As reported by Mark Lodato, "git bisect", when it was started with
path parameters that match no commit was kind of working without
taking account of path parameters and was reporting something like:

Bisecting: -1 revisions left to test after this (roughly 0 steps)

It is more correct and safer to just error out in this case, before
displaying the revisions left, so this patch does just that.

Note that this bug is very old, it exists at least since v1.5.5.
And it is possible to detect that case earlier in the bisect
algorithm, but it is not clear that it would be an improvement to
error out earlier, on the contrary it may change the behavior of
"git rev-list --bisect-all" for example, which is currently correct.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 28 Feb 2010 19:41:57 +0000 (11:41 -0800)

Merge branch 'maint'

* maint:
Git 1.7.0.1
Remove reference to GREP_COLORS from documentation
sha1_name: fix segfault caused by invalid index access

Git 1.7.0.1 v1.7.0.1Junio C Hamano Sun, 28 Feb 2010 19:41:24 +0000 (11:41 -0800)

Git 1.7.0.1

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

Remove reference to GREP_COLORS from documentationMark Lodato Sat, 27 Feb 2010 04:57:48 +0000 (23:57 -0500)

Remove reference to GREP_COLORS from documentation

There is no longer support for external grep, as per bbc09c2 (grep: rip
out support for external grep, 2010-01-12), so remove the reference to it
from the documentation.

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

git-am: Add tests for `--keep-cr`, `--no-keep-cr` and... Stefan-W. Hahn Sat, 27 Feb 2010 14:20:28 +0000 (15:20 +0100)

git-am: Add tests for `--keep-cr`, `--no-keep-cr` and `am.keepcr`

Add tests for git-am using files with DOS line endings for various
combinations of `--keep-cr`, `--no-keep-cr` and `am.keepcr`.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: Add am.keepcr and --no-keep-cr to override itStefan-W. Hahn Sat, 27 Feb 2010 14:20:27 +0000 (15:20 +0100)

git-am: Add am.keepcr and --no-keep-cr to override it

This patch adds the configuration `am.keepcr` for git-am. It also adds
`--no-keep-cr` parameter for git-am to give the possibility to
override configuration from command line.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: Add command line parameter `--keep-cr` passing... Stefan-W. Hahn Sat, 27 Feb 2010 14:20:26 +0000 (15:20 +0100)

git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit

c2ca1d7 (Allow mailsplit (and hence git-am) to handle mails with CRLF
line-endings, 2009-08-04) fixed "git mailsplit" to help people with
MUA whose output from save-as command uses CRLF as line terminators by
stripping CR at the end of lines.

However, when you know you are feeding output from "git format-patch"
directly to "git am", and especially when your contents have CR at the
end of line, such stripping is undesirable. To help such a use case,
teach --keep-cr option to "git am" and pass that to "git mailinfo".

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

documentation: 'git-mailsplit --keep-cr' is not hidden... Stefan-W. Hahn Sat, 27 Feb 2010 14:20:25 +0000 (15:20 +0100)

documentation: 'git-mailsplit --keep-cr' is not hidden anymore

So far this was an internal mechanism for rebase, but we will be exposing
it to the end users.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: clarify definition of TEST_OBJSJonathan Nieder Sun, 28 Feb 2010 09:11:55 +0000 (03:11 -0600)

Makefile: clarify definition of TEST_OBJS

The definition of TEST_OBJS in commit daa99a91 (Makefile: make sure
test helpers are rebuilt when headers change, 2010-01-26) moved a use
of $X to before the platform-specific section where it gets defined.
There are at least two ways to fix that:

- Change the definition of TEST_OBJS to use the = delayed
evaluation operator. This way, one need not worry about $(X)
needing to be defined before TEST_OBJS is set.

- Move the definition of TEST_OBJS to below the definition of $X.

Carry out the second. The later site of definition makes the code more
readable, since now a reader only has to look down one line to see what
TEST_OBJS is meant to be used for.

Oddly enough, with or without this change the behavior of the Makefile
is the same. Since TEST_PROGRAMS is defined with delayed evaluation,
the value of

TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))

is independent of the value of $X when it is evaluated: the $X in the
pattern and the $X in $(TEST_PROGRAMS) will simply always cancel out.
Make sure $X has the expected expansion anyway to make the code and
the reader’s sanity more robust in the face of future changes.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-push: add tests for git push --porcelainLarry D'Anna Sat, 27 Feb 2010 04:52:16 +0000 (23:52 -0500)

git-push: add tests for git push --porcelain

Verify that the output format is correct for successful, rejected, and
flagrantly erroneous pushes.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-push: make git push --porcelain print "Done"Larry D'Anna Sat, 27 Feb 2010 04:52:15 +0000 (23:52 -0500)

git-push: make git push --porcelain print "Done"

The script calling git push --porcelain --dry-run can see clearly from the
output if an update was rejected. However, it will probably need to distinguish
this condition from the push failing for other reasons, such as the remote not
being reachable.

This patch modifies git push --porcelain to print "Done" after the rest of its
output unless any errors have occurred. For the purpose of the "Done" line,
knowing a ref will be rejected in a --dry-run does not count as an error.
Actual rejections in non --dry-run pushes do count as errors.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-push: send "To <remoteurl>" messages to the standar... Larry D'Anna Sat, 27 Feb 2010 04:52:14 +0000 (23:52 -0500)

git-push: send "To <remoteurl>" messages to the standard output in --porcelain mode

git-push prints the line "To <remoteurl>" before above each of the ref status
lines. In --porcelain mode, these "To <remoteurl>" lines go to the standard
error, but the ref status lines go to the standard output. This makes it
difficult for the process reading standard output to know which ref status lines
correspond to which remote. This patch sends the "To <remoteurl>" lines to the
the standard output instead.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-push: fix an advice message so it goes to stderrLarry D'Anna Sat, 27 Feb 2010 04:52:13 +0000 (23:52 -0500)

git-push: fix an advice message so it goes to stderr

These sort of messages typically go to the standard error.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

sha1_name: fix segfault caused by invalid index accessMarkus Heidelberg Sun, 28 Feb 2010 15:49:15 +0000 (16:49 +0100)

sha1_name: fix segfault caused by invalid index access

The code to see if user input "git show :path" makes sense tried to access
the index without properly checking the array bound.

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

reflog: honor gc.reflogexpire=neverAdam Simpkins Sat, 27 Feb 2010 03:50:03 +0000 (19:50 -0800)

reflog: honor gc.reflogexpire=never

Previously, if gc.reflogexpire or gc.reflogexpire were set to "never"
or "false", the builtin default values were used instead.

Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

prune: honor --expire=neverAdam Simpkins Sat, 27 Feb 2010 03:50:02 +0000 (19:50 -0800)

prune: honor --expire=never

Previously, prune treated an expiration time of 0 to mean that no
expire argument was supplied, and everything should be pruned. As a
result, "prune --expire=never" would prune all unreachable objects,
regardless of their timestamp.

prune can be called with --expire=never automatically by gc, when the
gc.pruneExpire configuration is set to "never".

Signed-off-by: Adam Simpkins <simpkins@facebook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git svn: delay importing SVN::Base until it is neededjosh robb Wed, 24 Feb 2010 03:13:50 +0000 (16:13 +1300)

git svn: delay importing SVN::Base until it is needed

Importing functions from a .dll into Git for Windows' perl is pretty slow,
so let's avoid importing if it is not necessary.

This seems particularly slow in virtualized enviroments. Before this
change (on my machine):

$ time perl /libexec/git-core/git-svn rebase
Current branch master is up to date.

real 2m56.750s
user 0m3.129s
sys 2m39.232s

Afterwards:

$ time perl /libexec/git-core/git-svn rebase
Current branch master is up to date.

real 0m33.407s
user 0m1.409s
sys 0m23.054s

git svn rebase -n goes from 3m7.046s to 0m10.312s.

Signed-off-by: Josh Robb <josh_robb@fastmail.fm>
Acked-by: Eric Wong <normalperson@yhbt.net>

git-svn: Fix discarding of extra parents from svn:mergeinfoTuomas Suutari Mon, 22 Feb 2010 18:12:53 +0000 (20:12 +0200)

git-svn: Fix discarding of extra parents from svn:mergeinfo

If parent J is an ancestor of parent I, then parent J should be
discarded, not I.

Note that J is an ancestor of I if and only if rev-list I..J is emtpy,
which is what we are testing here.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

t9151: Add two new svn:mergeinfo test casesTuomas Suutari Mon, 22 Feb 2010 07:57:21 +0000 (09:57 +0200)

t9151: Add two new svn:mergeinfo test cases

When svn:mergeinfo contains two new parents in a specific order and
one is ancestor of the other, it is possible that git-svn discards the
wrong one. The first test case ("commit made to merged branch is
reachable from the merge") proves this.

The second test case ("merging two branches in one commit is detected
correctly") is just for completeness, since there was no test for
merging two (feature) branches to trunk in one commit.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

t9151: Fix a few commits in the SVN dumpTuomas Suutari Mon, 22 Feb 2010 07:57:20 +0000 (09:57 +0200)

t9151: Fix a few commits in the SVN dump

A few "svn cp" commands and commit commands were executed in incorrect
order. Therefore some of the desired commits were missing and some
were committed with wrong revision number in the commit message. This
made it hard to compare the produced git repository with the SVN
repository.

The dump file is updated too, but only the relevant parts and with
hand-edited timestamps to make history linear.

Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'maint'Junio C Hamano Fri, 26 Feb 2010 07:21:50 +0000 (23:21 -0800)

Merge branch 'maint'

* maint:
t3301-notes: insert a shbang line in ./fake_editor.sh

Merge branch 'maint-1.6.6' into maintJunio C Hamano Fri, 26 Feb 2010 07:21:42 +0000 (23:21 -0800)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
t3301-notes: insert a shbang line in ./fake_editor.sh

t/t0001-init.sh: add test for 'init with init.templated... Steven Drake Fri, 26 Feb 2010 04:00:21 +0000 (17:00 +1300)

t/t0001-init.sh: add test for 'init with init.templatedir set'

Requires a small change to wrap-for-bin.sh in order to work.

Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

init: having keywords without value is not a global... Steven Drake Fri, 26 Feb 2010 04:00:20 +0000 (17:00 +1300)

init: having keywords without value is not a global error.

We may later add a new configuration variable in "init" section that takes
a boolean value. Erroring out at the beginning of the config parser makes
life harder for later enhancement.

The existing configuration variable is parsed by git_config_pathname()
that checks and rejects init.templatedir that is unset without this extra
check. Remove it.

Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep docs: document --no-index optionMark Lodato Fri, 26 Feb 2010 03:40:13 +0000 (22:40 -0500)

grep docs: document --no-index option

Also clarify --cached and <tree>.

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

grep docs: --cached and <tree>... are incompatibleMark Lodato Fri, 26 Feb 2010 03:40:12 +0000 (22:40 -0500)

grep docs: --cached and <tree>... are incompatible

In the synopsis for git-grep(1), show that --cached and <tree>... cannot
be used together.

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

grep docs: use AsciiDoc literals consistentlyMark Lodato Fri, 26 Feb 2010 03:40:11 +0000 (22:40 -0500)

grep docs: use AsciiDoc literals consistently

The convention for this particular page is to use AsciiDoc literal
strings only for options (`-x` or `--long`), but not for definition list
terms and not for <meta-vars>.

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

grep docs: pluralize "Example" sectionMark Lodato Fri, 26 Feb 2010 03:40:10 +0000 (22:40 -0500)

grep docs: pluralize "Example" section

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

Windows: redirect f[re]open("/dev/null") to f[re]open... Johannes Sixt Thu, 25 Feb 2010 20:03:44 +0000 (21:03 +0100)

Windows: redirect f[re]open("/dev/null") to f[re]open("nul")

On Windows, the equivalent of "/dev/null" is "nul". This implements
compatibility wrappers around fopen() and freopen() that check for this
particular file name.

The new tests exercise code paths where this is relevant.

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

t3301-notes: insert a shbang line in ./fake_editor.shJohannes Sixt Thu, 25 Feb 2010 10:39:50 +0000 (11:39 +0100)

t3301-notes: insert a shbang line in ./fake_editor.sh

This is required on Windows because git-notes is now a built-in
rather than a shell script.

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

Fix gitmkdtemp: correct test for mktemp() return valueFilippo Negroni Thu, 25 Feb 2010 10:01:31 +0000 (10:01 +0000)

Fix gitmkdtemp: correct test for mktemp() return value

In gitmkdtemp, the return value of mktemp is not tested correctly.
mktemp() always returns its 'template' argument, even upon failure.
An error is signalled by making the template an empty string.

Signed-off-by: Filippo Negroni <fnegroni@flexerasoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes: fix malformed tree entryJunio C Hamano Thu, 25 Feb 2010 05:39:06 +0000 (21:39 -0800)

notes: fix malformed tree entry

The mode bits for entries in a tree object should be an octal number
with minimum number of digits. Do not pad it with 0 to the left.

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

builtin-notes: Minor (mostly parse_options-related... Johan Herland Thu, 25 Feb 2010 00:48:11 +0000 (01:48 +0100)

builtin-notes: Minor (mostly parse_options-related) fixes

Use PARSE_OPT_NONEG to disallow --no-<option> for message, file,
reedit-message and reuse-message. for which --no-<option> does not make
sense. This also simplifies the code in the option-handling callbacks.

Also, use strbuf_addch(... '\n') instead of strbuf_addstr(... "\n") in
couple of places.

Finally, improve the short-help by dividing the options into two
OPT_GROUPs.

Suggested-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Johan Herland <johan@herland.net>
Acked-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-objects documentation: Fix --honor-pack-keep as... Nelson Elhage Thu, 25 Feb 2010 00:11:23 +0000 (19:11 -0500)

pack-objects documentation: Fix --honor-pack-keep as well.

Signed-off-by: Nelson Elhage <nelhage@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

is_submodule_modified(): clear environment properlyGiuseppe Bilotta Wed, 24 Feb 2010 23:34:18 +0000 (00:34 +0100)

is_submodule_modified(): clear environment properly

Rather than only clearing GIT_INDEX_FILE, take the list of environment
variables to clear from local_repo_env, appending the settings for
GIT_DIR and GIT_WORK_TREE.

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