Code

git.git
13 years agofix >4GiB source delta assertion failure
Nicolas Pitre [Sat, 21 Aug 2010 05:00:13 +0000 (01:00 -0400)]
fix >4GiB source delta assertion failure

When people try insane things such as delta-compressing 4GiB files, they
get this assertion:

diff-delta.c:285: create_delta_index: Assertion `packed_entry - (struct index_entry *)mem == entries' failed.

This happens because:

1) the 'entries' variable is an unsigned int

2) it is assigned with entries = (bufsize - 1) / RABIN_WINDOW
   (that itself is not a problem unless bufsize > 4G * RABIN_WINDOW)

3) the buffer is indexed from top to bottom starting at
   "data = buffer + entries * RABIN_WINDOW" and the multiplication
   here does indeed overflows, making the resulting top of the buffer
   much lower than expected.

This makes the number of actually produced index entries smaller than
what was computed initially, hence the assertion.

Furthermore, the current delta encoding format cannot represent offsets
into a reference buffer with more than 32 bits anyway.  So let's just
limit the number of entries to what the delta format can encode.

Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot7403: add missing &&'s
Jens Lehmann [Wed, 18 Aug 2010 21:20:33 +0000 (23:20 +0200)]
t7403: add missing &&'s

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTell ignore file about generate files in /gitweb/static
Mark Rada [Sat, 21 Aug 2010 16:18:37 +0000 (12:18 -0400)]
Tell ignore file about generate files in /gitweb/static

Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-follow-rename-fix' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)]
Merge branch 'jc/maint-follow-rename-fix' into maint

* jc/maint-follow-rename-fix:
  log: test for regression introduced in v1.7.2-rc0~103^2~2
  diff --follow: do call diffcore_std() as necessary
  diff --follow: do not waste cycles while recursing

13 years agoMerge branch 'jn/maint-plug-leak' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)]
Merge branch 'jn/maint-plug-leak' into maint

* jn/maint-plug-leak:
  write-tree: Avoid leak when index refers to an invalid object
  read-tree: stop leaking tree objects
  core: Stop leaking ondisk_cache_entrys

13 years agoMerge branch 'jn/fix-abbrev' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:09 +0000 (12:53 -0700)]
Merge branch 'jn/fix-abbrev' into maint

* jn/fix-abbrev:
  examples/commit: use --abbrev for commit summary
  checkout, commit: remove confusing assignments to rev.abbrev
  archive: abbreviate substituted commit ids again

13 years agoMerge branch 'vs/doc-spell' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)]
Merge branch 'vs/doc-spell' into maint

* vs/doc-spell:
  Documentation: spelling fixes

13 years agoMerge branch 'jn/rebase-rename-am' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)]
Merge branch 'jn/rebase-rename-am' into maint

* jn/rebase-rename-am:
  rebase: protect against diff.renames configuration
  t3400 (rebase): whitespace cleanup
  Teach "apply --index-info" to handle rename patches
  t4150 (am): futureproof against failing tests
  t4150 (am): style fix

13 years agoMerge branch 'jn/doc-pull' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:08 +0000 (12:53 -0700)]
Merge branch 'jn/doc-pull' into maint

* jn/doc-pull:
  Documentation: flesh out “git pull” description

13 years agoMerge branch 'bc/use-more-hardlinks-in-install' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)]
Merge branch 'bc/use-more-hardlinks-in-install' into maint

* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too

13 years agoMerge branch 'tr/rfc-reset-doc' into maint
Junio C Hamano [Fri, 20 Aug 2010 19:53:07 +0000 (12:53 -0700)]
Merge branch 'tr/rfc-reset-doc' into maint

* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression

13 years agoxmalloc: include size in the failure message
Matthieu Moy [Fri, 20 Aug 2010 15:09:51 +0000 (17:09 +0200)]
xmalloc: include size in the failure message

Out-of-memory errors can either be actual lack of memory, or bugs (like
code trying to call xmalloc(-1) by mistake). A little more information
may help tracking bugs reported by users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.2.2 v1.7.2.2
Junio C Hamano [Thu, 19 Aug 2010 23:03:18 +0000 (16:03 -0700)]
Git 1.7.2.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'tr/xsize-bits' into maint
Junio C Hamano [Thu, 19 Aug 2010 22:49:54 +0000 (15:49 -0700)]
Merge branch 'tr/xsize-bits' into maint

* tr/xsize-bits:
  xsize_t: check whether we lose bits

13 years agoMerge branch 'jc/sha1-name-find-fix' into maint
Junio C Hamano [Thu, 19 Aug 2010 22:49:24 +0000 (15:49 -0700)]
Merge branch 'jc/sha1-name-find-fix' into maint

* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
sha1_name.c

13 years agoMerge branch 'sp/fix-smart-http-deadlock-on-error' into maint
Junio C Hamano [Wed, 18 Aug 2010 23:30:11 +0000 (16:30 -0700)]
Merge branch 'sp/fix-smart-http-deadlock-on-error' into maint

* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure

13 years agolog: test for regression introduced in v1.7.2-rc0~103^2~2
Ævar Arnfjörð Bjarmason [Sun, 15 Aug 2010 10:16:25 +0000 (10:16 +0000)]
log: test for regression introduced in v1.7.2-rc0~103^2~2

Add a regression test for the git log -M --follow $diff_option bug
introduced in v1.7.2-rc0~103^2~2, $diff_option being diff related
options like -p, --stat, --name-only etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff --follow: do call diffcore_std() as necessary
Junio C Hamano [Fri, 13 Aug 2010 19:17:45 +0000 (12:17 -0700)]
diff --follow: do call diffcore_std() as necessary

Usually, diff frontends populate the output queue with filepairs without
any rename information and call diffcore_std() to sort the renames out.
When --follow is in effect, however, diff-tree family of frontend has a
hack that looks like this:

    diff-tree frontend
    -> diff_tree_sha1()
       . populate diff_queued_diff
       . if --follow is in effect and there is only one change that
         creates the target path, then
       -> try_to_follow_renames()
  -> diff_tree_sha1() with no pathspec but with -C
  -> diffcore_std() to find renames
  . if rename is found, tweak diff_queued_diff and put a
    single filepair that records the found rename there
    -> diffcore_std()
       . tweak elements on diff_queued_diff by
       - rename detection
       - path ordering
       - pickaxe filtering

We need to skip parts of the second call to diffcore_std() that is related
to rename detection, and do so only when try_to_follow_renames() did find
a rename.  Earlier 1da6175 (Make diffcore_std only can run once before a
diff_flush, 2010-05-06) tried to deal with this issue incorrectly; it
unconditionally disabled any second call to diffcore_std().

This hopefully fixes the breakage.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff --follow: do not waste cycles while recursing
Junio C Hamano [Fri, 13 Aug 2010 17:36:01 +0000 (10:36 -0700)]
diff --follow: do not waste cycles while recursing

The "--follow" logic is called from diff_tree_sha1() function, but the
input trees to diff_tree_sha1() are not necessarily the top-level trees
(compare_tree_entry() calls it while it recursively descends into
subtrees).  When a newly created path lives in somewhere deep in the
source hierarchy, e.g. "platform/", but the rename source is in a totally
different place in the destination hierarchy, e.g. "lang-api/src/com/...",
running "try_to_find_renames()" while base is set to "platform/" is a
wasted call.

We only need to run the rename following at the very top level.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopush: mention "git pull" in error message for non-fast forwards
Matthieu Moy [Mon, 2 Aug 2010 13:42:44 +0000 (15:42 +0200)]
push: mention "git pull" in error message for non-fast forwards

The message remains fuzzy to include "git pull", "git pull --rebase" and
others, but directs the user to the simplest solution in the vast
majority of cases.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoStandardize do { ... } while (0) style
Jonathan Nieder [Thu, 12 Aug 2010 22:11:15 +0000 (17:11 -0500)]
Standardize do { ... } while (0) style

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t7003: replace \t with literal tab in sed expression
Brandon Casey [Thu, 12 Aug 2010 20:55:54 +0000 (15:55 -0500)]
t/t7003: replace \t with literal tab in sed expression

The sed utilities on IRIX and Solaris do not interpret the sequence '\t'
to mean a tab character;  they read a literal character 't'.  So, use a
literal tab instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoindex-pack: Don't follow replace refs.
Nelson Elhage [Thu, 12 Aug 2010 14:18:12 +0000 (10:18 -0400)]
index-pack: Don't follow replace refs.

Without this, attempting to index a pack containing objects that have been
replaced results in a fatal error that looks like:

fatal: SHA1 COLLISION FOUND WITH <replaced-object> !

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopost-receive-email: remove spurious commas in email subject
Matthieu Moy [Wed, 11 Aug 2010 08:14:13 +0000 (10:14 +0200)]
post-receive-email: remove spurious commas in email subject

The previous form produced subjects like

  [SCM] project.git branch, foo, updated. ...

The new one will produce the lighter

  [SCM] project.git branch foo updated. ...

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofast-import: export correctly marks larger than 2^20-1
Raja R Harinath [Tue, 13 Jul 2010 11:51:48 +0000 (17:21 +0530)]
fast-import: export correctly marks larger than 2^20-1

dump_marks_helper() has a bug when dumping marks larger than 2^20-1,
i.e., when the sparse array has more than two levels.  The bug was
that the 'base' counter was being shifted by 20 bits at level 3, and
then again by 10 bits at level 2, rather than a total shift of 20 bits
in this argument to the recursive call:

  (base + k) << m->shift

There are two ways to fix this correctly, the elegant:

  (base + k) << 10

and the one I chose due to edit distance:

  base + (k << m->shift)

Signed-off-by: Raja R Harinath <harinath@hurrynot.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
Ævar Arnfjörð Bjarmason [Tue, 10 Aug 2010 12:14:25 +0000 (12:14 +0000)]
t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH

Change the git-svn tests to use $PERL_PATH, not the "perl" in $PATH.

Using perl in $PATH was added by Sam Vilain in v1.6.6-rc0~95^2~3,
Philippe Bruhat introduced $PERL_PATH to the test suite in
v1.6.6-rc0~9^2, but the lib-git-svn.sh tests weren't updated to use
the new convention.

This resulted in the git-svn tests always being skipped on my
system. My /usr/bin/perl has access to SVN::Core and SVN::Repos, but
the perl in my $PATH does not.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agowrite-tree: Avoid leak when index refers to an invalid object
Jonathan Nieder [Tue, 10 Aug 2010 03:32:11 +0000 (22:32 -0500)]
write-tree: Avoid leak when index refers to an invalid object

Noticed by valgrind during test t0000.35 “writing this tree without
--missing-ok”.

Even in the cherry-pick foo..bar code path, such an error is the
end of the line.  But maybe some day an interactive porcelain will
want to link to libgit, making this matter.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoread-tree: stop leaking tree objects
Jonathan Nieder [Tue, 10 Aug 2010 03:33:44 +0000 (22:33 -0500)]
read-tree: stop leaking tree objects

The underlying problem is that the fill_tree_descriptor()
API is easy to misuse, and this patch does not fix that.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocore: Stop leaking ondisk_cache_entrys
Jonathan Nieder [Tue, 10 Aug 2010 03:28:07 +0000 (22:28 -0500)]
core: Stop leaking ondisk_cache_entrys

Noticed with valgrind.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff: strip extra "/" when stripping prefix
Jakub Narebski [Mon, 9 Aug 2010 14:50:53 +0000 (10:50 -0400)]
diff: strip extra "/" when stripping prefix

There are two ways a user might want to use "diff --relative":

  1. For a file in a directory, like "subdir/file", the user
     can use "--relative=subdir/" to strip the directory.

  2. To strip part of a filename, like "foo-10", they can
     use "--relative=foo-".

We currently handle both of those situations. However, if the user passes
"--relative=subdir" (without the trailing slash), we produce inconsistent
results. For the unified diff format, we collapse the double-slash of
"a//file" correctly into "a/file". But for other formats (raw, stat,
name-status), we end up with "/file".

We can do what the user means here and strip the extra "/" (and only a
slash).  We are not hurting any existing users of (2) above with this
behavior change because the existing output for this case was nonsensical.

Patch by Jakub, tests and commit message by Jeff King.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: clarify search results page when no matching commit found
Jonathan Nieder [Sat, 7 Aug 2010 21:56:47 +0000 (16:56 -0500)]
gitweb: clarify search results page when no matching commit found

When searching commits for a string that never occurs, the results
page looks something like this:

projects / foo.git / search                                 \o/
summary | ... | tree          [commit] search: [ kfjdkas ] [ ]re
first ⋅ prev ⋅ next

Merge branch 'maint'

Foo: a demonstration project

Without a list of hits to compare it to, the header describing the
commit named by the hash parameter (usually HEAD) may itself look
like a hit.  Add some text (“No match.”) to replace the empty
list of hits and avoid this confusion.

While at it, remove some nearby dead code, left behind from a
simplification a few years ago (v1.5.4-rc0~276^2~4, 2007-11-01).

Noticed-by: Erick Mattos <erick.mattos@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: add a FILES section for show-ref
Jonathan Nieder [Mon, 9 Aug 2010 01:32:43 +0000 (20:32 -0500)]
Documentation: add a FILES section for show-ref

A peek at where the refs are kept might help understanding, even if,
as the DESCRIPTION section suggests, direct access is not part of the
public API.

Balance that out with a pointer to update-ref.

Suggested-by: Geoff Russell <geoffrey.russell@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: add missing dependency on http.h
Jonathan Nieder [Sun, 8 Aug 2010 21:48:59 +0000 (16:48 -0500)]
Makefile: add missing dependency on http.h

v1.7.1-rc0~65^2~2 (http: init and cleanup separately from
http-walker, 2010-03-02) introduced a direct dependency from
http-fetch on the HTTP request library.  Declare it.

Detected with "make CHECK_HEADER_DEPENDENCIES=1".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: add missing dependencies on url.h
Jonathan Nieder [Sun, 8 Aug 2010 21:25:11 +0000 (16:25 -0500)]
Makefile: add missing dependencies on url.h

v1.7.2-rc0~56^2 and its parent (decode file:// and ssh://
URLs, 2010-05-23) introduced a new url library.  Update the
Makefile with the relevant dependencies.

Detected with "make CHECK_HEADER_DEPENDENCIES=1".

Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-log: Clarify --full-diff
Michael J Gruber [Sun, 8 Aug 2010 15:31:34 +0000 (17:31 +0200)]
Documentation/git-log: Clarify --full-diff

The current description gives the impression that "--full-diff" affects
"log -p" only.

Make it clearer that it affects all diff-based output types.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-rebase: fix typo when parsing --force-rebase
Willy Tarreau [Sun, 8 Aug 2010 05:13:32 +0000 (07:13 +0200)]
git-rebase: fix typo when parsing --force-rebase

Due to two missing hyphens, The "force" keyword on the command line
would be taken as an alias for the --force-rebase option.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoimap-send: Fix sprintf usage
Ævar Arnfjörð Bjarmason [Sat, 7 Aug 2010 23:09:45 +0000 (18:09 -0500)]
imap-send: Fix sprintf usage

When composing a command for the imap server, imap-send uses a single
nfsnprintf() invocation for brevity instead of dealing separately with
the case when there is a message to be sent and the case when there
isn’t.  The unused argument in the second case, while valid, is
confusing for static analyzers and human readers.

v1.6.4-rc0~117 (imap-send: add support for IPv6, 2009-05-25)
mistakenly used %hu as the format for an int “port”, by analogy with
existing usage for the unsigned short “addr.sin_port”.  Use %d
instead.

Noticed with clang.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoprune: allow --dry-run for -n and --verbose for -v
René Scharfe [Fri, 6 Aug 2010 20:28:05 +0000 (22:28 +0200)]
prune: allow --dry-run for -n and --verbose for -v

For consistency with other git commands, let git prune accept the long
options --dry-run and --verbose for the respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agonotes: allow --dry-run for -n and --verbose for -v
René Scharfe [Fri, 6 Aug 2010 20:28:09 +0000 (22:28 +0200)]
notes: allow --dry-run for -n and --verbose for -v

For consistency with other git commands, let the prune subcommand of
git notes accept the long options --dry-run and --verbose for the
respective short ones -n and -v.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocument -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C
Matthieu Moy [Thu, 5 Aug 2010 16:14:25 +0000 (18:14 +0200)]
Document -B<n>[/<m>], -M<n> and -C<n> variants of -B, -M and -C

These options take an optional argument, but this optional argument was
not documented.

Original patch by Matthieu Moy, but documentation for -B mostly copied
from the explanations of Junio C Hamano.

While we're there, fix a typo in a comment in diffcore.h.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: cite git-am from git-apply
Brad King [Tue, 3 Aug 2010 18:41:50 +0000 (14:41 -0400)]
Documentation: cite git-am from git-apply

Users reading git-apply documentation may also be interested in git-am,
especially after receiving an email created with git-format-patch.  The
documentation for git-am already references git-apply.  Add the reverse.

Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot7003: fix subdirectory-filter test
Thomas Rast [Thu, 29 Jul 2010 15:10:22 +0000 (17:10 +0200)]
t7003: fix subdirectory-filter test

The test would not fail if the filtering failed to do anything, since
in

  test -z "$(git diff HEAD directorymoved:newsubdir)"'

'directorymoved:newsubdir' is not valid, so git-diff fails without
printing anything on stdout.  But then the exit status of git-diff is
lost, whereas test -z "" succeeds.

Use 'git diff --exit-code' instead, which does the right thing and has
the added bonus of showing the differences if there are any.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosmart-http: Don't deadlock on server failure
Shawn O. Pearce [Fri, 6 Aug 2010 21:19:44 +0000 (14:19 -0700)]
smart-http: Don't deadlock on server failure

If the remote HTTP server fails (e.g. returns 404 or 500) when we
posted the RPC to it, we won't have sent anything to the background
Git process that is supposed to handle the stream.  Because we
didn't send anything, its waiting for input from remote-curl, and
remote-curl cannot read its response payload because doing so would
lead to a deadlock.

Send the background task EOF on its input before we try to read
its response back, that way it will break out of its read loop
and terminate.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAllow "check-ref-format --branch" from subdirectory
Jonathan Nieder [Fri, 6 Aug 2010 03:39:22 +0000 (22:39 -0500)]
Allow "check-ref-format --branch" from subdirectory

check-ref-format --branch requires access to the repository
to resolve refs like @{-1}.

Noticed by Nguyễn Thái Ngọc Duy.

Cc: 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 agocheck-ref-format: handle subcommands in separate functions
Jonathan Nieder [Fri, 6 Aug 2010 03:36:07 +0000 (22:36 -0500)]
check-ref-format: handle subcommands in separate functions

The code for each subcommand should be easier to read and manipulate
this way.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopretty-options.txt: match --format's documentation with implementation.
Matthieu Moy [Thu, 5 Aug 2010 13:08:05 +0000 (15:08 +0200)]
pretty-options.txt: match --format's documentation with implementation.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'sv/maint-diff-q-clear-fix' into maint
Junio C Hamano [Tue, 3 Aug 2010 22:17:34 +0000 (15:17 -0700)]
Merge branch 'sv/maint-diff-q-clear-fix' into maint

* sv/maint-diff-q-clear-fix:
  Fix DIFF_QUEUE_CLEAR refactoring

13 years agoMerge branch 'rr/svn-fe' into maint
Junio C Hamano [Tue, 3 Aug 2010 22:17:11 +0000 (15:17 -0700)]
Merge branch 'rr/svn-fe' into maint

* rr/svn-fe:
  contrib/svn-fe: Add the svn-fe target to .gitignore
  contrib/svn-fe: Fix IncludePath

13 years agoMerge branch 'pt/git-gui' into maint
Junio C Hamano [Tue, 3 Aug 2010 22:16:38 +0000 (15:16 -0700)]
Merge branch 'pt/git-gui' into maint

* pt/git-gui:
  git-gui: fix size and position of window panes on startup
  git-gui: mc cannot be used before msgcat has been loaded
  git-gui: use textconv filter for diff and blame
  git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
  git-gui: fix shortcut creation on cygwin
  git-gui: fix PATH environment for mingw development environment
  git-gui: fix usage of _gitworktree when creating shortcut for windows
  git-gui: fix "Explore Working Copy" for Windows again
  git-gui: fix usage of themed widgets variable
  git-gui: Handle failure of core.worktree to identify the working directory.
  git-gui: check whether systems nice command works or disable it

13 years agocontrib/svn-fe: Add the svn-fe target to .gitignore
Ramkumar Ramachandra [Thu, 29 Jul 2010 05:36:20 +0000 (11:06 +0530)]
contrib/svn-fe: Add the svn-fe target to .gitignore

Add the svn-fe target to .gitignroe.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocontrib/svn-fe: Fix IncludePath
Ramkumar Ramachandra [Thu, 29 Jul 2010 05:36:19 +0000 (11:06 +0530)]
contrib/svn-fe: Fix IncludePath

Include the path "../../vcs-svn" while compiling it in the Makefile
and change svn-fe.c to include svndump.h.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: flesh out “git pull” description
Jonathan Nieder [Mon, 2 Aug 2010 21:39:30 +0000 (16:39 -0500)]
Documentation: flesh out “git pull” description

The current description in the pull man page does not say much more
than that “git pull” is fetch + merge.  Though that is all a person
needs to know in the end, it would be useful to summarize a bit about
what those commands do for new readers.

Most of this description is taken from the “git merge” docs.

Now that we explain how to back out of a failed merge (reset --merge),
we can tone down the warning against that a bit.

Except, as Thomas noticed, there’s a risk with that because people
might read this version of the manpage online and then conclude that
it is safe to try a merge with uncommitted changes, only to find that
their “git reset” doesn't support --merge yet.  Or worse, verify that
their git-reset has --merge by a quick test (1b5b465 is in 1.6.2) but
then find that it does not help with backing out of a merge (e11d7b5
is only in 1.7.0!).  So keep the warning.

With clarifications from Ævar, Thomas, and Junio.

Noticed-by: Geoff Russell <geoffrey.russell@gmail.com>
Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Cc: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosha1_name.c: fix parsing of ":/token" syntax
Junio C Hamano [Mon, 2 Aug 2010 21:37:06 +0000 (14:37 -0700)]
sha1_name.c: fix parsing of ":/token" syntax

The parser tried to clean up the object flags it used while finding
commits with matching string, but was not doing a very good job at it.

This caused "checkout -b new ':/token'", which internally tries to parse
':/token' twice as an object name, to fail when the commit in question
was reachable from only one ref.

The mask bits given to pop_most_recent_commit(&list, MASK) means "I have
already been on the list to be processed, so please do not place me again
even if I am found to be a parent of some other commit on the list."  So
mark them when we add them to the list at the beginning.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'ab/tap' into maint
Junio C Hamano [Mon, 2 Aug 2010 18:53:58 +0000 (11:53 -0700)]
Merge branch 'ab/tap' into maint

* ab/tap:
  test-lib: Remove 3 year old no-op --no-python option
  test-lib: Ignore --quiet under a TAP harness

13 years agotest-lib: Remove 3 year old no-op --no-python option
Ævar Arnfjörð Bjarmason [Sat, 31 Jul 2010 16:49:53 +0000 (16:49 +0000)]
test-lib: Remove 3 year old no-op --no-python option

The --no-python option was added to test-lib.sh by Johannes Schindelin
in early 2006 in abb7c7b3. It was later turned into a no-op by Junio C
Hamano in 7cdbff14 the same year.

Over three years is long enough before removing this old wart which
was retained for backwards compatibility. Our tests have been using
NO_PYTHON and "test_have_prereq PYTHON" for a long time now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotest-lib: Ignore --quiet under a TAP harness
Ævar Arnfjörð Bjarmason [Sat, 31 Jul 2010 16:40:05 +0000 (16:40 +0000)]
test-lib: Ignore --quiet under a TAP harness

Running the tests with --quiet under a TAP harness will always fail,
since a TAP harness always needs actual test output to go along with
the plan that's being emitted.

Change the test-lib.sh to ignore the --quiet option under
HARNESS_ACTIVE to work around this. Then users that have --quiet in
their GIT_TEST_OPTS can run tests under prove(1) without everything
breaking.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge git://repo.or.cz/git-gui into pt/git-gui
Junio C Hamano [Mon, 2 Aug 2010 16:28:30 +0000 (09:28 -0700)]
Merge git://repo.or.cz/git-gui into pt/git-gui

* git://repo.or.cz/git-gui:
  git-gui: fix size and position of window panes on startup
  git-gui: mc cannot be used before msgcat has been loaded
  git-gui: use textconv filter for diff and blame
  git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
  git-gui: fix shortcut creation on cygwin
  git-gui: fix PATH environment for mingw development environment
  git-gui: fix usage of _gitworktree when creating shortcut for windows
  git-gui: fix "Explore Working Copy" for Windows again
  git-gui: fix usage of themed widgets variable
  git-gui: Handle failure of core.worktree to identify the working directory.
  git-gui: check whether systems nice command works or disable it

13 years agoDocumentation/rev-parse: quoting is required with --parseopt
Thomas Rast [Fri, 30 Jul 2010 15:01:50 +0000 (17:01 +0200)]
Documentation/rev-parse: quoting is required with --parseopt

When calling rev-parse --parseopt, as in the (now fixed) documented
example

  eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"

the outermost quoting is required, as otherwise all runs of arbitrary
whitespace inside the resulting 'set -- ...' call would be collapsed
into a single space.

This was exposed as a result of our new use of cat <<\EOF since
47e9cd2 (parseopt: wrap rev-parse --parseopt usage for eval
consumption, 2010-06-12), but has always been a problem when handling
arguments containing e.g. newlines.

Point this out in the documentation, and in particular correct the
example that did not have the quotes.

Noticed-by: Joshua Jensen <jjensen@workspacewhiz.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: reporting bugs
Junio C Hamano [Mon, 2 Aug 2010 16:07:39 +0000 (09:07 -0700)]
Documentation: reporting bugs

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix DIFF_QUEUE_CLEAR refactoring
Junio C Hamano [Mon, 2 Aug 2010 15:29:42 +0000 (08:29 -0700)]
Fix DIFF_QUEUE_CLEAR refactoring

It introduced a macro to reduce repeated assignments to three fields,
but an unrelated and incorrect change snuck in by mistake, which broke
commands like "git diff-files -p --submodule".

Noticed by Sven Verdoolaege.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-gui: fix size and position of window panes on startup
Pat Thoyts [Mon, 2 Aug 2010 12:42:45 +0000 (13:42 +0100)]
git-gui: fix size and position of window panes on startup

The themed panedwindow needs to have the sash position set after the
widget has been mapped therefore apply this setting in the Map event
binding. To avoid visible redraws as the application is constructed
the main window should be withdrawn until all the widgets have been added

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: mc cannot be used before msgcat has been loaded
Pat Thoyts [Mon, 2 Aug 2010 11:13:05 +0000 (12:13 +0100)]
git-gui: mc cannot be used before msgcat has been loaded

If someone attempts to use an older version that Tk 8.4 the error was
masked by the lack of a mc command.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: use textconv filter for diff and blame
Clément Poulain [Fri, 30 Jul 2010 08:11:02 +0000 (09:11 +0100)]
git-gui: use textconv filter for diff and blame

Create a checkbox "Use Textconv For Diffs and Blame" in git-gui options.
If checked and if the driver for the concerned file exists, git-gui calls diff
and blame with --textconv option

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
Pat Thoyts [Mon, 8 Mar 2010 12:43:27 +0000 (12:43 +0000)]
git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32

On Windows the Control-C binding is used to copy and is mapped to the Tk
virtual event <<Copy>>. In the initial git-gui dialog this is also bound
as an accelerator for the Clone menu item. The effect is that both bindings
run, copying the text but resetting the clone page or switching to the clone
page when the user tries to copy text from one of the entry fields.
This patch avoids this by using Control-L instead for Windows only.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix shortcut creation on cygwin
Heiko Voigt [Sat, 27 Feb 2010 20:48:48 +0000 (21:48 +0100)]
git-gui: fix shortcut creation on cygwin

When the user tried to create a desktop icon with git gui on cygwin
wscript was complaining about an unknown option and displaying the
non-native path as such.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix PATH environment for mingw development environment
Heiko Voigt [Sat, 27 Feb 2010 20:47:42 +0000 (21:47 +0100)]
git-gui: fix PATH environment for mingw development environment

When creating a desktop shortcut from the gui the shortcut directly
starts wish with the git-gui script. In the msysgit development
environment some dll's reside in the mingw/bin directory which causes
that git can not start because libiconv2.dll is not found.

When using such a link the error is even more cryptic stating:
"child killed: unknown signal"

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix usage of _gitworktree when creating shortcut for windows
Heiko Voigt [Sat, 27 Feb 2010 20:45:51 +0000 (21:45 +0100)]
git-gui: fix usage of _gitworktree when creating shortcut for windows

This fixes msysGit issue 425.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix "Explore Working Copy" for Windows again
Markus Heidelberg [Thu, 25 Feb 2010 00:14:22 +0000 (01:14 +0100)]
git-gui: fix "Explore Working Copy" for Windows again

It has already been fixed in commit 454efb47 (git-gui (Win): make
"Explore Working Copy" more robust, 2009-04-01), but has been broken in
commit 21985a11 (git-gui: handle non-standard worktree locations,
2010-01-23) by accidentally replacing too much with a new variable.

The problem can be reproduced when starting git-gui from within a
subdirectory. The solution is to convert the path name, explorer.exe is
invoked with, to a platform native name.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoxsize_t: check whether we lose bits
Thomas Rast [Wed, 28 Jul 2010 16:36:31 +0000 (18:36 +0200)]
xsize_t: check whether we lose bits

Attempting to mmap (via git-add or similar) a file larger than 4GB on
32-bit Linux systems results in a repository that has only the file
modulo 4GB stored, because of truncation of the off_t file size to a
size_t for mmap.

When xsize_t was introduced to handle this truncation in dc49cd7 (Cast
64 bit off_t to 32 bit size_t, 2007-03-06), Shawn even pointed out
that it should detect when such a cutoff happens.

Make it so.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix git rebase --continue to work with touched files
David D. Kilzer [Wed, 28 Jul 2010 08:20:16 +0000 (01:20 -0700)]
Fix git rebase --continue to work with touched files

When performing a non-interactive rebase, sometimes
"git rebase --continue" will fail if an unmodified file is
touched in the working directory:

    You must edit all merge conflicts and then
    mark them as resolved using git add

This is caused by "git diff-files" reporting a difference
between the index and the filesystem:

    :100644 100644 d00491...... 000000...... M file

The fix is to run "git update-index --refresh" before
"git diff-files" as is done in git-rebase--interactive.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocument ls-files -t as semi-obsolete.
Matthieu Moy [Wed, 28 Jul 2010 07:24:27 +0000 (09:24 +0200)]
Document ls-files -t as semi-obsolete.

The behavior of "git ls-files -t" is very misleading (see
http://thread.gmane.org/gmane.comp.version-control.git/126516 and
http://thread.gmane.org/gmane.comp.version-control.git/144394/focus=144397
for examples of mislead users) and badly documented, hence we point the
users to superior alternatives.

The feature is marked as "semi-obsolete" but not "scheduled for removal"
since it's a plumbing command, scripts might use it, and Git testsuite
already uses it to test the state of the index.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.2.1 v1.7.2.1
Junio C Hamano [Tue, 27 Jul 2010 23:42:47 +0000 (16:42 -0700)]
Git 1.7.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.1.2
Junio C Hamano [Tue, 27 Jul 2010 23:40:15 +0000 (16:40 -0700)]
Sync with 1.7.1.2

13 years agoGit 1.7.1.2 v1.7.1.2
Junio C Hamano [Tue, 27 Jul 2010 22:04:49 +0000 (15:04 -0700)]
Git 1.7.1.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.0 series
Junio C Hamano [Tue, 27 Jul 2010 22:01:36 +0000 (15:01 -0700)]
Sync with 1.7.0 series

13 years agoGit 1.7.0.7 v1.7.0.7
Junio C Hamano [Tue, 27 Jul 2010 21:07:41 +0000 (14:07 -0700)]
Git 1.7.0.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoexamples/commit: use --abbrev for commit summary
Jonathan Nieder [Tue, 27 Jul 2010 18:44:51 +0000 (13:44 -0500)]
examples/commit: use --abbrev for commit summary

After v1.7.1.1~17^2~3 (pretty: Respect --abbrev option, 2010-05-03),
plumbing users do not abbreviate %h hashes by default any more.

Noticed while investigating the bug fixed by v1.7.1.1~17^2
(commit::print_summary(): don't use format_commit_message(),
2010-06-12).

Cc: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocheckout, commit: remove confusing assignments to rev.abbrev
Jonathan Nieder [Tue, 27 Jul 2010 18:37:07 +0000 (13:37 -0500)]
checkout, commit: remove confusing assignments to rev.abbrev

Since they do not precede setup_revisions, these assignments of 0 to
rev.abbrev have no effect.

v1.7.1.1~17^2~3 (2010-05-03) taught the log --format=%h machinery
to respect --abbrev instead of always abbreviating, so we have to pay
attention to the abbrev setting now.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoarchive: abbreviate substituted commit ids again
Jonathan Nieder [Tue, 27 Jul 2010 18:32:36 +0000 (13:32 -0500)]
archive: abbreviate substituted commit ids again

Given a file with:

  (define archive-id "$Format:%ct|%h|a$")

and an export-subst attribute, the "%h" results in an full 40-digit
object name instead of the expected 7-digit one.

The export-subst feature requests unabbreviated object names because
that is the low-level default.  The effect was not observable until
v1.7.1.1~17^2~3 (2010-05-03), which taught log --format=%h to respect
the --abbrev option.

Reported-by: Eli Barzilay <eli@barzilay.org>
Tested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoconfig --get --path: check for unset $HOME
Jonathan Nieder [Mon, 26 Jul 2010 15:06:51 +0000 (10:06 -0500)]
config --get --path: check for unset $HOME

If $HOME is unset (as in some automated build situations),
currently

git config --path path.home "~"
git config --path --get path.home

segfaults.  Error out with

Failed to expand user dir in: '~/'

instead.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocommit: remove full stop from usage help for -u
Stephen Boyd [Tue, 27 Jul 2010 05:40:32 +0000 (22:40 -0700)]
commit: remove full stop from usage help for -u

From api-parse-options.txt:

  `description` is a short string to describe the effect of the option.
  It shall begin with a lower-case letter and a full stop (`.`) shall be
  omitted at the end.

It also makes it less confusing if the argument is 'no.' or 'no'.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoClarify help message when no remote is specified in fetch/pull.
Matthieu Moy [Mon, 26 Jul 2010 16:32:09 +0000 (18:32 +0200)]
Clarify help message when no remote is specified in fetch/pull.

The message is especially confusing when "git fetch" is ran from "git
pull", for users not aware of "git fetch". The new message makes it clear
that "fetch" means "fetch new revisions", and gives hint on the solution.

We don't add a advice.* configuration option since this message doesn't
appear in normal use, and shouldn't disturb advanced users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: add check-docs exception for gitrevisions
Thomas Rast [Mon, 26 Jul 2010 08:40:58 +0000 (10:40 +0200)]
Makefile: add check-docs exception for gitrevisions

The manpage was added in 1ed6f2c (Documentation: gitrevisions,
2010-07-05), but since it does not have a corresponding git command,
it needs an exception for check-docs.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix 'git' wrapper usage string
Thomas Rast [Mon, 26 Jul 2010 08:36:24 +0000 (10:36 +0200)]
Fix 'git' wrapper usage string

8b1fa77 (Allow passing of configuration parameters in the command
line, 2010-03-26) forgot the closing ']' for the -c option.

While we're there, also rewrap.  Instead of folding the last two lines
together, try to highlight that COMMAND is required by starting a line
with it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-push: Explain status output in more detail
Thomas Rast [Sat, 24 Jul 2010 16:03:15 +0000 (18:03 +0200)]
Documentation/git-push: Explain status output in more detail

Mention the effects of the receive.deny* family of options for the
"remote rejected" case.  While there, also split up the explanation
into an easier-to-parse list format.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocument receive.denyDeleteCurrent
Thomas Rast [Sat, 24 Jul 2010 16:07:53 +0000 (18:07 +0200)]
Document receive.denyDeleteCurrent

This option was introduced by 747ca24 (receive-pack:
receive.denyDeleteCurrent, 2009-02-08) but never documented.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoCast execl*() NULL sentinels to (char *)
Thomas Rast [Sat, 24 Jul 2010 15:20:23 +0000 (17:20 +0200)]
Cast execl*() NULL sentinels to (char *)

The NULL sentinel argument to the execl*() family of calls must be
cast to (char *), as otherwise:

- platforms where NULL is just 0 (not (void *)) would pass an int

- (admittedly esoteric) platforms where NULL is (void *)0 and (void *)
  and (char *) have different memory layouts would pass the wrong kind
  of pointer

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-read-tree.txt: acknowledge the directory matching bug in sparse checkout
Nguyễn Thái Ngọc Duy [Sun, 25 Jul 2010 09:30:32 +0000 (16:30 +0700)]
git-read-tree.txt: acknowledge the directory matching bug in sparse checkout

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoINSTALL: configure /etc/xml/catalog to build docs on Cygwin
Jon Seymour [Sun, 25 Jul 2010 03:57:35 +0000 (13:57 +1000)]
INSTALL: configure /etc/xml/catalog to build docs on Cygwin

Without additional configuration steps, the documentation build on Cygwin
fails because the XML catalog is missing required rewrites for certain
docbook resources.

This patch documents the required configuration.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3700-add: fix dependence on stdout and stderr buffering
Johannes Sixt [Thu, 22 Jul 2010 08:13:33 +0000 (10:13 +0200)]
t3700-add: fix dependence on stdout and stderr buffering

One test case checked the stdout and stderr of 'git add' by constructing a
single 'expect' file that contained both streams. But when the command
runs, the order of stdout and stderr output is unpredictable because it
depends on how the streams are buffered. At least on Windows, the buffering
is different from what the test case expected. Hence, check the two output
texts separately.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-rebase--interactive.sh: use printf instead of echo to print commit message
Brandon Casey [Thu, 22 Jul 2010 19:15:11 +0000 (14:15 -0500)]
git-rebase--interactive.sh: use printf instead of echo to print commit message

On systems with an echo which defaults to the XSI-conformant behavior
(Solaris, or others using Ksh), echo will interpret certain backslashed
characters as control sequences.  This can cause a problem for interactive
rebase when it is used to rebase commits whose commit "subject" (the first
line) contains any of these backslashed sequences.  In this case, echo will
substitute the control sequence for the backslashed characters and either
the rebased commit message will differ from the original, or the rebase
process will fail.  Neither is desirable.

So work around this issue by replacing the echo statements used to print
out portions of the commit message, with printf.

Also, add a test to test for this breakage.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd a google-chrome option for web--browse
Nathan W. Panike [Thu, 22 Jul 2010 16:58:20 +0000 (11:58 -0500)]
Add a google-chrome option for web--browse

On some systems, the chrome browser is named google-chrome.  We add
support for this case.

Signed-off-by: Nathan W. Panike <nathan.panike@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint-1.7.1' into maint
Junio C Hamano [Mon, 26 Jul 2010 06:13:41 +0000 (23:13 -0700)]
Merge branch 'maint-1.7.1' into maint

* maint-1.7.1:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it

13 years agoMakefile: make hard/symbolic links for non-builtins too
Brandon Casey [Fri, 23 Jul 2010 17:50:45 +0000 (12:50 -0500)]
Makefile: make hard/symbolic links for non-builtins too

To conserve space/improve file caching we try to make hard or symbolic links
from each builtin program to the main git executable rather than having
each be a complete duplicate copy of it.  We weren't doing this for the
non-builtin programs though.  So, just because we can, and because it's
easy, and for completeness sake, let's do it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: link builtins residing in bin directory to main git binary too
Brandon Casey [Fri, 23 Jul 2010 17:50:44 +0000 (12:50 -0500)]
Makefile: link builtins residing in bin directory to main git binary too

To conserve space/improve file caching we try to make hard or symbolic links
from each builtin program to the main git executable rather than having
each be a complete duplicate copy of it.  We weren't doing this for the
builtin programs residing in the bin directory though.  So, let's do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint-1.7.0' into maint-1.7.1
Junio C Hamano [Mon, 26 Jul 2010 04:53:27 +0000 (21:53 -0700)]
Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it

13 years agoMerge branch 'maint-1.6.6' into maint-1.7.0
Junio C Hamano [Mon, 26 Jul 2010 04:52:48 +0000 (21:52 -0700)]
Merge branch 'maint-1.6.6' into maint-1.7.0

* maint-1.6.6:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

13 years agoMerge branch 'maint-1.6.5' into maint-1.6.6
Junio C Hamano [Mon, 26 Jul 2010 04:52:29 +0000 (21:52 -0700)]
Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

13 years agorequest-pull.txt: Document -p option
Stephen Boyd [Fri, 23 Jul 2010 16:31:27 +0000 (09:31 -0700)]
request-pull.txt: Document -p option

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint-1.6.4' into maint-1.6.5
Junio C Hamano [Mon, 26 Jul 2010 04:51:58 +0000 (21:51 -0700)]
Merge branch 'maint-1.6.4' into maint-1.6.5

* maint-1.6.4:
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option