gitweb.git
Merge branch 'bc/mailsplit-cr-at-eol'Junio C Hamano Sat, 22 Aug 2009 01:47:44 +0000 (18:47 -0700)

Merge branch 'bc/mailsplit-cr-at-eol'

* bc/mailsplit-cr-at-eol:
Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used
builtin-mailinfo,builtin-mailsplit: use strbufs
strbuf: add new function strbuf_getwholeline()

graph API: fix bug in graph_is_interesting()Adam Simpkins Wed, 19 Aug 2009 02:34:33 +0000 (19:34 -0700)

graph API: fix bug in graph_is_interesting()

Previously, graph_is_interesting() did not behave quite the same way as
the code in get_revision(). As a result, it would sometimes think
commits were uninteresting, even though get_revision() would return
them. This resulted in incorrect lines in the graph output.

This change creates a get_commit_action() function, which
graph_is_interesting() and simplify_commit() both now use to determine
if a commit will be shown. It is identical to the old simplify_commit()
behavior, except that it never calls rewrite_parents().

This problem was reported by Santi Béjar. The following command
would exhibit the problem before, but now works correctly:

git log --graph --simplify-by-decoration --oneline v1.6.3.3

Previously git graph did not display the output for this command
correctly between f29ac4f and 66996ec, among other places.

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

Merge branch 'jc/maint-merge-recursive-fix' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:24 +0000 (11:34 -0700)

Merge branch 'jc/maint-merge-recursive-fix' into maint

* jc/maint-merge-recursive-fix:
merge-recursive: don't segfault while handling rename clashes

Merge branch 'zf/maint-gitweb-acname' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:17 +0000 (11:34 -0700)

Merge branch 'zf/maint-gitweb-acname' into maint

* zf/maint-gitweb-acname:
gitweb: parse_commit_text encoding fix

Merge branch 'np/maint-limit-delta-cache' into maintJunio C Hamano Fri, 21 Aug 2009 18:34:02 +0000 (11:34 -0700)

Merge branch 'np/maint-limit-delta-cache' into maint

* np/maint-limit-delta-cache:
don't let the delta cache grow unbounded in 'git repack'

Merge branch 'jk/maint-show-tag' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:54 +0000 (11:33 -0700)

Merge branch 'jk/maint-show-tag' into maint

* jk/maint-show-tag:
show: add space between multiple items
show: suppress extra newline when showing annotated tag

Merge branch 'sb/maint-pull-rebase' into maintJunio C Hamano Fri, 21 Aug 2009 18:33:08 +0000 (11:33 -0700)

Merge branch 'sb/maint-pull-rebase' into maint

* sb/maint-pull-rebase:
pull: support rebased upstream + fetch + pull --rebase
t5520-pull: Test for rebased upstream + fetch + pull --rebase

Make test number t7406- uniqueJohannes Sixt Fri, 21 Aug 2009 08:32:25 +0000 (10:32 +0200)

Make test number t7406- unique

We skip t7407 because a patch series is cooking that uses is.

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

git clone: Add --recursive to automatically checkout... Johan Herland Wed, 19 Aug 2009 23:07:43 +0000 (01:07 +0200)

git clone: Add --recursive to automatically checkout (nested) submodules

Many projects using submodules expect all submodules to be checked out
in order to build/work correctly. A common command sequence for
developers on such projects is:

git clone url/to/project
cd project
git submodule update --init (--recursive)

This patch introduces the --recursive option to git-clone. The new
option causes git-clone to recursively clone and checkout all
submodules of the cloned project. Hence, the above command sequence
can be reduced to:

git clone --recursive url/to/project

--recursive is ignored if no checkout is done by the git-clone.

The patch also includes documentation and a selftest.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7407: Use 'rev-parse --short' rather than bash's subst... Johan Herland Thu, 20 Aug 2009 09:24:54 +0000 (11:24 +0200)

t7407: Use 'rev-parse --short' rather than bash's substring expansion notation

The substring expansion notation is a bashism that we have not so far
adopted. Use 'git rev-parse --short' instead, as this also handles
the case where the unique abbreviation is longer than 7 characters.

Also fix the typo; the object name for submodule #2 was copied from
submodule #1's by mistake.

Suggested-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-compat-util.h: remove superfluous test for __sun__Brandon Casey Thu, 20 Aug 2009 01:27:08 +0000 (20:27 -0500)

git-compat-util.h: remove superfluous test for __sun__

This 'ifndef' macro is entered only when __sun__ is not defined. This test
will never fail since it is located inside of the 'else' branch of an 'if'
macro which tests whether __sun__ is defined. It has had no effect since
the merge at 436f66b7.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rc/maint-http-fix'Junio C Hamano Wed, 19 Aug 2009 06:33:16 +0000 (23:33 -0700)

Merge branch 'rc/maint-http-fix'

* rc/maint-http-fix:
http.c: don't assume that urls don't end with slash

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix'Junio C Hamano Wed, 19 Aug 2009 06:32:58 +0000 (23:32 -0700)

Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix'

* tr/maint-1.6.3-add-p-modeonly-fix:
add -p: do not attempt to coalesce mode changes
git add -p: demonstrate failure when staging both mode and hunk

graph API: use a new color when starting a brand new... Adam Simpkins Tue, 18 Aug 2009 21:41:12 +0000 (14:41 -0700)

graph API: use a new color when starting a brand new column

Use a new color for commits that don't have any previously printed
children. The following command demonstrates the changes:

git log --graph --pretty=tformat:'%h %s%n' -7 481c7a6 18b0793

Now the two independent lines of development are displayed with
different colors, instead of both using the same color.

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

git submodule status: Add --recursive to recurse into... Johan Herland Wed, 19 Aug 2009 01:45:24 +0000 (03:45 +0200)

git submodule status: Add --recursive to recurse into nested submodules

In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only show
status for all the submodules in the current repo (which is what is
currently done by 'git submodule status'), but also to show status for
all submodules at all levels (i.e. recursing into nested submodules as
well).

This patch teaches the new --recursive option to the 'git submodule status'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule update: Introduce --recursive to update... Johan Herland Wed, 19 Aug 2009 01:45:23 +0000 (03:45 +0200)

git submodule update: Introduce --recursive to update nested submodules

In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only update
the submodules in the current repo (which is what is currently done by
'git submodule update'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).

This patch teaches the new --recursive option to the 'git submodule update'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule foreach: Add --recursive to recurse into... Johan Herland Wed, 19 Aug 2009 01:45:22 +0000 (03:45 +0200)

git submodule foreach: Add --recursive to recurse into nested submodules

In very large and hierarchically structured projects, one may encounter
nested submodules. In these situations, it is valuable to not only operate
on all the submodules in the current repo (which is what is currently done
by 'git submodule foreach'), but also to operate on all submodules at all
levels (i.e. recursing into nested submodules as well).

This patch teaches the new --recursive option to the 'git submodule foreach'
command. The patch also includes documentation and selftests.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule foreach: test access to submodule name... Johan Herland Wed, 19 Aug 2009 01:45:21 +0000 (03:45 +0200)

git submodule foreach: test access to submodule name as '$name'

Add verification of the behaviour of '$name' to the git submodule
foreach selftest.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add selftest for 'git submodule foreach'Johan Herland Wed, 19 Aug 2009 01:45:20 +0000 (03:45 +0200)

Add selftest for 'git submodule foreach'

The selftest verifies that:
- only checked out submodules are visited by 'git submodule foreach'
- the $path, and $sha1 variables are set correctly for each submodule

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule: Cleanup usage string and add option... Johan Herland Wed, 19 Aug 2009 01:45:19 +0000 (03:45 +0200)

git submodule: Cleanup usage string and add option parsing to cmd_foreach()

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: Use GIT_SSH setting if SVN_SSH is not setKarthik R Tue, 18 Aug 2009 23:54:40 +0000 (18:54 -0500)

git-svn: Use GIT_SSH setting if SVN_SSH is not set

If SVN_SSH is defined, it will be used. Else value in
GIT_SSH is copied to SVN_SSH & then, only on Windows,
the \s are escaped.

On Windows, the shell-variables must be set as follows
GIT_SSH="C:\Program Files\PuTTY\plink.exe"
SVN_SSH="C:\\Program Files\\PuTTY\\plink.exe"

See http://code.google.com/p/msysgit/issues/detail?id=305

[ew: fixed indentation to use tabs]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>

svn: assume URLs from the command-line are URI-encodedEric Wong Sun, 16 Aug 2009 21:22:12 +0000 (14:22 -0700)

svn: assume URLs from the command-line are URI-encoded

And then unescape them when writing to $GIT_CONFIG.

SVN has different rules for repository URLs (usually the root)
and for paths within that repository (below the HTTP layer).
Thus, for the request URI path at the HTTP level, the URI needs
to be encoded. However, in the body of the HTTP request (the
with underlying SVN XML protocol), those paths should not be
URI-encoded[1]. For non-HTTP(S) requests, SVN appears to be
more flexible and will except weird characters in the URL as
well as URI-encoded ones.

Since users are used to using URLs being entirely URI-encoded,
git svn will now attempt to unescape the path portion of URLs
while leaving the actual repository URL untouched.

This change will be reflected in newly-created $GIT_CONFIG files
only. This allows users to switch between svn(+ssh)://, file://
and http(s):// urls without changing the fetch/branches/tags
config keys. This won't affect existing imports at all (since
things didn't work before this commit anyways), and will allow
users to force escaping into repository paths that look like
they're escaped (but are not).

Thanks to Mike Smullin for the original bug report and Björn
Steinbrink for summarizing it into testable cases for me.

[1] Except when committing copies/renames, see
commit 29633bb91c7bcff31ff3bb59378709e3e3ef627d

Signed-off-by: Eric Wong <normalperson@yhbt.net>

git-svn.txt: Fix location of parent argumentTuomas Suutari Fri, 14 Aug 2009 08:11:58 +0000 (11:11 +0300)

git-svn.txt: Fix location of parent argument

The note about interoperating in different timezones and such is about
localtime argument, not parent.

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

Merge branch 'maint'Junio C Hamano Tue, 18 Aug 2009 21:40:10 +0000 (14:40 -0700)

Merge branch 'maint'

* maint:
filter-branch: make the usage string fit on 80 chars terminals.
filter-branch: add an example how to add ACKs to a range of commits
docs: describe impact of repack on "clone -s"

remove ARM and Mozilla SHA1 implementationsNicolas Pitre Tue, 18 Aug 2009 00:09:56 +0000 (20:09 -0400)

remove ARM and Mozilla SHA1 implementations

They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: guard gcc extensions with __GNUC__Nicolas Pitre Tue, 18 Aug 2009 19:37:22 +0000 (15:37 -0400)

block-sha1: guard gcc extensions with __GNUC__

With this, the code should now be portable to any C compiler.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

make sure byte swapping is optimal for gitNicolas Pitre Tue, 18 Aug 2009 19:26:55 +0000 (15:26 -0400)

make sure byte swapping is optimal for git

We rely on ntohl() and htonl() to perform byte swapping in many places.
However, some platforms have libraries providing really poor
implementations of those which might cause significant performance
issues, especially with the block-sha1 code.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: don't assume that urls don't end with slashTay Ray Chuan Mon, 17 Aug 2009 09:09:43 +0000 (17:09 +0800)

http.c: don't assume that urls don't end with slash

Make append_remote_object_url() (and by implication,
get_remote_object_url) use end_url_with_slash() to ensure that the url
ends with a slash.

Previously, they assumed that the url did not end with a slash and
as a result appended a slash, sometimes errorneously.

This fixes an issue introduced in 5424bc5 ("http*: add helper methods
for fetching objects (loose)"), where the append_remote_object_url()
implementation in http-push.c, which assumed that urls end with a
slash, was replaced by another one in http.c, which assumed urls did
not end with a slash.

The above issue was raised by Thomas Schlichter:

http://marc.info/?l=git&m=125043105231327

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Tested-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: make the usage string fit on 80 chars... Matthieu Moy Tue, 18 Aug 2009 09:51:00 +0000 (11:51 +0200)

filter-branch: make the usage string fit on 80 chars terminals.

It used to be a single, huge line, badly wrapped by xterm.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-log: allow --decorate[=short|full]Lars Hjemli Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)

git-log: allow --decorate[=short|full]

Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule foreach: Provide access to submodule... Johan Herland Sun, 16 Aug 2009 01:10:08 +0000 (03:10 +0200)

git submodule foreach: Provide access to submodule name, as '$name'

The argument to 'git submodule foreach' already has access to the variables
'$path' (the path to the submodule, relative to the superproject) and '$sha1'
(the submodule commit recorded by the superproject).

This patch adds another variable -- '$name' -- which contains the name of the
submodule, as recorded in the superproject's .gitmodules file.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: make the size member first in the context... Nicolas Pitre Tue, 18 Aug 2009 00:18:23 +0000 (20:18 -0400)

block-sha1: make the size member first in the context struct

This is a 64-bit value, hence having it first provides a better
alignment.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: add an example how to add ACKs to a... Johannes Schindelin Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200)

filter-branch: add an example how to add ACKs to a range of commits

When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.

It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.

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

check_path(): allow symlinked directories to checkout... Junio C Hamano Mon, 17 Aug 2009 06:53:12 +0000 (23:53 -0700)

check_path(): allow symlinked directories to checkout-index --prefix

Merlyn noticed that Documentation/install-doc-quick.sh no longer correctly
removes old installed documents when the target directory has a leading
path that is a symlink. It turns out that "checkout-index --prefix" was
broken by recent b6986d8 (git-checkout: be careful about untracked
symlinks, 2009-07-29).

I suspect has_symlink_leading_path() could learn the third parameter
(prefix that is allowed to be symlinked directories) to allow us to retire
a similar function has_dirs_only_path().

Another avenue of fixing this I considered was to get rid of base_dir and
base_dir_len from "struct checkout", and instead make "git checkout-index"
when run with --prefix mkdir the leading path and chdir in there. It
might be the best longer term solution to this issue, as the base_dir
feature is used only by that rather obscure codepath as far as I know.

But at least this patch should fix this breakage.

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

read-tree: Fix regression with creation of a new index... Alexandre Julliard Mon, 17 Aug 2009 15:35:44 +0000 (17:35 +0200)

read-tree: Fix regression with creation of a new index file.

Reading the index into an empty file has been broken by
5a56da58060e50980fab0f4c38203a25440d1530, since it causes the existing
index to always be loaded first, and dies if it's an empty file:

$ GIT_INDEX_FILE=`mktemp` git read-tree master
fatal: index file smaller than expected

It breaks for instance committing from git.el. This patch reverts to the
previous behavior of only loading the index when merging it.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: describe impact of repack on "clone -s"Jeff King Mon, 17 Aug 2009 06:19:17 +0000 (02:19 -0400)

docs: describe impact of repack on "clone -s"

The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:

1. Not to waste disk space by accidentally copying objects which could
be shared.

2. Copying all objects explicitly to break the dependency on the source
repo.

This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.

For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".

For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.

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

Merge branch 'lt/block-sha1'Junio C Hamano Sun, 16 Aug 2009 11:14:32 +0000 (04:14 -0700)

Merge branch 'lt/block-sha1'

* lt/block-sha1:
block-sha1/sha1.c: silence compiler complaints by casting void * to char *
block-sha1: more good unaligned memory access candidates
block-sha1: support for architectures with memory alignment restrictions
block-sha1: split the different "hacks" to be individually selected
block-sha1: move code around
block-sha1: improve code on large-register-set machines
block-sha1: improved SHA1 hashing
block-sha1: perform register rotation using cpp
block-sha1: get rid of redundant 'lenW' context
block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3
block-sha1: macroize the rounds a bit further
block-sha1: re-use the temporary array as we calculate the SHA1
block-sha1: make the 'ntohl()' part of the first SHA1 loop
block-sha1: minor fixups
block-sha1: try to use rol/ror appropriately
block-sha1: undo ctx->size change
Add new optimized C 'block-sha1' routines

Merge branch 'bc/maint-am-email'Junio C Hamano Sun, 16 Aug 2009 11:13:22 +0000 (04:13 -0700)

Merge branch 'bc/maint-am-email'

* bc/maint-am-email:
git-am: print fair error message when format detection fails
am: allow individual e-mail files as input

Merge branch 'js/maint-cover-letter-non-ascii'Junio C Hamano Sun, 16 Aug 2009 11:13:18 +0000 (04:13 -0700)

Merge branch 'js/maint-cover-letter-non-ascii'

* js/maint-cover-letter-non-ascii:
Correctly mark cover letters' encodings if they are not pure ASCII
Expose the has_non_ascii() function

Merge branch 'jc/maint-clean-nested-dir-safety'Junio C Hamano Sun, 16 Aug 2009 11:13:13 +0000 (04:13 -0700)

Merge branch 'jc/maint-clean-nested-dir-safety'

* jc/maint-clean-nested-dir-safety:
clean: require double -f options to nuke nested git repository and work tree

Merge branch 'jk/maint-merge-msg-fix'Junio C Hamano Sun, 16 Aug 2009 11:13:04 +0000 (04:13 -0700)

Merge branch 'jk/maint-merge-msg-fix'

* jk/maint-merge-msg-fix:
merge: indicate remote tracking branches in merge message
merge: fix incorrect merge message for ambiguous tag/branch
add tests for merge message headings

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Sun, 16 Aug 2009 10:46:51 +0000 (03:46 -0700)

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

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Parse arbitrary commit-ish in SHA1 field
gitk: Fix direction of symmetric difference in optimized mode
gitk: New option to hide remote refs
gitk: Do not hard-code "encoding" in attribute lookup functions

add -p: do not attempt to coalesce mode changesThomas Rast Sat, 15 Aug 2009 13:56:39 +0000 (15:56 +0200)

add -p: do not attempt to coalesce mode changes

In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16),
we merged the interaction loops for mode changes and hunk staging.
This was fine at the time, because 0beee4c (git-add--interactive:
remove hunk coalescing, 2008-07-02) removed hunk coalescing.

However, in 7a26e65 (Revert "git-add--interactive: remove hunk
coalescing", 2009-05-16), we resurrected it. Since then, the code
would attempt in vain to merge mode changes with diff hunks,
corrupting both in the process.

We add a check to the coalescing loop to ensure it only looks at diff
hunks, thus skipping mode changes.

Noticed-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add -p: demonstrate failure when staging both mode... Kirill Smelkov Sat, 15 Aug 2009 12:26:49 +0000 (16:26 +0400)

git add -p: demonstrate failure when staging both mode and hunk

When trying to stage changes to file which has also pending `chmod +x`,
`git add -p` produces lots of 'Use of uninitialized value ...' warnings
and fails to do the job:

$ echo content >> file
$ chmod +x file
$ git add -p
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
old mode 100644
new mode 100755
Stage mode change [y,n,q,a,d,/,j,J,g,?]? y
@@ -0,0 +1 @@
+content
Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806.
Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
fatal: corrupt patch at line 5
diff --git a/file b/file
index e69de29..d95f3ad
--- a/file
+++ b/file
@@ -,0 + @@
+content

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git commit --dry-run -v: show diff in color when askedJunio C Hamano Sat, 15 Aug 2009 09:14:14 +0000 (02:14 -0700)

git commit --dry-run -v: show diff in color when asked

The earlier implementation of --dry-run didn't duplicate the use of color
"git status -v" set up for diff output.

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

Documentation/git-commit.txt: describe --dry-runJunio C Hamano Sat, 15 Aug 2009 08:58:37 +0000 (01:58 -0700)

Documentation/git-commit.txt: describe --dry-run

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

Documentaqtion/git-submodule.txt: TypofixLars Hjemli Sat, 15 Aug 2009 08:40:42 +0000 (10:40 +0200)

Documentaqtion/git-submodule.txt: Typofix

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule summary: add --files optionJens Lehmann Thu, 13 Aug 2009 19:32:50 +0000 (21:32 +0200)

git submodule summary: add --files option

git submodule summary is providing similar functionality for submodules as
git diff-index does for a git project (including the meaning of --cached).
But the analogon to git diff-files is missing, so add a --files option to
summarize the differences between the index of the super project and the
last commit checked out in the working tree of the submodule.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cvsimport: add support for cvs pserver password... Dirk Hoerner Fri, 14 Aug 2009 06:58:31 +0000 (08:58 +0200)

git-cvsimport: add support for cvs pserver password scrambling.

Instead of a cleartext password, the CVS pserver expects a scrambled one
in the authentication request. With this patch it is possible to import
CVS repositories only accessible via pserver and user/password.

Signed-off-by: Dirk Hoerner <dirker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Optimize git-favicon.pngBenjamin Kramer Mon, 10 Aug 2009 12:09:00 +0000 (14:09 +0200)

gitweb: Optimize git-favicon.png

Reduce size of git-favicon.png using a combination of optipng and
pngout. From 164 bytes to 115 bytes (30% reduction). Also reduce
git-logo.png's size by one byte using advcomp.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git stash: Give friendlier errors when there is nothing... Ori Avtalion Tue, 11 Aug 2009 11:12:13 +0000 (14:12 +0300)

git stash: Give friendlier errors when there is nothing to apply

The change makes sure a stash (given or default) exists before
checking if the working tree is dirty.

If the default stash is requested, the old message was scary and
included a 'fatal' error from rev-parse:
fatal: Needed a single revision
: no valid stashed state found

It is replaced with a friendlier 'Nothing to apply' error, similar to
'git stash branch'.

If a specific stash is specified, the 'Needed a single revision' errors
from rev-parse are suppressed.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1/sha1.c: silence compiler complaints by casti... Brandon Casey Fri, 14 Aug 2009 22:52:15 +0000 (17:52 -0500)

block-sha1/sha1.c: silence compiler complaints by casting void * to char *

Some compilers produce errors when arithmetic is attempted on pointers to
void. We want computations done on byte addresses, so cast them to char *
to work them around.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jn/gitweb-blame' (early part)Junio C Hamano Fri, 14 Aug 2009 23:32:52 +0000 (16:32 -0700)

Merge branch 'jn/gitweb-blame' (early part)

* 'jn/gitweb-blame' (early part):
gitweb: Use light/dark for class names also in 'blame' view
gitweb: Add author initials in 'blame' view, a la "git gui blame"
gitweb: Mark commits with no "previous" in 'blame' view
gitweb: Use "previous" header of git-blame -p in 'blame' view
gitweb: Mark boundary commits in 'blame' view
gitweb: Make .error style generic

Fix "unpack-objects --strict"Junio C Hamano Thu, 13 Aug 2009 19:41:14 +0000 (12:41 -0700)

Fix "unpack-objects --strict"

When unpack-objects is run under the --strict option, objects that have
pointers to other objects are verified for the reachability at the end, by
calling check_object() on each of them, and letting check_object to walk
the reachable objects from them using fsck_walk() recursively.

The function however misunderstands the semantics of fsck_walk() function
when it makes a call to it, setting itself as the callback. fsck_walk()
expects the callback function to return a non-zero value to signal an
error (negative value causes an immediate abort, positive value is still
an error but allows further checks on sibling objects) and return zero to
signal a success. The function however returned 1 on some non error
cases, and to cover up this mistake, complained only when fsck_walk() did
not detect any error.

To fix this double-bug, make the function return zero on all success
cases, and also check for non-zero return from fsck_walk() for an error.

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

block-sha1: more good unaligned memory access candidatesNicolas Pitre Thu, 13 Aug 2009 04:29:14 +0000 (00:29 -0400)

block-sha1: more good unaligned memory access candidates

In addition to X86, PowerPC and S390 are capable of unaligned memory
accesses.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Parse arbitrary commit-ish in SHA1 fieldThomas Rast Thu, 13 Aug 2009 07:25:03 +0000 (09:25 +0200)

gitk: Parse arbitrary commit-ish in SHA1 field

We only accepted either SHA1s or heads/tags that have been read. This
meant the user could not, e.g., enter HEAD to go back to the current
commit.

This adds code to call out to git rev-parse --verify if all other
methods of interpreting the string the user entered fail.
(git-rev-parse alone is not enough as we really want a single
revision.)

The error paths change slighly, because we now know from the rev-parse
invocation whether the expression was valid at all. The previous
"unknown" path is now only triggered if the revision does exist, but
is not in the current view display.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Fix direction of symmetric difference in optimize... Thomas Rast Wed, 5 Aug 2009 21:15:36 +0000 (23:15 +0200)

gitk: Fix direction of symmetric difference in optimized mode

ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an
optimized mode where gitk parses the arguments with rev-parse, and
manually reads history in chunks. As mentioned in the commit message,
symmetric differences are a problem there:

One wrinkle is that we have to turn symmetric diff arguments (of the
form a...b) back into symmetric diff form so that --left-right still
works, as git rev parse turns a...b into a b ^merge_base(a,b).

However, git-rev-parse returns a...b in the swapped order

b a ^merge_base(a,b)

This has been the case since at least 1f8115b (the state of master at
the time of the abovementioned ee66e08; Merge branch 'maint',
2008-05-08). So gitk flipped the sides of symmetric differences
whenever it was in optimized mode.

Fix this by swapping the sides of the reconstruction code.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: New option to hide remote refsThomas Rast Mon, 3 Aug 2009 21:53:36 +0000 (23:53 +0200)

gitk: New option to hide remote refs

In repositories with lots of remotes, looking at the history in gitk
can be borderline insane with all the red labels for remote refs.
Introduce a new option in the preferences that makes gitk ignore
remote refs entirely, so they don't take up space in the display.

Wished-for-by: Thell Fowler <tbfowler4@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Do not hard-code "encoding" in attribute lookup... Johannes Sixt Tue, 21 Jul 2009 08:09:48 +0000 (10:09 +0200)

gitk: Do not hard-code "encoding" in attribute lookup functions

Commit 39ee47e (Clean up file encoding code and add enable/disable option,
2008-10-15) rewrote the attribute lookup functions gitattr and
cache_gitattr, but in the process hard-coded the attribute name "encoding"
instead of using the functions' parameters. This fixes it.

This is not a serious regression because currently all callers look only
for "encoding".

Further note that this fix assumes that future callers will not pass an
attribute name that contains regex special characters.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

svn: (cleanup) use predefined constant for rev_map_fmtEric Wong Thu, 13 Aug 2009 05:20:02 +0000 (22:20 -0700)

svn: (cleanup) use predefined constant for rev_map_fmt

This makes life easier in case we ever need to change the
internal format of the rev_maps.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

svn: allow branches outside of refs/remotesAdam Brewster Wed, 12 Aug 2009 03:14:27 +0000 (23:14 -0400)

svn: allow branches outside of refs/remotes

It may be convenient for some users to store svn remote tracking
branches outside of the refs/remotes/ heirarchy.

To accomplish this feat, this patch includes the entire path to
the ref in $r->{'refname'} in &read_all_remotes and tries to change
references to this entry so the new value makes sense.

[ew: fixed backwards compatibility, long lines]

Signed-off-by: Adam Brewster <adambrewster@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>

svn: initial "master" points to trunk if possibleEric Wong Wed, 12 Aug 2009 23:01:59 +0000 (16:01 -0700)

svn: initial "master" points to trunk if possible

Since "trunk" is a convention for the main development branch in
the SVN world, try to make that the master branch upon initial
checkout if it exists. This is probably less surprising based
on user requests.

t9135 was the only test which relied on the previous behavior
and thus needed to be modified.

Signed-off-by: Eric Wong <normalperson@yhbt.net>

Merge branch 'maint'Junio C Hamano Wed, 12 Aug 2009 23:36:04 +0000 (16:36 -0700)

Merge branch 'maint'

* maint:
push: point to 'git pull' and 'git push --force' in case of non-fast forward
Documentation: add: <filepattern>... is optional
Change mentions of "git programs" to "git commands"
Documentation: merge: one <remote> is required
help.c: give correct structure's size to memset()

Merge branch 'maint-1.6.3' into maintJunio C Hamano Wed, 12 Aug 2009 23:15:55 +0000 (16:15 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Change mentions of "git programs" to "git commands"
Documentation: merge: one <remote> is required
help.c: give correct structure's size to memset()

push: point to 'git pull' and 'git push --force' in... Matthieu Moy Sat, 8 Aug 2009 07:51:08 +0000 (09:51 +0200)

push: point to 'git pull' and 'git push --force' in case of non-fast forward

'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.

Add a new section to the git-push documentation and refer them to it.

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

Documentation: add: <filepattern>... is optionalPaul Bolle Tue, 11 Aug 2009 13:03:10 +0000 (15:03 +0200)

Documentation: add: <filepattern>... is optional

<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change mentions of "git programs" to "git commands"Ori Avtalion Fri, 7 Aug 2009 14:24:21 +0000 (17:24 +0300)

Change mentions of "git programs" to "git commands"

Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: merge: one <remote> is requiredPaul Bolle Tue, 11 Aug 2009 13:03:58 +0000 (15:03 +0200)

Documentation: merge: one <remote> is required

merge only requires one <remote>, so "<remote>..." should be used in the
synopsis (and not "<remote> <remote>...").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help.c: give correct structure's size to memset()Johan Herland Tue, 11 Aug 2009 10:10:21 +0000 (12:10 +0200)

help.c: give correct structure's size to memset()

These two structures are of the same type, but we'd better be consistent.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

allow pull --rebase on branch yet to be bornJeff King Wed, 12 Aug 2009 03:27:40 +0000 (23:27 -0400)

allow pull --rebase on branch yet to be born

When doing a "pull --rebase", we check to make sure that the index and
working tree are clean. The index-clean check compares the index against
HEAD. The test erroneously reports dirtiness if we don't have a HEAD yet.

In such an "unborn branch" case, by definition, a non-empty index won't
be based on whatever we are pulling down from the remote, and will lose
the local change. Just check if $GIT_DIR/index exists and error out.

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

block-sha1: support for architectures with memory align... Nicolas Pitre Wed, 12 Aug 2009 19:47:55 +0000 (15:47 -0400)

block-sha1: support for architectures with memory alignment restrictions

This is needed on architectures with poor or non-existent unaligned memory
support and/or no fast byte swap instruction (such as ARM) by using byte
accesses to memory and shifting the result together.

This also makes the code portable, therefore the byte access methods are
the defaults. Any architecture that properly supports unaligned word
accesses in hardware simply has to enable the alternative methods.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: split the different "hacks" to be individua... Nicolas Pitre Wed, 12 Aug 2009 19:46:41 +0000 (15:46 -0400)

block-sha1: split the different "hacks" to be individually selected

This is to make it easier for them to be selected individually depending
on the architecture instead of the other way around i.e. having each
architecture select a list of hacks up front. That makes for clearer
documentation as well.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: move code aroundNicolas Pitre Wed, 12 Aug 2009 19:45:48 +0000 (15:45 -0400)

block-sha1: move code around

Move the code around so specific architecture hacks are defined first.
Also make one line comments actually one line. No code change.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Prevent diff machinery from examining assume-unchanged... Nguyễn Thái Ngọc Duy Tue, 11 Aug 2009 15:43:59 +0000 (22:43 +0700)

Prevent diff machinery from examining assume-unchanged entries on worktree

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

Merge branch 'maint'Junio C Hamano Tue, 11 Aug 2009 05:23:59 +0000 (22:23 -0700)

Merge branch 'maint'

* maint:
Fix typos in git-remote.txt and git-symbolic-ref.txt
git-instaweb: fix mod_perl detection for apache2

Merge branch 'maint-1.6.3' into maintJunio C Hamano Tue, 11 Aug 2009 05:23:48 +0000 (22:23 -0700)

Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
Fix typos in git-remote.txt and git-symbolic-ref.txt

Merge branch 'jk/push-quiet'Junio C Hamano Tue, 11 Aug 2009 05:18:21 +0000 (22:18 -0700)

Merge branch 'jk/push-quiet'

* jk/push-quiet:
transport: don't show push status if --quiet is given
transport: pass "quiet" flag to pack-objects
push: add --quiet flag

Merge branch 'jc/maint-merge-recursive-fix'Junio C Hamano Tue, 11 Aug 2009 05:17:01 +0000 (22:17 -0700)

Merge branch 'jc/maint-merge-recursive-fix'

* jc/maint-merge-recursive-fix:
merge-recursive: don't segfault while handling rename clashes

Merge branch 'zf/maint-gitweb-acname'Junio C Hamano Tue, 11 Aug 2009 05:16:47 +0000 (22:16 -0700)

Merge branch 'zf/maint-gitweb-acname'

* zf/maint-gitweb-acname:
gitweb: parse_commit_text encoding fix

Merge branch 'ns/am-raw-email'Junio C Hamano Tue, 11 Aug 2009 05:16:42 +0000 (22:16 -0700)

Merge branch 'ns/am-raw-email'

* ns/am-raw-email:
git-am: print fair error message when format detection fails
am: allow individual e-mail files as input

Merge branch 'np/maint-limit-delta-cache'Junio C Hamano Tue, 11 Aug 2009 05:16:09 +0000 (22:16 -0700)

Merge branch 'np/maint-limit-delta-cache'

* np/maint-limit-delta-cache:
don't let the delta cache grow unbounded in 'git repack'

Merge branch 'jp/symlink-dirs'Junio C Hamano Tue, 11 Aug 2009 05:15:41 +0000 (22:15 -0700)

Merge branch 'jp/symlink-dirs'

* jp/symlink-dirs:
t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
git-checkout: be careful about untracked symlinks
lstat_cache: guard against full match of length of 'name' parameter
Demonstrate bugs when a directory is replaced with a symlink

Merge branch 'mk/grep-max-depth'Junio C Hamano Tue, 11 Aug 2009 05:15:12 +0000 (22:15 -0700)

Merge branch 'mk/grep-max-depth'

* mk/grep-max-depth:
grep: Add --max-depth option.

Merge branch 'js/run-command-updates'Junio C Hamano Tue, 11 Aug 2009 05:14:57 +0000 (22:14 -0700)

Merge branch 'js/run-command-updates'

* js/run-command-updates:
api-run-command.txt: describe error behavior of run_command functions
run-command.c: squelch a "use before assignment" warning
receive-pack: remove unnecessary run_status report
run_command: report failure to execute the program, but optionally don't
run_command: encode deadly signal number in the return value
run_command: report system call errors instead of returning error codes
run_command: return exit code as positive value
MinGW: simplify waitpid() emulation macros

Fix typos in git-remote.txt and git-symbolic-ref.txtŠtěpán Němec Tue, 11 Aug 2009 00:52:07 +0000 (02:52 +0200)

Fix typos in git-remote.txt and git-symbolic-ref.txt

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

block-sha1: improve code on large-register-set machinesLinus Torvalds Mon, 10 Aug 2009 23:52:07 +0000 (16:52 -0700)

block-sha1: improve code on large-register-set machines

For x86 performance (especially in 32-bit mode) I added that hack to write
the SHA1 internal temporary hash using a volatile pointer, in order to get
gcc to not try to cache the array contents. Because gcc will do all the
wrong things, and then spill things in insane random ways.

But on architectures like PPC, where you have 32 registers, it's actually
perfectly reasonable to put the whole temporary array[] into the register
set, and gcc can do so.

So make the 'volatile unsigned int *' cast be dependent on a
SMALL_REGISTER_SET preprocessor symbol, and enable it (currently) on just
x86 and x86-64. With that, the routine is fairly reasonable even when
compared to the hand-scheduled PPC version. Ben Herrenschmidt reports on
a G5:

* Paulus asm version: about 3.67s
* Yours with no change: about 5.74s
* Yours without "volatile": about 3.78s

so with this the C version is within about 3% of the asm one.

And add a lot of commentary on what the heck is going on.

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

git-am: print fair error message when format detection... Nicolas Sebrecht Fri, 7 Aug 2009 01:08:13 +0000 (20:08 -0500)

git-am: print fair error message when format detection fails

Avoid git ending with this message:
"Patch format is not supported."

With improved error message in the format detection failure case by
Giuseppe Bilotta.

Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: allow individual e-mail files as inputJunio C Hamano Fri, 7 Aug 2009 01:08:12 +0000 (20:08 -0500)

am: allow individual e-mail files as input

We traditionally allowed a mbox file or a directory name of a maildir (but
never an individual file inside a maildir) to be given to "git am". Even
though an individual file in a maildir (or more generally, a piece of
RFC2822 e-mail) is not a mbox file, it contains enough information to
create a commit out of it, so there is no reason to reject one. Running
mailsplit on such a file feels stupid, but it does not hurt.

This builds on top of a5a6755 (git-am foreign patch support: introduce
patch_format, 2009-05-27) that introduced mailbox format detection. The
codepath to deal with a mbox requires it to begin with "From " line and
also allows it to begin with "From: ", but a random piece of e-mail can
and often do begin with any valid RFC2822 header lines.

Instead of checking the first line, we extract all the lines up to the
first empty line, and make sure they look like e-mail headers.

A test is added to t4150 to demonstrate this feature.

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

Correctly mark cover letters' encodings if they are... Johannes Schindelin Mon, 10 Aug 2009 16:22:22 +0000 (18:22 +0200)

Correctly mark cover letters' encodings if they are not pure ASCII

If your name is, say, Üwë, you want your cover letters to appear
correctly. Convince format-patch to mark it as 8-bit.

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

Expose the has_non_ascii() functionJohannes Schindelin Mon, 10 Aug 2009 16:22:18 +0000 (18:22 +0200)

Expose the has_non_ascii() function

This function is useful outside of log-tree.c, too.

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

git-p4: stream from perforce to speed up clonesLuke Diamand Wed, 29 Jul 2009 23:13:46 +0000 (00:13 +0100)

git-p4: stream from perforce to speed up clones

Change commit() to stream data from Perforce and into fast-import
rather than reading into memory first, and then writing out. This
hugely reduces the memory requirements when cloning non-incrementally.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Check return value of ftruncate call in http.cJeff Lasslett Mon, 10 Aug 2009 16:05:06 +0000 (00:05 +0800)

Check return value of ftruncate call in http.c

In new_http_object_request(), check ftruncate() call return value and
handle possible errors.

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

http.c: replace usage of temporary variable for urlsTay Ray Chuan Mon, 10 Aug 2009 15:59:55 +0000 (23:59 +0800)

http.c: replace usage of temporary variable for urls

Use preq->url in new_http_pack_request and freq->url in
new_http_object_request when calling curl_setopt(CURLOPT_URL), instead
of using an intermediate variable, 'url'.

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

http.c: free preq when abortingTay Ray Chuan Mon, 10 Aug 2009 15:55:48 +0000 (23:55 +0800)

http.c: free preq when aborting

Free preq in new_http_pack_request when aborting. preq was allocated
before jumping to the 'abort' label so this is safe.

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

Merge branch 'master' of git://git.bogomips.org/git-svnJunio C Hamano Mon, 10 Aug 2009 20:22:33 +0000 (13:22 -0700)

Merge branch 'master' of git://git.bogomips.org/git-svn

* 'master' of git://git.bogomips.org/git-svn:
git-svn: ignore leading blank lines in svn:ignore
svn: Honor --prefix option in init without --stdlayout
svn: Add && to t9107-git-svn-migrate.sh

wt-status: collect untracked files in a separate "colle... Junio C Hamano Mon, 10 Aug 2009 07:36:33 +0000 (00:36 -0700)

wt-status: collect untracked files in a separate "collect" phase

In a way similar to updated and locally modified files are collected.

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

Make git_status_config() file scope static to builtin... Junio C Hamano Mon, 10 Aug 2009 06:12:19 +0000 (23:12 -0700)

Make git_status_config() file scope static to builtin-commit.c

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

wt-status: move wt_status_colors[] into wt_status structureJunio C Hamano Mon, 10 Aug 2009 06:08:40 +0000 (23:08 -0700)

wt-status: move wt_status_colors[] into wt_status structure

The benefit of this one alone is somewhat iffy, but for completeness this
moves the wt_status_colors[] color palette to the wt_status structure to
complete the libification started by the previous commit.

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

wt-status: move many global settings to wt_status structureJunio C Hamano Mon, 10 Aug 2009 04:59:30 +0000 (21:59 -0700)

wt-status: move many global settings to wt_status structure

Turn four global variables (wt_status_use_color, show_tracked_files,
wt_status_relative_paths, and wt_status_submodule_summary) into fields of
wt_status structure. They can also lose "wt_status_" prefix.

Get rid of "untracked" field that was used only to keep track of otherwise
available information redundantly.

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

git-svn: ignore leading blank lines in svn:ignoreMichael Haggerty Fri, 7 Aug 2009 19:21:21 +0000 (21:21 +0200)

git-svn: ignore leading blank lines in svn:ignore

Subversion ignores all blank lines in svn:ignore properties. The old
git-svn code ignored blank lines everywhere except for the first line
of the svn:ignore property. This patch makes the "git svn
show-ignore" and "git svn create-ignore" commands ignore leading blank
lines, too.

Also include leading blank lines in the test suite.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>