Code

git.git
13 years agoMerge branch 'nd/maint-relative' into next
Junio C Hamano [Sat, 11 Dec 2010 02:17:23 +0000 (18:17 -0800)]
Merge branch 'nd/maint-relative' into next

* nd/maint-relative:
  get_cwd_relative(): do not misinterpret root path

13 years agoMerge branch 'ak/describe-exact' into next
Junio C Hamano [Sat, 11 Dec 2010 02:17:23 +0000 (18:17 -0800)]
Merge branch 'ak/describe-exact' into next

* ak/describe-exact:
  describe: Delay looking up commits until searching for an inexact match
  describe: Store commit_names in a hash table by commit SHA1
  describe: Do not use a flex array in struct commit_name
  describe: Use for_each_rawref

13 years agoMerge branch 'rj/msvc-fix' into next
Junio C Hamano [Sat, 11 Dec 2010 02:17:23 +0000 (18:17 -0800)]
Merge branch 'rj/msvc-fix' into next

* rj/msvc-fix:
  msvc: Fix macro redefinition warnings
  msvc: Fix build by adding missing INTMAX_MAX define
  msvc: git-daemon.exe: Fix linker "unresolved externals" error
  msvc: Fix compilation errors in compat/win32/sys/poll.c

13 years agoMerge branch 'aa/status-hilite-branch' into next
Junio C Hamano [Sat, 11 Dec 2010 00:40:56 +0000 (16:40 -0800)]
Merge branch 'aa/status-hilite-branch' into next

* aa/status-hilite-branch:
  default color.status.branch to "same as header"

13 years agoMerge branch 'nd/extended-sha1-relpath' into next
Junio C Hamano [Sat, 11 Dec 2010 00:40:54 +0000 (16:40 -0800)]
Merge branch 'nd/extended-sha1-relpath' into next

* nd/extended-sha1-relpath:
  get_sha1: teach ":$n:<path>" the same relative path logic

13 years agoMerge branch 'jl/fetch-submodule-recursive' into next
Junio C Hamano [Sat, 11 Dec 2010 00:40:54 +0000 (16:40 -0800)]
Merge branch 'jl/fetch-submodule-recursive' into next

* jl/fetch-submodule-recursive:
  fetch_populated_submodules(): document dynamic allocation

13 years agoMerge branch 'master' into next
Junio C Hamano [Sat, 11 Dec 2010 00:40:09 +0000 (16:40 -0800)]
Merge branch 'master' into next

* master:
  Relnotes: remove items fixed on 'maint'
  Prepare for 1.7.3.4
  thread-utils.h: simplify the inclusion
  Makefile: transport-helper uses thread-utils.h
  Add --force to git-send-email documentation

13 years agoRelnotes: remove items fixed on 'maint'
Junio C Hamano [Sat, 11 Dec 2010 00:40:00 +0000 (16:40 -0800)]
Relnotes: remove items fixed on 'maint'

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sat, 11 Dec 2010 00:36:19 +0000 (16:36 -0800)]
Merge branch 'maint'

13 years agoPrepare for 1.7.3.4
Junio C Hamano [Sat, 11 Dec 2010 00:35:00 +0000 (16:35 -0800)]
Prepare for 1.7.3.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jk/maint-decorate-01-bool' into maint
Junio C Hamano [Sat, 11 Dec 2010 00:13:14 +0000 (16:13 -0800)]
Merge branch 'jk/maint-decorate-01-bool' into maint

* jk/maint-decorate-01-bool:
  log.decorate: accept 0/1 bool values

13 years agoMerge branch 'mg/maint-tag-rfc1991' into maint
Junio C Hamano [Sat, 11 Dec 2010 00:13:03 +0000 (16:13 -0800)]
Merge branch 'mg/maint-tag-rfc1991' into maint

* mg/maint-tag-rfc1991:
  tag: recognize rfc1991 signatures
  tag: factor out sig detection for tag display
  tag: factor out sig detection for body edits
  verify-tag: factor out signature detection
  t/t7004-tag: test handling of rfc1991 signatures

13 years agoMerge branch 'ks/maint-getenv-fix' into maint
Junio C Hamano [Sat, 11 Dec 2010 00:12:51 +0000 (16:12 -0800)]
Merge branch 'ks/maint-getenv-fix' into maint

* ks/maint-getenv-fix:
  setup: make sure git_dir path is in a permanent buffer, getenv(3) case

13 years agodefault color.status.branch to "same as header"
Jeff King [Thu, 9 Dec 2010 17:27:08 +0000 (12:27 -0500)]
default color.status.branch to "same as header"

This gives it the same behavior as we had prior to 1d28232
(status: show branchname with a configurable color).

To do this we need the concept of a "NIL" color, which is
provided by color.[ch]. The implementation is very simple;
in particular, there are no precautions taken against code
accidentally printing the NIL. This should be fine in
practice because:

  1. You can't input a NIL color in the config, so it must
     come from the in-code defaults. Which means it is up
     the client code to handle the NILs it defines.

  2. If we do ever print a NIL, it will be obvious what the
     problem is, and the bug can be fixed.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agothread-utils.h: simplify the inclusion
Junio C Hamano [Fri, 10 Dec 2010 18:32:12 +0000 (10:32 -0800)]
thread-utils.h: simplify the inclusion

All files that include this header file use the same four line
incantation:

    #ifndef NO_PTHREADS
    #include <pthread.h>
    #include "thread-utils.h"
    #endif

Move the responsibility for that gymnastics to the header file from the
files that include it.  This approach makes it easier to later declare new
services that are related to threading in thread-utils.h and have them
available to all the threading code.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: transport-helper uses thread-utils.h
Jonathan Nieder [Fri, 10 Dec 2010 19:48:25 +0000 (13:48 -0600)]
Makefile: transport-helper uses thread-utils.h

transport-helper.o gained a dependency on thread-utils.h in
7851b1e (remote-fd/ext: finishing touches after code review,
2010-11-17).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd --force to git-send-email documentation
Alejandro R. Sedeño [Fri, 10 Dec 2010 18:44:15 +0000 (13:44 -0500)]
Add --force to git-send-email documentation

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofetch_populated_submodules(): document dynamic allocation
Junio C Hamano [Fri, 10 Dec 2010 07:42:05 +0000 (23:42 -0800)]
fetch_populated_submodules(): document dynamic allocation

... while fixing a miscounting.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Fri, 10 Dec 2010 00:51:08 +0000 (16:51 -0800)]
Merge branch 'master' into next

* master:
  Documentation/git.txt: update list of maintenance releases
  t9143: do not fail when unhandled.log.gz is not created
  git-svn: allow the mergeinfo property to be set

13 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Fri, 10 Dec 2010 00:03:41 +0000 (16:03 -0800)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  t9143: do not fail when unhandled.log.gz is not created
  git-svn: allow the mergeinfo property to be set

13 years agomsvc: Fix macro redefinition warnings
Ramsay Jones [Sat, 4 Dec 2010 19:00:51 +0000 (19:00 +0000)]
msvc: Fix macro redefinition warnings

Commit 4091bfc (MinGW: Add missing file mode bit defines,
28-12-2009) causes the msvc build to issue many additional
(currently 1008) macro redefinition warnings. The warnings
relate to the S_IRUSR, S_IWUSR, S_IXUSR and S_IRWXU macros.

In order to fix the warnings, we simply remove the offending
macro definitions which, for both msvc and MinGW, are not
required.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomsvc: Fix build by adding missing INTMAX_MAX define
Ramsay Jones [Sat, 4 Dec 2010 18:57:30 +0000 (18:57 +0000)]
msvc: Fix build by adding missing INTMAX_MAX define

Commit c03c831 (do not depend on signed integer overflow,
05-10-2010) provokes an msvc build failure. The cause of the
failure is a missing definition of the INTMAX_MAX constant,
used in the new maximum_signed_value_of_type(a) macro, which
would normally be defined in the C99 <stdint.h> header file.

In order the fix the compilation error, we add an appropriate
definition of the INTMAX_MAX constant, along with INTMAX_MIN
and UINTMAX_MAX, to an msvc compat header file.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git.txt: update list of maintenance releases
Junio C Hamano [Thu, 9 Dec 2010 23:52:12 +0000 (15:52 -0800)]
Documentation/git.txt: update list of maintenance releases

Recently we have made 1.7.3.3, 1.7.2.4, 1.7.1.3 and 1.7.0.8.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoget_sha1: teach ":$n:<path>" the same relative path logic
Junio C Hamano [Thu, 9 Dec 2010 21:38:05 +0000 (13:38 -0800)]
get_sha1: teach ":$n:<path>" the same relative path logic

We taught the object name parser to take ":./<path>", ":../<path>", etc.
and understand them to be relative to the current working directory.

Given that ":<path>" is just a short-hand for ":0:<path>" (i.e. "take
stage #0 of that path"), we should allow ":$n:<path>" to interpret them
the same way.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9143: do not fail when unhandled.log.gz is not created
Torsten Bögershausen [Thu, 9 Dec 2010 19:53:19 +0000 (20:53 +0100)]
t9143: do not fail when unhandled.log.gz is not created

Do not depend on internal implementation details of svn,
which right now uses perl to create a .gz file.
So this test case will even work in the future,
when svn changes its implementation.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: allow the mergeinfo property to be set
Steven Walter [Sat, 25 Sep 2010 03:51:50 +0000 (23:51 -0400)]
git-svn: allow the mergeinfo property to be set

As a first step towards preserving merges across dcommit, we need a
mechanism to update the svn:mergeinfo property.

[ew: fixed bashism and style issues in test case]

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agodescribe: Delay looking up commits until searching for an inexact match
Anders Kaseorg [Thu, 9 Dec 2010 06:47:29 +0000 (01:47 -0500)]
describe: Delay looking up commits until searching for an inexact match

Now that struct commit.util is not used until after we've checked that
the argument doesn't exactly match a tag, we can wait until then to
look up the commits for each tag.

This avoids a lot of I/O on --exact-match queries in repositories with
many tags.  For example, 'git describe --exact-match HEAD' becomes
about 12 times faster on a cold cache (3.2s instead of 39s) in a
linux-2.6 repository with 2000 packed tags.  That is a huge win for the
interactivity of the __git_ps1 shell prompt helper when on a detached
HEAD.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodescribe: Store commit_names in a hash table by commit SHA1
Anders Kaseorg [Thu, 9 Dec 2010 06:46:08 +0000 (01:46 -0500)]
describe: Store commit_names in a hash table by commit SHA1

describe is currently forced to look up the commit at each tag in
order to store the struct commit_name pointers in struct commit.util.
For --exact-match queries, those lookups are wasteful.  In preparation
for removing them, put the commit_names into a hash table, indexed by
commit SHA1, that can be used to quickly check for exact matches.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodescribe: Do not use a flex array in struct commit_name
Anders Kaseorg [Thu, 9 Dec 2010 06:43:32 +0000 (01:43 -0500)]
describe: Do not use a flex array in struct commit_name

Now add_to_known_names overwrites commit_names in place when multiple
tags point to the same commit.  This will make it easier to store
commit_names in a hash table.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodescribe: Use for_each_rawref
Anders Kaseorg [Thu, 9 Dec 2010 06:42:25 +0000 (01:42 -0500)]
describe: Use for_each_rawref

Don't waste time checking for dangling refs; they wouldn't affect the
output of 'git describe' anyway.  Although this does not gain much
performance by itself, it does in conjunction with the next commits.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomsvc: git-daemon.exe: Fix linker "unresolved externals" error
Ramsay Jones [Sat, 4 Dec 2010 18:55:51 +0000 (18:55 +0000)]
msvc: git-daemon.exe: Fix linker "unresolved externals" error

The msvc linker complains about external symbols referenced by
the new poll() emulation code. In particular, it complains about
the DispatchMessage(), PeekMessage(), TranslateMessage() and
MsgWaitForMultipleObjects() functions.

In order to satisfy the external references, we link against the
user32.lib library.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomsvc: Fix compilation errors in compat/win32/sys/poll.c
Ramsay Jones [Sat, 4 Dec 2010 18:54:28 +0000 (18:54 +0000)]
msvc: Fix compilation errors in compat/win32/sys/poll.c

The msvc winsock2.h header file conditionally defines or declares
poll() related symbols which cause many macro redefinition errors,
a struct type redefinition error and syntax errors. These symbols
are defined in support of the WSAPoll() API, new in Windows Vista,
when the symbol _WIN32_WINNT is defined and _WIN32_WINNT >= 0x0600.

In order to avoid the compilation errors, we set _WIN32_WINNT to
0x0502 (which would target Windows Server 2003) prior to including
the winsock2.h header file.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Thu, 9 Dec 2010 18:49:05 +0000 (10:49 -0800)]
Merge branch 'master' into next

* master:
  contrib/hooks/post-receive-email: fix return values from prep_for_email

13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 9 Dec 2010 18:45:53 +0000 (10:45 -0800)]
Merge branch 'maint'

* maint:
  contrib/hooks/post-receive-email: fix return values from prep_for_email

13 years agoMerge branch 'jn/ignore-doc' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:38:16 +0000 (10:38 -0800)]
Merge branch 'jn/ignore-doc' into maint

* jn/ignore-doc:
  Documentation: point to related commands from gitignore
  Documentation: split gitignore page into sections

13 years agoMerge branch 'jn/cherry-pick-refresh-index' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:51 +0000 (10:36 -0800)]
Merge branch 'jn/cherry-pick-refresh-index' into maint

* jn/cherry-pick-refresh-index:
  cherry-pick/revert: transparently refresh index

13 years agoMerge branch 'jl/add-p-reverse-message' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:47 +0000 (10:36 -0800)]
Merge branch 'jl/add-p-reverse-message' into maint

* jl/add-p-reverse-message:
  Correct help blurb in checkout -p and friends

13 years agoMerge branch 'np/diff-in-corrupt-repository' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:39 +0000 (10:36 -0800)]
Merge branch 'np/diff-in-corrupt-repository' into maint

* np/diff-in-corrupt-repository:
  diff: don't presume empty file when corresponding object is missing

13 years agoMerge branch 'fc/apply-p2-get-header-name' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:36 +0000 (10:36 -0800)]
Merge branch 'fc/apply-p2-get-header-name' into maint

* fc/apply-p2-get-header-name:
  test: git-apply -p2 rename/chmod only
  Fix git-apply with -p greater than 1

13 years agoMerge branch 'np/pack-broken-boundary' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:23 +0000 (10:36 -0800)]
Merge branch 'np/pack-broken-boundary' into maint

* np/pack-broken-boundary:
  make pack-objects a bit more resilient to repo corruption

13 years agoMerge branch 'ak/apply-non-git-epoch' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:16 +0000 (10:36 -0800)]
Merge branch 'ak/apply-non-git-epoch' into maint

* ak/apply-non-git-epoch:
  apply: handle patches with funny filename and colon in timezone
  apply: Recognize epoch timestamps with : in the timezone

13 years agoMerge branch 'cm/diff-check-at-eol' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:10 +0000 (10:36 -0800)]
Merge branch 'cm/diff-check-at-eol' into maint

* cm/diff-check-at-eol:
  diff --check: correct line numbers of new blank lines at EOF

13 years agoMerge branch 'tc/smart-http-post-redirect' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:36:04 +0000 (10:36 -0800)]
Merge branch 'tc/smart-http-post-redirect' into maint

* tc/smart-http-post-redirect:
  smart-http: Don't change POST to GET when following redirect

13 years agoMerge branch 'ab/require-perl-5.8' into maint
Junio C Hamano [Thu, 9 Dec 2010 18:35:21 +0000 (10:35 -0800)]
Merge branch 'ab/require-perl-5.8' into maint

* ab/require-perl-5.8:
  perl: use "use warnings" instead of -w
  perl: bump the required Perl version to 5.8 from 5.6.[21]

13 years agocontrib/hooks/post-receive-email: fix return values from prep_for_email
Alan Raison [Thu, 9 Dec 2010 16:03:05 +0000 (16:03 +0000)]
contrib/hooks/post-receive-email: fix return values from prep_for_email

The function was returning 0 for failure and 1 for success which was
breaking the logic in the main loop.  It now also returns in all
cases, rather than exiting.

Signed-off-by: Alan Raison <alan@theraisons.me.uk>
Acked-by: Kevin P. Fleming <kpfleming@digium.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/maint-svn-fe' into next
Junio C Hamano [Thu, 9 Dec 2010 17:26:43 +0000 (09:26 -0800)]
Merge branch 'jn/maint-svn-fe' into next

* jn/maint-svn-fe:
  t9010 fails when no svn is available

13 years agot9010 fails when no svn is available
Junio C Hamano [Thu, 9 Dec 2010 06:53:59 +0000 (22:53 -0800)]
t9010 fails when no svn is available

Running test t9010 without svn currently errors out for no good reason.

The test uses "svnadmin" without checking if svn is available.  This was a
regression introduced by b0ad24b (t9010 (svn-fe): Eliminate dependency on
svn perl bindings, 2010-10-10) when it stopped including ./lib-git-svn.sh
that had the safety.

This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-no-openssl-build-fix' into next
Junio C Hamano [Wed, 8 Dec 2010 23:15:30 +0000 (15:15 -0800)]
Merge branch 'jc/maint-no-openssl-build-fix' into next

* jc/maint-no-openssl-build-fix:
  Do not link with -lcrypto under NO_OPENSSL

13 years agoDo not link with -lcrypto under NO_OPENSSL
Junio C Hamano [Wed, 8 Dec 2010 22:54:13 +0000 (14:54 -0800)]
Do not link with -lcrypto under NO_OPENSSL

With 401857c (imap-send: link against libcrypto for HMAC and others,
2010-11-24) we started linking imap-send unconditionally with -lcrypto by
mistake; disable this when we are building under NO_OPENSSL.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-svn-info-test-fix' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'jc/maint-svn-info-test-fix' into next

* jc/maint-svn-info-test-fix:
  t9119: do not compare "Text Last Updated" line from "svn info"

13 years agoMerge branch 'jn/submodule-b-current' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'jn/submodule-b-current' into next

* jn/submodule-b-current:
  git submodule: Remove now obsolete tests before cloning a repo
  git submodule -b ... of current HEAD fails

13 years agoMerge branch 'aa/status-hilite-branch' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'aa/status-hilite-branch' into next

* aa/status-hilite-branch:
  status: show branchname with a configurable color

13 years agoMerge branch 'ef/help-cmd-prefix' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'ef/help-cmd-prefix' into next

* ef/help-cmd-prefix:
  help: always suggest common-cmds if prefix of cmd

13 years agoMerge branch 'jn/fast-import-blob-access' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'jn/fast-import-blob-access' into next

* jn/fast-import-blob-access:
  t9300: remove unnecessary use of /dev/stdin
  fast-import: Allow cat-blob requests at arbitrary points in stream
  fast-import: let importers retrieve blobs
  fast-import: clarify documentation of "feature" command
  fast-import: stricter parsing of integer options

Conflicts:
fast-import.c

13 years agoMerge branch 'jn/gitweb-per-request-config' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:29 +0000 (12:25 -0800)]
Merge branch 'jn/gitweb-per-request-config' into next

* jn/gitweb-per-request-config:
  gitweb: document $per_request_config better
  gitweb: selectable configurations that change with each request

13 years agoMerge branch 'mz/maint-rebase-stat-config' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'mz/maint-rebase-stat-config' into next

* mz/maint-rebase-stat-config:
  rebase: only show stat if configured to true

13 years agoMerge branch 'mz/pull-rebase-rebased' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'mz/pull-rebase-rebased' into next

* mz/pull-rebase-rebased:
  Use reflog in 'pull --rebase . foo'

13 years agoMerge branch 'nd/maint-hide-checkout-index-from-error' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'nd/maint-hide-checkout-index-from-error' into next

* nd/maint-hide-checkout-index-from-error:
  entry.c: remove "checkout-index" from error messages

13 years agoMerge branch 'gb/web--browse' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'gb/web--browse' into next

* gb/web--browse:
  web--browse: better support for chromium
  web--browse: support opera, seamonkey and elinks
  web--browse: split valid_tool list
  web--browse: coding style

13 years agoMerge branch 'ja/maint-pull-rebase-doc' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'ja/maint-pull-rebase-doc' into next

* ja/maint-pull-rebase-doc:
  git-pull.txt: Mention branch.autosetuprebase

13 years agoMerge branch 'js/configurable-tab' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:28 +0000 (12:25 -0800)]
Merge branch 'js/configurable-tab' into next

* js/configurable-tab:
  Make the tab width used for whitespace checks configurable

13 years agoMerge branch 'js/maint-apply-tab-in-indent-fix' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:27 +0000 (12:25 -0800)]
Merge branch 'js/maint-apply-tab-in-indent-fix' into next

* js/maint-apply-tab-in-indent-fix:
  apply --whitespace=fix: fix tab-in-indent

13 years agoMerge branch 'ef/win32-dirent' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:27 +0000 (12:25 -0800)]
Merge branch 'ef/win32-dirent' into next

* ef/win32-dirent:
  win32: use our own dirent.h
  msvc: opendir: handle paths ending with a slash
  win32: dirent: handle errors
  msvc: opendir: do not start the search
  msvc: opendir: allocate enough memory
  msvc: opendir: fix malloc-failure

Conflicts:
Makefile

13 years agoMerge branch 'jk/asciidoc-update' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:27 +0000 (12:25 -0800)]
Merge branch 'jk/asciidoc-update' into next

* jk/asciidoc-update:
  docs: default to more modern toolset

13 years agoMerge branch 'jk/maint-reflog-bottom' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:26 +0000 (12:25 -0800)]
Merge branch 'jk/maint-reflog-bottom' into next

* jk/maint-reflog-bottom:
  reflogs: clear flags properly in corner case

13 years agoMerge branch 'jn/maint-fast-import-object-reuse' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:25 +0000 (12:25 -0800)]
Merge branch 'jn/maint-fast-import-object-reuse' into next

* jn/maint-fast-import-object-reuse:
  fast-import: insert new object entries at start of hash bucket

13 years agoMerge branch 'jn/fast-import-ondemand-checkpoint' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:25 +0000 (12:25 -0800)]
Merge branch 'jn/fast-import-ondemand-checkpoint' into next

* jn/fast-import-ondemand-checkpoint:
  fast-import: treat SIGUSR1 as a request to access objects early

13 years agoMerge branch 'jn/maint-svn-fe' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:25 +0000 (12:25 -0800)]
Merge branch 'jn/maint-svn-fe' into next

* jn/maint-svn-fe:
  vcs-svn: fix intermittent repo_tree corruption
  treap: make treap_insert return inserted node
  t9010 (svn-fe): Eliminate dependency on svn perl bindings

13 years agoMerge branch 'mz/rebase-abort-reflog-fix' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:25 +0000 (12:25 -0800)]
Merge branch 'mz/rebase-abort-reflog-fix' into next

* mz/rebase-abort-reflog-fix:
  rebase --abort: do not update branch ref

13 years agoMerge branch 'mz/rebase-i-verify' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:25 +0000 (12:25 -0800)]
Merge branch 'mz/rebase-i-verify' into next

* mz/rebase-i-verify:
  rebase: support --verify

13 years agoMerge branch 'tc/format-patch-p' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'tc/format-patch-p' into next

* tc/format-patch-p:
  format-patch: page output with --stdout

13 years agoMerge branch 'tc/http-urls-ends-with-slash' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'tc/http-urls-ends-with-slash' into next

* tc/http-urls-ends-with-slash:
  http-fetch: rework url handling
  http-push: add trailing slash at arg-parse time, instead of later on
  http-push: check path length before using it
  http-push: Normalise directory names when pushing to some WebDAV servers
  http-backend: use end_url_with_slash()
  url: add str wrapper for end_url_with_slash()
  shift end_url_with_slash() from http.[ch] to url.[ch]
  t5550-http-fetch: add test for http-fetch
  t5550-http-fetch: add missing '&&'

13 years agoMerge branch 'nd/extended-sha1-relpath' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'nd/extended-sha1-relpath' into next

* nd/extended-sha1-relpath:
  get_sha1: support relative path ":path" syntax
  Make prefix_path() return char* without const

Conflicts:
sha1_name.c

13 years agoMerge branch 'jn/parse-options-extra' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'jn/parse-options-extra' into next

* jn/parse-options-extra:
  update-index: migrate to parse-options API
  setup: save prefix (original cwd relative to toplevel) in startup_info
  parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
  parse-options: allow git commands to invent new option types
  parse-options: never suppress arghelp if LITERAL_ARGHELP is set
  parse-options: do not infer PARSE_OPT_NOARG from option type
  parse-options: sanity check PARSE_OPT_NOARG flag
  parse-options: move NODASH sanity checks to parse_options_check
  parse-options: clearer reporting of API misuse
  parse-options: Don't call parse_options_check() so much

13 years agoMerge branch 'jn/git-cmd-h-bypass-setup' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'jn/git-cmd-h-bypass-setup' into next

* jn/git-cmd-h-bypass-setup:
  update-index -h: show usage even with corrupt index
  merge -h: show usage even with corrupt index
  ls-files -h: show usage even with corrupt index
  gc -h: show usage even with broken configuration
  commit/status -h: show usage even with broken configuration
  checkout-index -h: show usage even in an invalid repository
  branch -h: show usage even in an invalid repository

Conflicts:
builtin/merge.c

13 years agoMerge branch 'jl/fetch-submodule-recursive' into next
Junio C Hamano [Wed, 8 Dec 2010 20:25:24 +0000 (12:25 -0800)]
Merge branch 'jl/fetch-submodule-recursive' into next

* jl/fetch-submodule-recursive:
  Submodules: Add the "fetchRecurseSubmodules" config option
  Add the 'fetch.recurseSubmodules' config setting
  fetch/pull: Add the --recurse-submodules option

Conflicts:
builtin/fetch.c

13 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 8 Dec 2010 19:26:21 +0000 (11:26 -0800)]
Merge branch 'master' into next

* master:

13 years agoMerge branch 'nd/maint-fix-add-typo-detection' (early part)
Junio C Hamano [Wed, 8 Dec 2010 19:25:52 +0000 (11:25 -0800)]
Merge branch 'nd/maint-fix-add-typo-detection' (early part)

* 'nd/maint-fix-add-typo-detection' (early part):
  add: do not rely on dtype being NULL behavior

13 years agoMerge branch 'jn/gitweb-time-hires-comes-with-5.8'
Junio C Hamano [Wed, 8 Dec 2010 19:25:04 +0000 (11:25 -0800)]
Merge branch 'jn/gitweb-time-hires-comes-with-5.8'

* jn/gitweb-time-hires-comes-with-5.8:
  gitweb: Time::HiRes is in core for Perl 5.8

13 years agoMerge branch 'il/remote-fd-ext'
Junio C Hamano [Wed, 8 Dec 2010 19:24:14 +0000 (11:24 -0800)]
Merge branch 'il/remote-fd-ext'

* il/remote-fd-ext:
  remote-fd/ext: finishing touches after code review
  git-remote-ext
  git-remote-fd
  Add bidirectional_transfer_loop()

Conflicts:
compat/mingw.h

13 years agoMerge branch 'jk/pager-per-command'
Junio C Hamano [Wed, 8 Dec 2010 19:24:14 +0000 (11:24 -0800)]
Merge branch 'jk/pager-per-command'

* jk/pager-per-command:
  allow command-specific pagers in pager.<cmd>

13 years agoMerge branch 'jk/maint-decorate-01-bool'
Junio C Hamano [Wed, 8 Dec 2010 19:24:14 +0000 (11:24 -0800)]
Merge branch 'jk/maint-decorate-01-bool'

* jk/maint-decorate-01-bool:
  log.decorate: accept 0/1 bool values

13 years agoMerge branch 'gc/http-with-non-ascii-username-url'
Junio C Hamano [Wed, 8 Dec 2010 19:24:14 +0000 (11:24 -0800)]
Merge branch 'gc/http-with-non-ascii-username-url'

* gc/http-with-non-ascii-username-url:
  Fix username and password extraction from HTTP URLs
  t5550: test HTTP authentication and userinfo decoding

Conflicts:
t/lib-httpd/apache.conf

13 years agoMerge branch 'ks/maint-getenv-fix'
Junio C Hamano [Wed, 8 Dec 2010 19:24:13 +0000 (11:24 -0800)]
Merge branch 'ks/maint-getenv-fix'

* ks/maint-getenv-fix:
  setup: make sure git_dir path is in a permanent buffer, getenv(3) case

13 years agoMerge branch 'gb/gitweb-remote-heads'
Junio C Hamano [Wed, 8 Dec 2010 19:24:13 +0000 (11:24 -0800)]
Merge branch 'gb/gitweb-remote-heads'

* gb/gitweb-remote-heads:
  git instaweb: enable remote_heads
  gitweb: group remote heads by remote
  gitweb: provide a routine to display (sub)sections
  gitweb: refactor repository URL printing
  gitweb: remotes view for a single remote
  gitweb: allow action specialization in page header
  gitweb: nagivation menu for tags, heads and remotes
  gitweb: separate heads and remotes lists
  gitweb: git_get_heads_list accepts an optional list of refs
  gitweb: introduce remote_heads feature
  gitweb: use fullname as hash_base in heads link

13 years agoMerge branch 'mg/maint-tag-rfc1991'
Junio C Hamano [Wed, 8 Dec 2010 19:24:13 +0000 (11:24 -0800)]
Merge branch 'mg/maint-tag-rfc1991'

* mg/maint-tag-rfc1991:
  tag: recognize rfc1991 signatures
  tag: factor out sig detection for tag display
  tag: factor out sig detection for body edits
  verify-tag: factor out signature detection
  t/t7004-tag: test handling of rfc1991 signatures

13 years agoMerge branch 'jh/notes-merge'
Junio C Hamano [Wed, 8 Dec 2010 19:24:12 +0000 (11:24 -0800)]
Merge branch 'jh/notes-merge'

* jh/notes-merge: (23 commits)
  Provide 'git merge --abort' as a synonym to 'git reset --merge'
  cmd_merge(): Parse options before checking MERGE_HEAD
  Provide 'git notes get-ref' to easily retrieve current notes ref
  git notes merge: Add testcases for merging notes trees at different fanouts
  git notes merge: Add another auto-resolving strategy: "cat_sort_uniq"
  git notes merge: --commit should fail if underlying notes ref has moved
  git notes merge: List conflicting notes in notes merge commit message
  git notes merge: Manual conflict resolution, part 2/2
  git notes merge: Manual conflict resolution, part 1/2
  Documentation: Preliminary docs on 'git notes merge'
  git notes merge: Add automatic conflict resolvers (ours, theirs, union)
  git notes merge: Handle real, non-conflicting notes merges
  builtin/notes.c: Refactor creation of notes commits.
  git notes merge: Initial implementation handling trivial merges only
  builtin/notes.c: Split notes ref DWIMmery into a separate function
  notes.c: Use two newlines (instead of one) when concatenating notes
  (trivial) t3303: Indent with tabs instead of spaces for consistency
  notes.h/c: Propagate combine_notes_fn return value to add_note() and beyond
  notes.h/c: Allow combine_notes functions to remove notes
  notes.c: Reorder functions in preparation for next commit
  ...

Conflicts:
builtin.h

13 years agoMerge branch 'jk/diff-CBM'
Junio C Hamano [Wed, 8 Dec 2010 19:24:11 +0000 (11:24 -0800)]
Merge branch 'jk/diff-CBM'

* jk/diff-CBM:
  diff: report bogus input to -C/-M/-B

13 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 8 Dec 2010 00:13:52 +0000 (16:13 -0800)]
Merge branch 'master' into next

* master:
  git-rm.txt: Fix quoting
  Makefile: dependencies for vcs-svn tests
  parse-remote: handle detached HEAD

13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 8 Dec 2010 00:13:43 +0000 (16:13 -0800)]
Merge branch 'maint'

* maint:
  git-rm.txt: Fix quoting

13 years agovcs-svn: fix intermittent repo_tree corruption
Jonathan Nieder [Sun, 5 Dec 2010 09:32:53 +0000 (03:32 -0600)]
vcs-svn: fix intermittent repo_tree corruption

Pointers to directory entries do not remain valid after a call to
dent_insert.

Noticed in the course of importing a small Subversion repository
(~1000 revs); after setting up a dirent for a certain path as a
placeholder, by luck dent_insert would trigger a realloc that
shifted around addresses, resulting in an import with that file
replaced by a directory.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotreap: make treap_insert return inserted node
Jonathan Nieder [Sun, 5 Dec 2010 09:35:17 +0000 (03:35 -0600)]
treap: make treap_insert return inserted node

Suppose I try the following:

struct int_node *node = node_pointer(node_alloc(1));
node->n = 5;
treap_insert(&root, node);
printf("%d\n", node->n);

Usually the result will be 5.  But since treap_insert draws memory
from the node pool, if the caller is unlucky then (1) the node pool
will be full and (2) realloc will be forced to move the node pool to
find room, so the node address becomes invalid and the result of
dereferencing it is undefined.

So we ought to use offsets in preference to pointers for references
that would remain valid after a call to treap_insert.  Tweak the
signature to hint at a certain special case: since the inserted node
can change address (though not offset), as a convenience teach
treap_insert to return its new address.

So the motivational example could be fixed by adding "node =".

struct int_node *node = node_pointer(node_alloc(1));
node->n = 5;
node = treap_insert(&root, node);
printf("%d\n", node->n);

Based on a true story.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoget_sha1: support relative path ":path" syntax
Nguyễn Thái Ngọc Duy [Sun, 28 Nov 2010 03:37:32 +0000 (10:37 +0700)]
get_sha1: support relative path ":path" syntax

Currently :path and ref:path can be used to refer to a specific object
in index or ref respectively. "path" component is absolute path. This
patch allows "path" to be written as "./path" or "../path", which is
relative to user's original cwd.

This does not work in commands for which startup_info is NULL
(i.e. non-builtin ones, it seems none of them needs this anyway).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMake prefix_path() return char* without const
Nguyễn Thái Ngọc Duy [Thu, 11 Nov 2010 14:08:03 +0000 (21:08 +0700)]
Make prefix_path() return char* without const

prefix_path() allocates new buffer. There's no reason for it to keep
the buffer for itself and waste memory.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoupdate-index: migrate to parse-options API
Jonathan Nieder [Wed, 1 Dec 2010 23:34:06 +0000 (17:34 -0600)]
update-index: migrate to parse-options API

--refresh and --really-refresh accept flags (like -q) and modify
an error indicator.  It might make sense to make the error
indicator global, but just pass the flags and a pointer to the error
indicator in a struct instead.

--cacheinfo wants 3 arguments.  Use the OPTION_LOWLEVEL_CALLBACK
extension to grab them and PARSE_OPT_NOARG to disallow the "sticked"
--cacheinfo=foo form.  (The resulting message

$ git update-index --cacheinfo=foo
error: option `cacheinfo' takes no value

is unfortunately incorrect.)

--assume-unchanged and --no-assume-unchanged probably should use the
OPT_UYN feature; but use a callback for now so the existing MARK_FLAG
and UNMARK_FLAG values can be used.

--stdin and --index-info are still constrained to be the last argument
(implemented using the OPTION_LOWLEVEL_CALLBACK extension).

--unresolve and --again consume all arguments that come after them
(also using OPTION_LOWLEVEL_CALLBACK).

The order of options matters.  Each path on the command line is
affected only by the options that come before it.  A custom
argument-parsing loop with parse_options_step() brings that about.

In exchange for all the fuss, we get the usual perks: support for
un-sticked options, better usage error messages, more useful -h
output, and argument parsing code that should be easier to tweak
in the future.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosetup: save prefix (original cwd relative to toplevel) in startup_info
Nguyễn Thái Ngọc Duy [Wed, 1 Dec 2010 23:33:22 +0000 (17:33 -0600)]
setup: save prefix (original cwd relative to toplevel) in startup_info

Save the path from the original cwd to the cwd at the end of the
setup procedure in the startup_info struct introduced in e37c1329
(2010-08-05).  The value cannot vary from thread to thread anyway,
since the cwd is global.

So now in your builtin command, instead of passing prefix around,
when you want to convert a user-supplied path to a cwd-relative
path, you can use startup_info->prefix directly.

Caveat: As with the return value from setup_git_directory_gently(),
startup_info->prefix would be NULL when the original cwd is not a
subdir of the toplevel.

Longer term, this would allow the prefix to be reused when several
noncooperating functions require access to the same repository (for
example, when accessing configuration before running a builtin).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION
Jonathan Nieder [Wed, 1 Dec 2010 23:32:55 +0000 (17:32 -0600)]
parse-options: make resuming easier after PARSE_OPT_STOP_AT_NON_OPTION

Introduce a PARSE_OPT_NON_OPTION state, so parse_option_step()
callers can easily distinguish between non-options and other
reasons for option parsing termination (like "--").

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparse-options: allow git commands to invent new option types
Jonathan Nieder [Wed, 1 Dec 2010 23:32:16 +0000 (17:32 -0600)]
parse-options: allow git commands to invent new option types

parse-options provides a variety of option behaviors, including
OPTION_CALLBACK, which should take care of just about any sane
behavior.  All supported behaviors obey the following constraint:

 A --foo option can only accept (and base its behavior on)
 one argument, which would be the following command-line
 argument in the "unsticked" form.

Alas, some existing git commands have options that do not obey that
constraint.  For example, update-index --cacheinfo takes three
arguments, and update-index --resolve takes all later parameters as
arguments.

Introduces an OPTION_LOWLEVEL_CALLBACK backdoor to parse-options so
such option types can be supported without tempting inventors of other
commands through mention in the public API.  Commands can set the
callback field to a function accepting three arguments: the option
parsing context, the option itself, and a flag indicating whether the
the option was negated.  When the option is encountered, that function
is called to take over from get_value().  The return value should be
zero for success, -1 for usage errors.

Thanks to Stephen Boyd for API guidance.

Improved-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparse-options: never suppress arghelp if LITERAL_ARGHELP is set
Jonathan Nieder [Wed, 1 Dec 2010 23:31:36 +0000 (17:31 -0600)]
parse-options: never suppress arghelp if LITERAL_ARGHELP is set

The PARSE_OPT_LITERAL_ARGHELP flag allows a program to override the
standard "<argument> for mandatory, [argument] for optional" markup in
its help message.  Extend it to override the usual "no text for
disallowed", too (for the PARSE_OPT_NOARG | PARSE_OPT_LITERAL_ARGHELP
case, which was previously meaningless), to be more intuitive.

The motivation is to allow update-index to correctly advertise

--cacheinfo <mode> <object> <path>
                      add the specified entry to the index

while abusing PARSE_OPT_NOARG to disallow the "sticked form"

--cacheinfo=<mode> <object> <path>

Noticed-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoparse-options: do not infer PARSE_OPT_NOARG from option type
Stephen Boyd [Wed, 1 Dec 2010 23:30:40 +0000 (17:30 -0600)]
parse-options: do not infer PARSE_OPT_NOARG from option type

Simplify the "takes no value" error path by relying on PARSE_OPT_NOARG
being set correctly.  That is:

 - if the PARSE_OPT_NOARG flag is set, reject --opt=value
   regardless of the option type;
 - if the PARSE_OPT_NOARG flag is unset, accept --opt=value
   regardless of the option type.

This way, the accepted usage more closely matches the usage advertised
with --help-all.

No functional change intended, since the NOARG flag is only used
with "boolean-only" option types in existing parse_options callers.

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