gitweb.git
Merge branch 'lt/readlink'Junio C Hamano Thu, 18 Dec 2008 06:28:03 +0000 (22:28 -0800)

Merge branch 'lt/readlink'

* lt/readlink:
combine-diff.c: use strbuf_readlink()
builtin-blame.c: use strbuf_readlink()
make_absolute_path(): check bounds when seeing an overlong symlink
Make 'prepare_temp_file()' ignore st_size for symlinks
Make 'diff_populate_filespec()' use the new 'strbuf_readlink()'
Make 'index_path()' use 'strbuf_readlink()'
Make 'ce_compare_link()' use the new 'strbuf_readlink()'
Add generic 'strbuf_readlink()' helper function

Enable threaded delta search on Mac OS X/DarwinArjen Laarhoven Wed, 17 Dec 2008 08:20:25 +0000 (09:20 +0100)

Enable threaded delta search on Mac OS X/Darwin

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Clarify documentation of "git checkout <tree-ish> paths... Nanako Shiraishi Thu, 18 Dec 2008 03:34:56 +0000 (12:34 +0900)

Clarify documentation of "git checkout <tree-ish> paths" syntax

The SYNOPSIS section of the manual writes:

git checkout [options] [<tree-ish>] [--] <paths>...

but the DESCRIPTION says that this form checks the paths out "from the
index, or from a named commit." A later sentence refers to the same
argument as "<tree-ish> argument", but it is not clear that these two
sentences are talking about the same command line argument for first-time
readers.

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

Merge git://repo.or.cz/git-guiJunio C Hamano Thu, 18 Dec 2008 05:56:48 +0000 (21:56 -0800)

Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
git-gui 0.12
git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL
git-gui: Update Hungarian translation for 0.12
git-gui: Fixed typos in Swedish translation.
git-gui: Updated Swedish translation (515t0f0u).
git gui: update Italian translation
git-gui: Update Japanese translation for 0.12
git-gui: Starting translation for Norwegian
git-gui: Update German (completed) translation.
git-gui: Update po template to include 'Mirroring %s' message
git-gui: Fix commit encoding handling.
git-gui: Fix handling of relative paths in blame.

git-gui 0.12 gitgui-0.12.0Shawn O. Pearce Thu, 18 Dec 2008 04:15:17 +0000 (20:15 -0800)

git-gui 0.12

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

githooks documentation: add a note about the +x modeMiklos Vajna Wed, 17 Dec 2008 21:29:06 +0000 (22:29 +0100)

githooks documentation: add a note about the +x mode

In a freshly initialized repo it is only necessary to rename the .sample
hooks, but when using older repos (initialized with older git init)
enabled the +x mode is still necessary - docuement this.

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

combine-diff.c: use strbuf_readlink()Junio C Hamano Wed, 17 Dec 2008 20:37:58 +0000 (12:37 -0800)

combine-diff.c: use strbuf_readlink()

When showing combined diff using work tree contents, use strbuf_readlink()
to read symbolic links.

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

builtin-blame.c: use strbuf_readlink()Junio C Hamano Wed, 17 Dec 2008 20:37:53 +0000 (12:37 -0800)

builtin-blame.c: use strbuf_readlink()

When faking a commit out of the work tree contents, use strbuf_readlink()
to read the contents of symbolic links.

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

make_absolute_path(): check bounds when seeing an overl... Junio C Hamano Wed, 17 Dec 2008 20:37:48 +0000 (12:37 -0800)

make_absolute_path(): check bounds when seeing an overlong symlink

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

Make 'prepare_temp_file()' ignore st_size for symlinksLinus Torvalds Wed, 17 Dec 2008 18:31:36 +0000 (10:31 -0800)

Make 'prepare_temp_file()' ignore st_size for symlinks

The code was already set up to not really need it, so this just massages
it a bit to remove the use entirely.

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

Make 'diff_populate_filespec()' use the new 'strbuf_rea... Linus Torvalds Wed, 17 Dec 2008 18:26:13 +0000 (10:26 -0800)

Make 'diff_populate_filespec()' use the new 'strbuf_readlink()'

This makes all tests pass on a system where 'lstat()' has been hacked to
return bogus data in st_size for symlinks.

Of course, the test coverage isn't complete, but it's a good baseline.

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

Make 'index_path()' use 'strbuf_readlink()'Linus Torvalds Wed, 17 Dec 2008 17:51:53 +0000 (09:51 -0800)

Make 'index_path()' use 'strbuf_readlink()'

This makes us able to properly index symlinks even on filesystems where
st_size doesn't match the true size of the link.

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

Make 'ce_compare_link()' use the new 'strbuf_readlink()'Linus Torvalds Wed, 17 Dec 2008 17:47:27 +0000 (09:47 -0800)

Make 'ce_compare_link()' use the new 'strbuf_readlink()'

This simplifies the code, and also makes ce_compare_link now able to
handle filesystems with odd 'st_size' return values for symlinks.

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

Add generic 'strbuf_readlink()' helper functionLinus Torvalds Wed, 17 Dec 2008 17:36:40 +0000 (09:36 -0800)

Add generic 'strbuf_readlink()' helper function

It was already what 'git apply' did in read_old_data(), just export it
as a real function, and make it be more generic.

In particular, this handles the case of the lstat() st_size data not
matching the readlink() return value properly (which apparently happens
at least on NTFS under Linux). But as a result of this you could also
use the new function without even knowing how big the link is going to
be, and it will allocate an appropriately sized buffer.

So we pass in the st_size of the link as just a hint, rather than a
fixed requirement.

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

git-gui: Get rid of the last remnants of GIT_CONFIG_LOCALJohannes Schindelin Sun, 14 Dec 2008 22:12:49 +0000 (23:12 +0100)

git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL

In dc871831(Only use GIT_CONFIG in "git config", not other programs),
GIT_CONFIG_LOCAL was rested in peace, in favor of not reading
/etc/gitconfig and $HOME/.gitconfig at all when GIT_CONFIG is set.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

doc/git-reset: add reference to git-stashMarkus Heidelberg Wed, 17 Dec 2008 02:59:36 +0000 (03:59 +0100)

doc/git-reset: add reference to git-stash

The "Interrupted workflow" situation is a good example for using
git-stash.

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

Documentation: fix description for enabling hooksMarkus Heidelberg Wed, 17 Dec 2008 02:59:23 +0000 (03:59 +0100)

Documentation: fix description for enabling hooks

Since f98f8cb (Ship sample hooks with .sample suffix, 2008-06-24) hooks
are not enabled by making them executable anymore, but by removing the
'.sample' suffix from the filename.

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

git-daemon documentation: use {tilde}Miklos Vajna Tue, 16 Dec 2008 15:48:12 +0000 (16:48 +0100)

git-daemon documentation: use {tilde}

Use '{tilde}' instead of '~', becase the later does not appear in the
manpage version, just in the HTML one.

Noticed by gonzzor on IRC.

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

gitweb: do not run "git diff" that is PorcelainJunio C Hamano Wed, 17 Dec 2008 03:42:02 +0000 (19:42 -0800)

gitweb: do not run "git diff" that is Porcelain

Jakub says that legacy-style URI to view two blob differences are never
generated since 1.4.3. This codepath runs "git diff" Porcelain from the
gitweb, which is a no-no.

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

GIT 1.5.6.6 v1.5.6.6Junio C Hamano Wed, 17 Dec 2008 06:13:36 +0000 (22:13 -0800)

GIT 1.5.6.6

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

GIT 1.5.5.6 v1.5.5.6Junio C Hamano Wed, 17 Dec 2008 06:08:22 +0000 (22:08 -0800)

GIT 1.5.5.6

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

GIT 1.5.4.7 v1.5.4.7Junio C Hamano Wed, 17 Dec 2008 06:03:29 +0000 (22:03 -0800)

GIT 1.5.4.7

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

gitweb: do not run "git diff" that is PorcelainJunio C Hamano Wed, 17 Dec 2008 03:42:02 +0000 (19:42 -0800)

gitweb: do not run "git diff" that is Porcelain

Jakub says that legacy-style URI to view two blob differences are never
generated since 1.4.3. This codepath runs "git diff" Porcelain from the
gitweb, which is a no-no. It can trigger diff.external command that is
specified in the configuration file of the repository being viewed.

This patch applies to v1.5.4 and later.

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

bash completion: Sync config variables with their man... Lee Marlow Mon, 15 Dec 2008 17:45:49 +0000 (10:45 -0700)

bash completion: Sync config variables with their man pages

Add 'normal' to config color options.
Add 'mergeoptions' to branch config options.
Add 'proxy' and 'mirror' to remote config options.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash completion: Sort config completion variablesLee Marlow Mon, 15 Dec 2008 17:45:48 +0000 (10:45 -0700)

bash completion: Sort config completion variables

Sort the config variables to make sync-ing them with
Documents/config.txt easier in the future.

Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Tue, 16 Dec 2008 07:06:13 +0000 (23:06 -0800)

Merge branch 'maint'

* maint:
fast-import: close pack before unlinking it
pager: do not dup2 stderr if it is already redirected
git-show: do not segfault when showing a bad tag

fast-import: close pack before unlinking itJohannes Schindelin Mon, 15 Dec 2008 21:11:40 +0000 (22:11 +0100)

fast-import: close pack before unlinking it

This is sort of a companion patch to 4723ee9(Close files opened by
lock_file() before unlinking.): on Windows, you cannot delete what
is still open.

This makes test 9300-fast-import pass on Windows for me; quite a few
fast-imports leave temporary packs until the test "blank lines not
necessary after other commands" actually tests for the number of files
in .git/objects/pack/, which has a few temporary packs now.

I guess that 8b4eb6b(Do not perform cross-directory renames when
creating packs) was "responsible" for the breakage.

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

gitweb: unify boolean feature subroutinesMatt Kraai Tue, 16 Dec 2008 06:16:19 +0000 (22:16 -0800)

gitweb: unify boolean feature subroutines

The boolean feature subroutines behaved identically except for the
name of the configuration option, so make that a parameter and unify
them.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Force t5302 to use a single threadJohannes Schindelin Mon, 15 Dec 2008 19:44:30 +0000 (20:44 +0100)

Force t5302 to use a single thread

If the packs are made using multiple threads, they are no longer identical
on the 4-core Xeon I tested on.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cb/maint-merge-recursive-fix' into cb... Junio C Hamano Mon, 15 Dec 2008 10:41:24 +0000 (02:41 -0800)

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

* cb/maint-merge-recursive-fix:
merge-recursive: do not clobber untracked working tree garbage
modify/delete conflict resolution overwrites untracked file

merge-recursive: do not clobber untracked working tree... Junio C Hamano Mon, 15 Dec 2008 03:40:09 +0000 (19:40 -0800)

merge-recursive: do not clobber untracked working tree garbage

When merge-recursive wanted to create a new file in the work tree (either
as the final result, or a hint for reference purposes while delete/modify
conflicts), it unconditionally overwrote an untracked file in the working
tree. Be careful not to lose whatever the user has that is not tracked.

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

modify/delete conflict resolution overwrites untracked... Clemens Buchacher Wed, 10 Dec 2008 20:12:59 +0000 (21:12 +0100)

modify/delete conflict resolution overwrites untracked file

If a file was removed in HEAD, but modified in MERGE_HEAD, recursive merge
will result in a "CONFLICT (delete/modify)". If the (now untracked) file
already exists and was not added to the index, it is overwritten with the
conflict resolution contents.

In similar situations (cf. test 2), the merge would abort with

"error: Untracked working tree 'file' would be overwritten by merge."

The same should happen in this case.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pager: do not dup2 stderr if it is already redirectedJunio C Hamano Mon, 15 Dec 2008 08:33:34 +0000 (00:33 -0800)

pager: do not dup2 stderr if it is already redirected

An earlier commit 61b8050 (sending errors to stdout under $PAGER,
2008-02-16) avoided losing the error messages that are sent to the
standard error when $PAGER is in effect by dup2'ing fd 2 to the pager.
his way, showing a tag object that points to a bad object:

$ git show tag-foo

would give the error message to the pager. However, it was not quite
right if the user did:

$ git show 2>error.log tag-foo

i.e. use the pager but store the errors in a separate file.

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

git-show: do not segfault when showing a bad tagJunio C Hamano Mon, 15 Dec 2008 08:36:56 +0000 (00:36 -0800)

git-show: do not segfault when showing a bad tag

When a tag points at a bad or nonexistent object, we should diagnose the
breakage and exit. An earlier commit 4f3dcc2 (Fix 'git show' on signed
tag of signed tag of commit, 2008-07-01) lost this check and made it
segfault instead; not good.

This fixes it.

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

Get rid of the last remnants of GIT_CONFIG_LOCAL v1.6.1-rc3Johannes Schindelin Sun, 14 Dec 2008 22:10:52 +0000 (23:10 +0100)

Get rid of the last remnants of GIT_CONFIG_LOCAL

In dc871831(Only use GIT_CONFIG in "git config", not other programs),
GIT_CONFIG_LOCAL was rested in peace, in favor of not reading
/etc/gitconfig and $HOME/.gitconfig at all when GIT_CONFIG is set.

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

Documentation: Describe git-gui Tools menu configuratio... Alexander Gavrilov Sun, 14 Dec 2008 19:44:32 +0000 (22:44 +0300)

Documentation: Describe git-gui Tools menu configuration options.

Now git gui has a customizable Tools menu, so this adds
information about variables that are used to configure it.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-fast-import possible memory corruption problemYONETANI Tomokazu Sun, 14 Dec 2008 02:08:22 +0000 (11:08 +0900)

git-fast-import possible memory corruption problem

Internal "allocate in bulk, we will never free this memory anyway"
allocator used in fast-import had a logic to round up the size of the
requested memory block in a wrong place (it computed if the available
space is enough to fit the request first, and then carved a chunk of
memory by size rounded up to the alignment, which could go beyond the
actually available space).

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

pack-objects: don't use too many threads with few objectsNicolas Pitre Sat, 13 Dec 2008 20:06:40 +0000 (15:06 -0500)

pack-objects: don't use too many threads with few objects

If there are few objects to deltify, they might be split amongst threads
so that there is simply no other objects left to delta against within
the same thread. Let's use the same 2*window treshold as used for the
final load balancing to allow extra threads to be created.

This fixes the benign t5300 test failure.

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

builtin-commit: remove unused message variableMarkus Heidelberg Sat, 13 Dec 2008 19:05:34 +0000 (20:05 +0100)

builtin-commit: remove unused message variable

builtin-commit uses commit_tree() from builtin-commit-tree since
6bb6b03 (builtin-commit: use commit_tree(), 2008-09-10), where the
same message is used.

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

Merge branch 'maint'Junio C Hamano Sat, 13 Dec 2008 05:50:34 +0000 (21:50 -0800)

Merge branch 'maint'

* maint:
git-config.txt: fix a typo

mergetool: Don't keep temporary merge files unless... Charles Bailey Fri, 12 Dec 2008 21:48:41 +0000 (21:48 +0000)

mergetool: Don't keep temporary merge files unless told to

This changes git mergetool to remove the temporary files used to invoke
the merge tool even if it returns non-zero.

This also adds a configuration option (mergetool.keepTemporaries) to
retain the previous behaviour if desired.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

mergetool: Add prompt to continue after failing to... Charles Bailey Fri, 12 Dec 2008 21:48:40 +0000 (21:48 +0000)

mergetool: Add prompt to continue after failing to merge a file

This option stops git mergetool from aborting at the first failed merge.
After a failed merge the user will be prompted to indicated whether he
wishes to continue with attempting to merge subsequent paths or to
abort.

This allows some additional use patterns. Merge conflicts can now be
previewed one at time and merges can also be skipped so that they can be
performed in a later pass.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-branch: display sha1 on branch deletionBrandon Casey Fri, 12 Dec 2008 23:20:07 +0000 (17:20 -0600)

git-branch: display sha1 on branch deletion

Make it easier to recover from a mistaken branch deletion by displaying the
sha1 of the branch's tip commit.

Update t3200 test to match the change in output.

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

git-config.txt: fix a typoJim Meyering Fri, 12 Dec 2008 09:00:41 +0000 (10:00 +0100)

git-config.txt: fix a typo

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

autodetect number of CPUs by default when using threadsNicolas Pitre Thu, 11 Dec 2008 20:36:47 +0000 (15:36 -0500)

autodetect number of CPUs by default when using threads

... and display the actual number of threads used when locally
repacking. A remote server still won't tell you how many threads it
uses during a fetch though.

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

Merge branch 'maint'Junio C Hamano Thu, 11 Dec 2008 08:36:31 +0000 (00:36 -0800)

Merge branch 'maint'

* maint:
fsck: reduce stack footprint
make sure packs to be replaced are closed beforehand

fsck: reduce stack footprintLinus Torvalds Thu, 11 Dec 2008 03:44:37 +0000 (19:44 -0800)

fsck: reduce stack footprint

The logic to mark all objects that are reachable from tips of refs were
implemented as a set of recursive functions. In a repository with a deep
enough history, this can easily eat up all the available stack space.

Restructure the code to require less stackspace by using an object array
to keep track of the objects that still need to be processed.

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

gitweb: cache $parent_commit info in git_blame()Jakub Narebski Thu, 11 Dec 2008 00:33:29 +0000 (01:33 +0100)

gitweb: cache $parent_commit info in git_blame()

Luben Tuikov changed 'lineno' link from leading to commit which gave
current version of given block of lines, to leading to parent of this
commit in 244a70e (Blame "linenr" link jumps to previous state at
"orig_lineno"). This made possible data mining using 'blame' view.

The current implementation calls rev-parse once per each blamed line
to find parent revision of blamed commit, even when the same commit
appears more than once, which is inefficient.

This patch mitigates this issue by caching $parent_commit info in
%metainfo, which makes gitweb call rev-parse only once per each
unique commit in the output from "git blame".

In the tables below you can see simple benchmark comparing gitweb
performance before and after this patch

File | L[1] | C[2] || Time0[3] | Before[4] | After[4]
====================================================================
blob.h | 18 | 4 || 0m1.727s | 0m2.545s | 0m2.474s
GIT-VERSION-GEN | 42 | 13 || 0m2.165s | 0m2.448s | 0m2.071s
README | 46 | 6 || 0m1.593s | 0m2.727s | 0m2.242s
revision.c | 1923 | 121 || 0m2.357s | 0m30.365s | 0m7.028s
gitweb/gitweb.perl | 6291 | 428 || 0m8.080s | 1m37.244s | 0m20.627s

File | L/C | Before/After
=========================================
blob.h | 4.5 | 1.03
GIT-VERSION-GEN | 3.2 | 1.18
README | 7.7 | 1.22
revision.c | 15.9 | 4.32
gitweb/gitweb.perl | 14.7 | 4.71

As you can see the greater ratio of lines in file to unique commits
in blame output, the greater gain from the new implementation.

Legend:

[1] Number of lines:
$ wc -l <file>
[2] Number of unique commits in the blame output:
$ git blame -p <file> | grep author-time | wc -l
[3] Time for running "git blame -p" (user time, single run):
$ time git blame -p <file> >/dev/null
[4] Time to run gitweb as Perl script from command line:
$ gitweb-run.sh "p=.git;a=blame;f=<file>" > /dev/null 2>&1

The gitweb-run.sh script includes slightly modified (with adjusted
pathnames) code from gitweb_run() function from the test script
t/t9500-gitweb-standalone-no-errors.sh; gitweb config file
gitweb_config.perl contents (again up to adjusting pathnames; in
particular $projectroot variable should point to top directory of git
repository) can be found in the same place.

Discussion
~~~~~~~~~~

A possible future improvement would be to open a bidi pipe to
"git cat-file --batch-check", (like in Git::Repo in gitweb caching by
Lea Wiemann), feed $long_rev^ to it, and parse its output, which is
in the following form:

926b07e694599d86cec668475071b32147c95034 commit 637

This would mean one call to git-cat-file for the whole 'blame' view,
instead of one call to git-rev-parse per each unique commit in blame
output.

Yet another solution would be to change use of validate_refname() to
validate_revision() when checking script parameters (CGI query or
path_info), with validate_revision being something like the following:

sub validate_revision {
my $rev = shift;
return validate_refname(strip_rev_suffixes($rev));
}

so we don't need to calculate $long_rev^, but can pass "$long_rev^" as
'hb' parameter.

This solution has the advantage that it can be easily adapted to future
incremental blame output.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add support for a pdf version of the user manualMiklos Vajna Wed, 10 Dec 2008 22:44:50 +0000 (23:44 +0100)

Add support for a pdf version of the user manual

Use dblatex in order to create a pdf version of the git user manual. No
existing Makefile targets (including "all") are touched, so you need to
explicitly say

make pdf
sudo make install-pdf

to get user-manual.pdf created and installed.

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

rebase: improve error messages about dirty stateJeff King Wed, 10 Dec 2008 09:25:19 +0000 (04:25 -0500)

rebase: improve error messages about dirty state

If you have unstaged changes in your working tree and try to
rebase, you will get the cryptic "foo: needs update"
message, but nothing else. If you have staged changes, you
get "your index is not up-to-date".

Let's improve this situation in two ways:

- for unstaged changes, let's also tell them we are
canceling the rebase, and why (in addition to the "needs
update" lines)

- for the staged changes case, let's use language that is a
little more clear to the user: their index contains
uncommitted changes

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

make sure packs to be replaced are closed beforehandNicolas Pitre Tue, 9 Dec 2008 19:26:52 +0000 (14:26 -0500)

make sure packs to be replaced are closed beforehand

Especially on Windows where an opened file cannot be replaced, make
sure pack-objects always close packs it is about to replace. Even on
non Windows systems, this could save potential bad results if ever
objects were to be read from the new pack file using offset from the old
index.

This should fix t5303 on Windows.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Tested-by: Johannes Sixt <j6t@kdbg.org> (MinGW)
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typo in comment in builtin-add.cAlexander Potashev Wed, 10 Dec 2008 22:27:44 +0000 (01:27 +0300)

Fix typo in comment in builtin-add.c

Reported-by: Tim Daly <daly@axiom-developer.org>
Signed-off-by: Alexander Potashev <aspotashev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Update Hungarian translation for 0.12Miklos Vajna Wed, 10 Dec 2008 14:03:13 +0000 (15:03 +0100)

git-gui: Update Hungarian translation for 0.12

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fixed typos in Swedish translation.Peter Krefting Wed, 10 Dec 2008 08:51:27 +0000 (09:51 +0100)

git-gui: Fixed typos in Swedish translation.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Fix t4031Junio C Hamano Wed, 10 Dec 2008 19:39:07 +0000 (11:39 -0800)

Fix t4031

When I tweaked the patch to use $SHELL_PATH instead of a hard-coded
"#!/bin/sh" to produce 3aa1f7c (diff: respect textconv in rewrite diffs,
2008-12-09), I screwed up. This should fix it.

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

gitweb: A bit of code cleanup in git_blame()Jakub Narebski Tue, 9 Dec 2008 22:48:51 +0000 (23:48 +0100)

gitweb: A bit of code cleanup in git_blame()

Among others, here are the highlights:

* move variable declaration closer to the place it is set and used,
if possible,

* uniquify and simplify coding style a bit, which includes removing
unnecessary '()'.

* check type only if $hash was defined, as otherwise from the way
git_get_hash_by_path() is called (and works), we know that it is
a blob,

* use modern calling convention for git-blame,

* remove unused variable,

* don't use implicit variables ($_),

* add some comments

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 10 Dec 2008 06:41:27 +0000 (22:41 -0800)

Merge branch 'maint'

* maint:
work around Python warnings from AsciiDoc
git-svn: Make following parents atomic

diff: respect textconv in rewrite diffsJeff King Tue, 9 Dec 2008 08:13:21 +0000 (03:13 -0500)

diff: respect textconv in rewrite diffs

Currently we just skip rewrite diffs for binary files; this
patch makes an exception for files which will be textconv'd,
and actually performs the textconv before generating the
diff.

Conceptually, rewrite diffs should be in the exact same
format as the a non-rewrite diff, except that we refuse to
share any context. Thus it makes very little sense for "git
diff" to show a textconv'd diff, but for "git diff -B" to
show "Binary files differ".

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

diff: fix handling of binary rewrite diffsJeff King Tue, 9 Dec 2008 08:12:28 +0000 (03:12 -0500)

diff: fix handling of binary rewrite diffs

The current emit_rewrite_diff code always writes a text patch without
checking whether the content is binary. This means that if you end up with
a rewrite diff for a binary file, you get lots of raw binary goo in your
patch.

Instead, if we have binary files, then let's just skip emit_rewrite_diff
altogether. We will already have shown the "dissimilarity index" line, so
it is really about the diff contents. If binary diffs are turned off, the
"Binary files a/file and b/file differ" message should be the same in
either case. If we do have binary patches turned on, there isn't much
point in making a less-efficient binary patch that does a total rewrite;
no human is going to read it, and since binary patches don't apply with
any fuzz anyway, the result of application should be the same.

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

gitweb: Move 'lineno' id from link to row element in... Jakub Narebski Tue, 9 Dec 2008 22:46:16 +0000 (23:46 +0100)

gitweb: Move 'lineno' id from link to row element in git_blame

Move l<line number> ID from <a> link element inside table row (inside
cell element for column with line numbers), to encompassing <tr> table
row element. It was done to make it easier to manipulate result HTML
with DOM, and to be able write 'blame_incremental' view with the same,
or nearly the same result.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document "git-reset --merge"Junio C Hamano Thu, 4 Dec 2008 02:00:12 +0000 (18:00 -0800)

Document "git-reset --merge"

The commit log message for the feature made it sound as if this is a saner
version of --mixed, but the use case presented makes it clear that it is a
better variant of --hard when your changes and somebody else's changes are
mixed together.

Perhaps we would want to rewrite the example that shows the use of --hard
not to talk about recovering from a failed merge?

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

Fix typos in documentationAlexander Potashev Tue, 9 Dec 2008 17:26:22 +0000 (20:26 +0300)

Fix typos in documentation

Signed-off-by: Alexander Potashev <aspotashev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Fix regression in p4Where method.Tor Arvid Lund Tue, 9 Dec 2008 15:41:50 +0000 (16:41 +0100)

git-p4: Fix regression in p4Where method.

Unfortunately, I introduced a bug in commit 7f705dc36 (git-p4: Fix bug in
p4Where method). This happens because sometimes the result from
"p4 where <somepath>" doesn't contain a "depotFile" key, but instead a
"data" key that needs further parsing. This commit should ensure that both
of these cases are checked.

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Improve language in git-merge.txt and related docsRalf Wildenhues Tue, 9 Dec 2008 06:23:51 +0000 (07:23 +0100)

Improve language in git-merge.txt and related docs

Improve some minor language and format issues like hyphenation,
phrases, spacing, word order, comma, attributes.

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

work around Python warnings from AsciiDocJunio C Hamano Mon, 8 Dec 2008 02:38:46 +0000 (18:38 -0800)

work around Python warnings from AsciiDoc

It appears that a reference to an anchor defined as [[anchor-name]] from
another place using <<anchor-name>> syntax, when the anchor name contains
a string "-with-" in its name, triggers these warnings from Python
interpreter.

asciidoc -b docbook -d book user-manual.txt
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6

There currently is no reference to "Finding comments with given content",
but for consistency and for futureproofing, the anchor is also updated as
the other ones that are actually used and trigger these warnings.

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

git-gui: Updated Swedish translation (515t0f0u).Peter Krefting Tue, 9 Dec 2008 15:26:46 +0000 (16:26 +0100)

git-gui: Updated Swedish translation (515t0f0u).

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git gui: update Italian translationMichele Ballabio Thu, 4 Dec 2008 17:28:21 +0000 (18:28 +0100)

git gui: update Italian translation

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Update Japanese translation for 0.12Nanako Shiraishi Tue, 9 Dec 2008 03:42:17 +0000 (12:42 +0900)

git-gui: Update Japanese translation for 0.12

Adds translation for one new message string.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Define linkgit macro in [macros] sectionAlexey Borzenkov Mon, 8 Dec 2008 18:29:09 +0000 (21:29 +0300)

Define linkgit macro in [macros] section

Starting with asciidoc 8.3.0 linkgit macro is no longer recognized by
asciidoc and user guide suggests
(http://www.methods.co.nz/asciidoc/userguide.html#_macro_definitions)
that macros are supposed to be defined in [macros] section. I'm not
sure whether undefined linkgit macro was working by pure chance or it
is a regression in asciidoc 8.3.0, but this patch adds proper
definition for the linkgit macro, allowing it to work on 8.3.0.

Signed-off-by: Alexey Borzenkov <snaury@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: Make following parents atomicDeskin Miller Mon, 8 Dec 2008 13:31:31 +0000 (08:31 -0500)

git-svn: Make following parents atomic

find_parent_branch generates branch@rev type branches when one has to
look back through SVN history to properly get the history for a branch
copied from somewhere not already being tracked by git-svn. If in the
process of fetching this history, git-svn is interrupted, then when one
fetches again, it will use whatever was last fetched as the parent
commit and fail to fetch any more history which it didn't get to before
being terminated. This is especially troubling in that different
git-svn copies of the same SVN repository can end up with different
commit sha1s, incorrectly showing the history as divergent and
precluding easy collaboration using git push and fetch.

To fix this, when we initialise the Git::SVN object $gs to search for
and perhaps fetch history, we check if there are any commits in SVN in
the range between the current revision $gs is at, and the top revision
for which we were asked to fill history. If there are commits we're
missing in that range, we continue the fetch from the current revision
to the top, properly getting all history before using it as the parent
for the branch we're trying to create.

Signed-off-by: Deskin Miller <deskinm@umich.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Starting translation for NorwegianFredrik Skolmli Mon, 8 Dec 2008 16:36:57 +0000 (17:36 +0100)

git-gui: Starting translation for Norwegian

This file have been used locally for some time, and is near
completion. Will put an effort into completing it later on,
or just leave it as an excercise for other Norwegians.

Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

gitweb: Fix bug in insert_file() subroutineJakub Narebski Mon, 8 Dec 2008 13:13:21 +0000 (14:13 +0100)

gitweb: Fix bug in insert_file() subroutine

In insert_file() subroutine (which is used to insert HTML fragments as
custom header, footer, hometext (for projects list view), and per
project README.html (for summary view)) we used:

map(to_utf8, <$fd>);

This doesn't work, and other form has to be used:

map { to_utf8($_) } <$fd>;

Now with test for t9600 added, for $GIT_DIR/README.html.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Update German (completed) translation.Christian Stimming Sat, 6 Dec 2008 20:22:16 +0000 (21:22 +0100)

git-gui: Update German (completed) translation.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Update po template to include 'Mirroring ... Shawn O. Pearce Mon, 8 Dec 2008 16:32:28 +0000 (08:32 -0800)

git-gui: Update po template to include 'Mirroring %s' message

A late addition to the message library.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fix commit encoding handling.Alexander Gavrilov Sat, 6 Dec 2008 17:24:35 +0000 (20:24 +0300)

git-gui: Fix commit encoding handling.

Commits without an encoding header are supposed to
be encoded in utf8. While this apparently hasn't always
been the case, currently it is the active convention, so
it is better to follow it; otherwise people who have to
use commitEncoding on their machines are unable to read
utf-8 commits made by others.

I also think that it is preferrable to display the warning
about an unsupported value of commitEncoding more prominently,
because this condition may lead to surprising behavior and,
eventually, to loss of data.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Fix handling of relative paths in blame.Alexander Gavrilov Sat, 6 Dec 2008 17:21:54 +0000 (20:21 +0300)

git-gui: Fix handling of relative paths in blame.

Currently using '..' or '.' in the file path for gui blame
causes it to break, because the path is passed inside the
SHA:PATH spec to cat-file, which apparently does not understand
such items. As a result, cat-file returns nothing, and the
viewer crashes because of an "index out of range" error.

This commit adds a simple function that normalizes such paths.
I choose not to use [file normalize], because it uses some data
from the file system, e.g. dereferences symlinks, and creates
an absolute path, while blame may be used to inspect historical
information that bears no relation to the current filesystem state.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

diff: allow turning on textconv explicitly for plumbingJeff King Mon, 8 Dec 2008 02:57:01 +0000 (21:57 -0500)

diff: allow turning on textconv explicitly for plumbing

Some history viewers use the diff plumbing to generate diffs
rather than going through the "git diff" porcelain.
Currently, there is no way for them to specify that they
would like to see the text-converted version of the diff.

This patch adds a "--textconv" option to allow such a
plumbing user to allow text conversion. The user can then
tell the viewer whether or not they would like text
conversion enabled.

While it may be tempting add a configuration option rather
than requiring each plumbing user to be configured to pass
--textconv, that is somewhat dangerous. Text-converted diffs
generally cannot be applied directly, so each plumbing user
should "opt in" to generating such a diff, either by
explicit request of the user or by confirming that their
output will not be fed to patch.

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

reorder ALLOW_TEXTCONV option settingJeff King Mon, 8 Dec 2008 02:54:17 +0000 (21:54 -0500)

reorder ALLOW_TEXTCONV option setting

Right now for the diff porcelain and the log family, we
call:

init_revisions();
setup_revisions();
DIFF_OPT_SET(ALLOW_TEXTCONV);

However, that means textconv will _always_ be on, instead of
being a default that can be manipulated with
setup_revisions. Instead, we want:

init_revisions();
DIFF_OPT_SET(ALLOW_TEXTCONV);
setup_revisions();

which is what this patch does.

We'll go ahead and move the callsite in wt-status, also;
even though the user can't pass any options here, it is a
cleanup that will help avoid any surprise later if the
setup_revisions line is changed.

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

read-cache.c: typofix in commentJunio C Hamano Sat, 6 Dec 2008 01:54:11 +0000 (17:54 -0800)

read-cache.c: typofix in comment

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

builtin-checkout.c: check error return from read_cache()Junio C Hamano Sat, 6 Dec 2008 01:54:10 +0000 (17:54 -0800)

builtin-checkout.c: check error return from read_cache()

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

Point "stale" 1.6.0.5 documentation from the main git... v1.6.1-rc2Junio C Hamano Mon, 8 Dec 2008 01:34:14 +0000 (17:34 -0800)

Point "stale" 1.6.0.5 documentation from the main git documentation page

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

Revert "git-stash: use git rev-parse -q"Junio C Hamano Mon, 8 Dec 2008 01:30:35 +0000 (17:30 -0800)

Revert "git-stash: use git rev-parse -q"

This reverts commit 757c7f60a78004fc3d0ea62f44320d54ef430c10 as an
unnecessary error message to pop up when the last stash entry is dropped.

It simply is not worth the aggravation.

Update draft release notes for 1.6.1Junio C Hamano Sun, 7 Dec 2008 23:06:38 +0000 (15:06 -0800)

Update draft release notes for 1.6.1

A handful of fixes have been backmerged to 'maint' and are now contained
in 1.6.0.X series as the result, so drop them from this document.

Also contains typofix and duplicate removal pointed out by
Bjørn Lindeijer and Jakub Narebski.

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

Merge branch 'maint'Junio C Hamano Sun, 7 Dec 2008 23:13:02 +0000 (15:13 -0800)

Merge branch 'maint'

* maint:
GIT 1.6.0.5
"git diff <tree>{3,}": do not reverse order of arguments
tag: delete TAG_EDITMSG only on successful tag
gitweb: Make project specific override for 'grep' feature work
http.c: use 'git_config_string' to get 'curl_http_proxy'
fetch-pack: Avoid memcpy() with src==dst

GIT 1.6.0.5 v1.6.0.5Junio C Hamano Sun, 7 Dec 2008 11:03:16 +0000 (03:03 -0800)

GIT 1.6.0.5

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

"git diff <tree>{3,}": do not reverse order of argumentsMatt McCutchen Sat, 11 Oct 2008 01:56:15 +0000 (21:56 -0400)

"git diff <tree>{3,}": do not reverse order of arguments

According to the message of commit 0fe7c1de16f71312e6adac4b85bddf0d62a47168,
"git diff" with three or more trees expects the merged tree first followed by
the parents, in order. However, this command reversed the order of its
arguments, resulting in confusing diffs. A comment /* Again, the revs are all
reverse */ suggested there was a reason for this, but I can't figure out the
reason, so I removed the reversal of the arguments. Test case included.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

tag: delete TAG_EDITMSG only on successful tagJeff King Sat, 6 Dec 2008 19:40:34 +0000 (14:40 -0500)

tag: delete TAG_EDITMSG only on successful tag

The user may put some effort into writing an annotated tag
message. When the tagging process later fails (which can
happen fairly easily, since it may be dependent on gpg being
correctly configured and used), there is no record left on
disk of the tag message.

Instead, let's keep the TAG_EDITMSG file around until we are
sure the tag has been created successfully. If we die
because of an error, the user can recover their text from
that file. Leaving the file in place causes no conflicts;
it will be silently overwritten by the next annotated tag
creation.

This matches the behavior of COMMIT_EDITMSG, which stays
around in case of error.

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

gitweb: Make project specific override for 'grep' featu... Jakub Narebski Sun, 7 Dec 2008 09:36:36 +0000 (10:36 +0100)

gitweb: Make project specific override for 'grep' feature work

The 'grep' feature was marked in the comments as having project
specific config, but it lacked 'sub' key required for it to work.

Kind-of-Noticed-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http.c: use 'git_config_string' to get 'curl_http_proxy'Miklos Vajna Sun, 7 Dec 2008 00:45:37 +0000 (01:45 +0100)

http.c: use 'git_config_string' to get 'curl_http_proxy'

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

fetch-pack: Avoid memcpy() with src==dstThomas Rast Sat, 6 Dec 2008 20:50:09 +0000 (21:50 +0100)

fetch-pack: Avoid memcpy() with src==dst

memcpy() may only be used for disjoint memory areas, but when invoked
from cmd_fetch_pack(), we have my_args == &args. (The argument cannot
be removed entirely because transport.c invokes with its own
variable.)

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

gitk: Fix bugs in blaming codePaul Mackerras Sat, 6 Dec 2008 10:44:05 +0000 (21:44 +1100)

gitk: Fix bugs in blaming code

The "show origin of this line" function wasn't working when gitk was
run in a subdirectory, since it passed the path relative to the
top-level directory to git blame. This fixes it by passing the
absolute path to the file instead of the relative path.

The same problem occurs when running git gui blame, except that
git gui blame appears not to be able to accept an absolute path to the
file, so we make a relative path using a new [make_relative] function.

Finally, this fixes a bug in [show_line_source] where we weren't
setting id, resulting in an error when trying to find the origin of
a line in the fake commit for local changes not checked in, when its
parent was a real commit (i.e. there were no changes checked in).

Signed-off-by: Paul Mackerras <paulus@samba.org>

Update draft release notes to 1.6.1Junio C Hamano Sat, 6 Dec 2008 04:02:55 +0000 (20:02 -0800)

Update draft release notes to 1.6.1

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

Merge branch 'jc/am-options'Junio C Hamano Sat, 6 Dec 2008 04:02:15 +0000 (20:02 -0800)

Merge branch 'jc/am-options'

* jc/am-options:
git-am: rename apply_opt_extra file to apply-opt
Test that git-am does not lose -C/-p/--whitespace options
git-am: propagate --3way options as well
git-am: propagate -C<n>, -p<n> options as well
git-am --whitespace: do not lose the command line option

git-am: rename apply_opt_extra file to apply-optJunio C Hamano Fri, 5 Dec 2008 19:19:43 +0000 (11:19 -0800)

git-am: rename apply_opt_extra file to apply-opt

All other state files use dash in their names, not underscores.
Also, there is no reason to call this "extra". Drop it.

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

Test that git-am does not lose -C/-p/--whitespace optionsJunio C Hamano Fri, 5 Dec 2008 01:08:48 +0000 (17:08 -0800)

Test that git-am does not lose -C/-p/--whitespace options

These tests make sure that "git am" does not lose command line options
specified when it was started, after it is interrupted by a patch that
does not apply earlier in the series.

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

git-am: propagate --3way options as wellJunio C Hamano Thu, 4 Dec 2008 23:38:27 +0000 (15:38 -0800)

git-am: propagate --3way options as well

The reasoning is the same as the previous patch, where we made -C<n>
and -p<n> propagate across a failure.

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

git-am: propagate -C<n>, -p<n> options as wellJunio C Hamano Thu, 4 Dec 2008 23:38:27 +0000 (15:38 -0800)

git-am: propagate -C<n>, -p<n> options as well

These options are meant to deal with patches that do not apply cleanly
due to the differences between the version the patch was based on and
the version "git am" is working on.

Because a series of patches applied in the same "git am" run tends to
come from the same source, it is more useful to propagate these options
after the application stops.

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

git-am --whitespace: do not lose the command line optionJunio C Hamano Thu, 4 Dec 2008 23:03:28 +0000 (15:03 -0800)

git-am --whitespace: do not lose the command line option

When you start "git am --whitespace=fix" and the patch application process
is interrupted by an unapplicable patch early in the series, after
fixing the offending patch, the remainder of the patch should be processed
still with --whitespace=fix when restarted with "git am --resolved" (or
dropping the offending patch with "git am --skip").

The breakage was introduced by the commit 67dad68 (add -C[NUM] to git-am,
2007-02-08); this should fix it.

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

git-p4: Fix bug in p4Where method.Tor Arvid Lund Thu, 4 Dec 2008 13:37:33 +0000 (14:37 +0100)

git-p4: Fix bug in p4Where method.

When running:

p4 where //depot/SomePath/...

The result can in some situations look like:

//depot/SomePath/... //client/SomePath/... /home/user/p4root/SomePath/...
-//depot/SomePath/UndesiredSubdir/... //client/SomePath/UndesiredSubdir/... /home/user/p4root/SomePath/UndesiredSubdir/...

This depends on the users Client view. The current p4Where method will now
return /home/user/p4root/SomePath/UndesiredSubdir/... which is not what we
want. This patch loops through the results from "p4 where", and picks the one
where the depotFile exactly matches the given depotPath (//depot/SomePath/...
in this example).

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Report symlink failures in merge-recursiveAlex Riesen Fri, 5 Dec 2008 00:39:14 +0000 (01:39 +0100)

Report symlink failures in merge-recursive

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>