gitweb.git
Tighten refspec processingDaniel Barkalow Tue, 18 Mar 2008 02:05:23 +0000 (22:05 -0400)

Tighten refspec processing

This changes the pattern matching code to not store the required final
/ before the *, and then to require each side to be a valid ref (or
empty). In particular, any refspec that looks like it should be a
pattern but doesn't quite meet the requirements will be found to be
invalid as a fallback non-pattern.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix possible Solaris problem in 'checkout_entry()'Linus Torvalds Mon, 17 Mar 2008 15:56:27 +0000 (08:56 -0700)

Fix possible Solaris problem in 'checkout_entry()'

Currently when checking out an entry "path", we try to unlink(2) it first
(because there could be stale file), and if there is a directory there,
try to deal with it (typically we run recursive rmdir). We ignore the
error return from this unlink because there may not even be any file
there.

However if you are root on Solaris, you can unlink(2) a directory
successfully and corrupt your filesystem.

This moves the code around and check the directory first, and then
unlink(2). Also we check the error code from it.

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

Fix read-tree not to discard errorsJunio C Hamano Wed, 19 Mar 2008 05:01:28 +0000 (22:01 -0700)

Fix read-tree not to discard errors

This fixes the issue identified with recently added tests to t1004

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

Add tests to catch problems with un-unlinkable symlinksJunio C Hamano Wed, 19 Mar 2008 04:59:39 +0000 (21:59 -0700)

Add tests to catch problems with un-unlinkable symlinks

This currently fails not because we refuse to check out, but because we
detect error but incorrectly discard it in the callchain.

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

Test: catch if trash cannot be removedJunio C Hamano Wed, 19 Mar 2008 04:58:01 +0000 (21:58 -0700)

Test: catch if trash cannot be removed

When your test creates an unwritable directory that test framework cannot
clean out by "rm -fr trash", later tests cannot start in a fresh state
they expect to. Detect this and error out early.

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

git-merge-one-file: fix longstanding stupid thinkoJunio C Hamano Mon, 17 Mar 2008 23:47:18 +0000 (16:47 -0700)

git-merge-one-file: fix longstanding stupid thinko

When a merge result creates a new file, and when our side already has a
file in the path, taking the merge result may clobber the untracked file.
However, the logic to detect this situation was totally the wrong way. We
should complain when the file exists, not when the file does not exist.

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

Merge branch 'jc/makefile'Junio C Hamano Mon, 17 Mar 2008 07:52:19 +0000 (00:52 -0700)

Merge branch 'jc/makefile'

* jc/makefile:
Makefile: flatten enumeration of headers, objects and programs
Makefile: DIFF_OBJS is not special at all these days

Don't update unchanged merge entriesLinus Torvalds Sun, 16 Mar 2008 18:42:50 +0000 (11:42 -0700)

Don't update unchanged merge entries

In commit 34110cd4e394e3f92c01a4709689b384c34645d8 ("Make 'unpack_trees()'
have a separate source and destination index") I introduced a really
stupid bug in that it would always add merged entries with the CE_UPDATE
flag set. That caused us to always re-write the file, even when it was
already up-to-date in the source index.

Not only is that really stupid from a performance angle, but more
importantly it's actively wrong: if we have dirty state in the tree when
we merge, overwriting it with the result of the merge will incorrectly
overwrite that dirty state.

This trivially fixes the problem - simply don't set the CE_UPDATE flag
when the merge result matches the old state.

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

fast-import: Allow "reset" to delete a new branch witho... Eyvind Bernhardsen Sun, 16 Mar 2008 19:49:09 +0000 (20:49 +0100)

fast-import: Allow "reset" to delete a new branch without error

Creating a branch in fast-import and then resetting it without making
any further commits to it currently causes an error message at the
end of the import.

This error is triggered by cvs2svn's git backend, which uses a
temporary fixup branch when it creates tags, because the fixup branch
is reset after each tag.

This patch prevents the error, allowing "reset" to be used to delete
temporary branches.

Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
Acked-by: Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t1000: use "test_must_fail git frotz", not "! git frotz"Junio C Hamano Sun, 16 Mar 2008 21:13:04 +0000 (14:13 -0700)

t1000: use "test_must_fail git frotz", not "! git frotz"

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

Update draft release notes for 1.5.5 v1.5.5-rc0Junio C Hamano Sun, 16 Mar 2008 06:59:29 +0000 (23:59 -0700)

Update draft release notes for 1.5.5

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

Resurrect git-rerere to contrib/examplesJunio C Hamano Sun, 16 Mar 2008 06:58:10 +0000 (23:58 -0700)

Resurrect git-rerere to contrib/examples

It is handy to have a copy readily available for checking regressions.

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

Merge branch 'maint'Junio C Hamano Sun, 16 Mar 2008 08:03:16 +0000 (01:03 -0700)

Merge branch 'maint'

* maint:
Start draft ReleaseNotes for 1.5.4.5
rebase -m: do not trigger pre-commit verification

Conflicts:

RelNotes

Start draft ReleaseNotes for 1.5.4.5Junio C Hamano Sun, 16 Mar 2008 06:29:28 +0000 (23:29 -0700)

Start draft ReleaseNotes for 1.5.4.5

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

rebase -m: do not trigger pre-commit verificationJunio C Hamano Sun, 16 Mar 2008 07:50:22 +0000 (00:50 -0700)

rebase -m: do not trigger pre-commit verification

When rebasing changes that contain issues that the pre-commit hook flags
as problematic, the rebase cannot be continued. However, rebase is about
transplanting commits that are already made with as little distortion as
possible, and pre-commit check should not interfere.

Earlier, c5b09fe (Avoid update hook during git-rebase --interactive,
2007-12-19) fixed "rebase -i", but "rebase -m" shared the same issue.

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

Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano Sun, 16 Mar 2008 06:07:54 +0000 (23:07 -0700)

Merge branch 'master' of git://repo.or.cz/git-gui

* 'master' of git://repo.or.cz/git-gui:
git-gui: Improve directions regarding POT update in po/README
git-gui: Update Japanese translation
git-gui: Adjusted Japanese translation to updated POT
git-gui: Update Japanese translation
git-gui: Don't translate the special Apple menu
git-gui: Updated Hungarian translation (e5fba18)
git-gui: update russian translation
git-gui: remove spurious "fuzzy" attributes in po/it.po
git-gui: updated Swedish translation
git-gui: Regenerated po template and merged translations with it
Update Hungarian translation. 100% completed.
git-gui: update Italian translation

git-gui: Improve directions regarding POT update in... Junio C Hamano Sat, 15 Mar 2008 07:43:34 +0000 (00:43 -0700)

git-gui: Improve directions regarding POT update in po/README

Keeping POT up to date relative to the software is absolutely
necessary. What is unwarranted is updating language files at
the same time by running msgmerge without checking if there is
any outstanding translation work first. If we assume that the
translators do not have access to msgmerge, that is a good service
to them (the less they have to do, the better), but otherwise,
it is better to be leave po/${language}.po files alone.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Update Japanese translationしらいしななこ Sat, 15 Mar 2008 11:12:00 +0000 (20:12 +0900)

git-gui: Update Japanese translation

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

Redo "add test_cmp function for test scripts"Junio C Hamano Sat, 15 Mar 2008 08:23:26 +0000 (01:23 -0700)

Redo "add test_cmp function for test scripts"

We had a handful test updates since we accepted 82ebb0b (add test_cmp
function for test scripts). This fixes them up.

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

Merge branch 'jk/portable'Junio C Hamano Sat, 15 Mar 2008 08:10:53 +0000 (01:10 -0700)

Merge branch 'jk/portable'

* jk/portable:
t6000lib: re-fix tr portability
t7505: use SHELL_PATH in hook
t9112: add missing #!/bin/sh header
filter-branch: use $SHELL_PATH instead of 'sh'
filter-branch: don't use xargs -0
add NO_EXTERNAL_GREP build option
t6000lib: tr portability fix
t4020: don't use grep -a
add test_cmp function for test scripts
remove use of "tail -n 1" and "tail -1"
grep portability fix: don't use "-e" or "-q"
more tr portability test script fixes
t0050: perl portability fix
tr portability fixes

Merge branch 'py/submodule'Junio C Hamano Sat, 15 Mar 2008 08:10:44 +0000 (01:10 -0700)

Merge branch 'py/submodule'

* py/submodule:
git-submodule summary: fix that some "wc" flavors produce leading spaces
git-submodule summary: test
git-submodule summary: documentation
git-submodule summary: limit summary size
git-submodule summary: show commit summary
git-submodule summary: code framework

Merge branch 'db/diff-to-fp'Junio C Hamano Sat, 15 Mar 2008 08:10:38 +0000 (01:10 -0700)

Merge branch 'db/diff-to-fp'

* db/diff-to-fp:
wt-status.c: no need for dup() dance anymore
Write diff output to a file in struct diff_options

Merge branch 'cc/help'Junio C Hamano Sat, 15 Mar 2008 08:10:32 +0000 (01:10 -0700)

Merge branch 'cc/help'

* cc/help:
Documentation/git-help: typofix
help: warn if specified 'man.viewer' is unsupported, instead of erroring out
Documentation: help: explain 'man.viewer' multiple values
help: implement multi-valued "man.viewer" config option
Documentation: help: describe 'man.viewer' config variable
help: add "man.viewer" config var to use "woman" or "konqueror"

shortlog: do not require to run from inside a git repos... Jonas Fonseca Fri, 14 Mar 2008 21:35:24 +0000 (22:35 +0100)

shortlog: do not require to run from inside a git repository

Once upon a time shortlog could be run from a non-git directory
and still do its job. Fix this regression and add a small test
for it.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sat, 15 Mar 2008 07:09:20 +0000 (00:09 -0700)

Merge branch 'maint'

* maint:
format-patch: generate MIME header as needed even when there is format.header

format-patch: generate MIME header as needed even when... Junio C Hamano Sat, 15 Mar 2008 00:10:09 +0000 (17:10 -0700)

format-patch: generate MIME header as needed even when there is format.header

Earlier, the callchain from pretty_print_commit() down to pp_title_line()
had an unwarranted assumption that the presense of "after_subject"
parameter, means the caller has already output MIME headers for
attachments. The parameter's primary purpose is to give extra header
lines the caller wants to place after pp_title_line() generates the
"Subject: " line.

This assumption does not hold when the user used the format.header
configuration variable to pass extra headers, and caused a message with
non-ASCII character to lack proper MIME headers (e.g. 8-bit CTE header).
The earlier logic also failed to suppress duplicated MIME headers when
"format-patch -s --attach" is asked for and the signer's name demanded
8-bit clean transport.

This patch fixes the logic by introducing a separate need_8bit_cte
parameter passed down the callchain. This can have one of these values:

-1 : we've already done MIME crap and we do not want to add extra header
to say this is 8bit in pp_title_line();

0 : we haven't done MIME and we have not seen anything that is 8bit yet;

1 : we haven't done MIME and we have seen something that is 8bit;
pp_title_line() must add MIME header.

It adds two tests by Jeff King who independently diagnosed this issue.

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

Merge branch 'maint'Junio C Hamano Sat, 15 Mar 2008 07:05:40 +0000 (00:05 -0700)

Merge branch 'maint'

* maint:
Make man page building quiet when DOCBOOK_XSL_172 is defined
git-new-workdir: Share SVN meta data between work dirs and the repository
rev-parse: fix meaning of rev~ vs rev~0.
git-svn: don't blindly append '*' to branch/tags config

Make man page building quiet when DOCBOOK_XSL_172 is... Jonas Fonseca Fri, 14 Mar 2008 21:38:18 +0000 (22:38 +0100)

Make man page building quiet when DOCBOOK_XSL_172 is defined

Tell xmlto to repress printing of the lines:

Note: meta date : No date. Using generated date git-xyx
Note: Writing git-xyz.1

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-new-workdir: Share SVN meta data between work dirs... Bernt Hansen Sat, 15 Mar 2008 02:44:13 +0000 (22:44 -0400)

git-new-workdir: Share SVN meta data between work dirs and the repository

Multiple work dirs with git svn caused each work dir to have its own
stale copy of the SVN meta data in .git/svn

git svn rebase updates commits with git-svn-id: in the repository and
stores the SVN meta data information only in that work dir. Attempting to
git svn rebase in other work dirs for the same branch would fail because
the last revision fetched according to the git-svn-id is greater than the
revision in the SVN meta data for that work directory.

Signed-off-by: Bernt Hansen <bernt@norang.ca>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix recent 'unpack_trees()'-related changes breaking... Linus Torvalds Sat, 15 Mar 2008 04:20:41 +0000 (21:20 -0700)

Fix recent 'unpack_trees()'-related changes breaking 'git stash'

On Sat, 15 Mar 2008, SZEDER G?bor wrote:
>
> The testcase usually fails during the first 25 run, but sometimes it
> runs more than 100 times before failing.

Damn, this series has had more subtle issues than I ever expected.

'git stash' creates its saved working tree object with:

# state of the working tree
w_tree=$( (
rm -f "$TMP-index" &&
cp -p ${GIT_INDEX_FILE-"$GIT_DIR/index"} "$TMP-index" &&
GIT_INDEX_FILE="$TMP-index" &&
export GIT_INDEX_FILE &&
git read-tree -m $i_tree &&
git add -u &&
git write-tree &&
rm -f "$TMP-index"
) ) ||
die "Cannot save the current worktree state"

which creates a new index file with the updates, and writes the tree from
that.

We have this logic where we compare the timestamp of the index with the
timestamp of the files and we then write them out "smudged" if they are
the same, and it basically depends on the fact that the date on the index
file is compared with the date encoded in the stat information itself.

And what is going on is:

- we create a new index file with that "cp". We are careful to preserve
the timestamps by using "-p", so this one should be all ok.

- then we *update* that index by resetting it to the tree with git
read-tree, but now we do *not* preserve the timestamp on this new copy
any more, even though we copy over all the timestamps on the files that
are indexed from the stat information!

Now, we always had that problem when re-writing the index, but we had this
clever workaround in the writing part: if the source had racily clean
entries, then when we wrote those out (and thus can't depend on the index
fiel timestamp showing that they are racily clean any more!), we would
smudge them when writing.

IOW, we handle this issue by having write_index() do this:

for (i = 0; i < entries; i++) {
...
if (is_racy_timestamp(istate, ce))
ce_smudge_racily_clean_entry(ce);
..

when writing out entries. And that all took care of it, because now when
we wrote the new index, we'd change the timestamp on the index, yes, but
we'd smudge the entries we wrote out, so now the resulting index would
still show that file as not-up-to-date any more.

But with commit 34110cd4e394e3f92c01a4709689b384c34645d8 ("Make
'unpack_trees()' have a separate source and destination index"), this
logic no longer triggers, because we now write out the "result" index, and
that one never got its timestamp updated from the source index, so it had
lost all that "is_racy_timestamp()" information!

This trivial patch fixes it. It looks trivial, and it's a simple fix, but
boy did it take me way too much thinking and explaining to myself to
explain why there was a problem in the first place!

The trivial fix is to just copy the index timestamp from the source index
into the result index. But we only do this if we *have* a source index, of
course, and if we will even bother to use the result.

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

git-gui: Adjusted Japanese translation to updated POTShawn O. Pearce Sat, 15 Mar 2008 06:22:41 +0000 (02:22 -0400)

git-gui: Adjusted Japanese translation to updated POT

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

git-gui: Update Japanese translationしらいしななこ Fri, 14 Mar 2008 13:03:21 +0000 (22:03 +0900)

git-gui: Update Japanese translation

I updated Japanese translation for the latest git-gui.

Signed-off-by: しらいしななこ <nanako3@bluebottle.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Don't translate the special Apple menuShawn O. Pearce Sat, 15 Mar 2008 05:11:08 +0000 (01:11 -0400)

git-gui: Don't translate the special Apple menu

Peter Karlsson pointed out there is no value in translating the
string "Apple", as this is used as the dummy label for the Apple
menu on Mac OS X systems.

The Apple menu is actually not the menu with the Apple corporate
logo, but the menu next to it, which shows the name of the
application and is typically called the application menu. Most users
of git-gui see this menu titled as "Git Gui". The actual label of
this menu comes from our Info.plist file and cannot be specified
by any other means. Translating this string in the Tcl PO files
is not necessary.

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

git-gui: Updated Hungarian translation (e5fba18)Miklos Vajna Fri, 14 Mar 2008 16:28:53 +0000 (17:28 +0100)

git-gui: Updated Hungarian translation (e5fba18)

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

git-gui: update russian translationAlex Riesen Fri, 14 Mar 2008 22:25:57 +0000 (23:25 +0100)

git-gui: update russian translation

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: remove spurious "fuzzy" attributes in po/it.poMichele Ballabio Fri, 14 Mar 2008 20:59:52 +0000 (21:59 +0100)

git-gui: remove spurious "fuzzy" attributes in po/it.po

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

rev-parse: fix meaning of rev~ vs rev~0.Linus Torvalds Fri, 14 Mar 2008 18:49:40 +0000 (11:49 -0700)

rev-parse: fix meaning of rev~ vs rev~0.

I think it would make more sense for rev~ to have the same guarantees that
rev^ has, namely to always return a commit. I would also suggest that not
giving a number would have the same effect of defaulting to 1, not 0.

Right now it's a bit illogical, but at least it's an _undocumented_
illogical behaviour.

This patch makes '^' and '~' act the same for the default count (i.e. both
default to 1), and also have the same behaviour for a count of zero.

Before (no discernible pattern):

[torvalds@woody git]$ git rev-parse v1.5.1 v1.5.1^0 v1.5.1~0 v1.5.1^ v1.5.1~
45354a57ee7e3e42c7137db6c94fa968c6babe8d
89815cab95268e8f0f58142b848ac4cd5e9cbdcb
45354a57ee7e3e42c7137db6c94fa968c6babe8d
045f5759c97746589a067461e50fad16f60711ac
45354a57ee7e3e42c7137db6c94fa968c6babe8d

After (fairly logical):

[torvalds@woody git]$ git rev-parse v1.5.1 v1.5.1^0 v1.5.1~0 v1.5.1^ v1.5.1~
45354a57ee7e3e42c7137db6c94fa968c6babe8d
89815cab95268e8f0f58142b848ac4cd5e9cbdcb
89815cab95268e8f0f58142b848ac4cd5e9cbdcb
045f5759c97746589a067461e50fad16f60711ac
045f5759c97746589a067461e50fad16f60711ac

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

git-svn: don't blindly append '*' to branch/tags configEric Wong Fri, 14 Mar 2008 18:01:23 +0000 (11:01 -0700)

git-svn: don't blindly append '*' to branch/tags config

Previously, git-svn would blindly append '*' even if it was specified by
the user during initialization (for certain SVN setups, it is
necessary).

Now, the following command will work correctly:

git svn init -T trunk/docutils \
-t 'tags/*/docutils' \
-b 'branches/*/docutils' \
svn://svn.berlios.de/docutils

Thanks to martin f krafft for the bug report:
> My git-svn target configuration is
>
> [svn-remote "svn"]
> url = svn://svn.berlios.de/docutils
> fetch = trunk/docutils:refs/remotes/trunk
> branches = branches/*/docutils:refs/remotes/*
> tags = tags/*/docutils:refs/remotes/tags/*
>
> Unfortunately, when I run
>
> git-svn init -T trunk/docutils -t 'tags/*/docutils'
> -b 'branches/*/docutils'
>
> then I get (note the two asterisks on the left hand side):
>
> branches = branches/*/docutils/*:refs/remotes/*
> tags = tags/*/docutils/*:refs/remotes/tags/*
>
> I took a brief stab at the code but I can't even figure out where
> the /* is appended, so I defer to you.
>
> It should be trivial to keep git-svn from appending /* if the left
> side already contains an asterisk.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Tested-by: martin f krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t6000lib: re-fix tr portabilityJeff King Sat, 15 Mar 2008 00:32:33 +0000 (20:32 -0400)

t6000lib: re-fix tr portability

It seems that some implementations of tr don't like a
replacement string of '-----...'; they try to find the
double-dash option "---...".

Instead of this pipeline of tr and sed invocations, just use a
single perl invocation.

Signed-off-by: Jeff King <peff@peff.net>

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Sat, 15 Mar 2008 00:49:40 +0000 (17:49 -0700)

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

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: initial Italian translation
gitk: Default to using po2msg.sh if msgfmt doesn't grok --tcl, -l and -d
gitk: Avoid Tcl error when switching views
[PATCH] gitk: Don't show local changes when we there is no work tree
[PATCH] gitk: Add horizontal scrollbar to the diff view
[PATCH] gitk: make autoselect optional
[PATCH] gitk: Mark another string for translation
[PATCH] Add an --argscmd flag to get the list of refs to show
gitk: Only restore window size from ~/.gitk, not position

gitk: initial Italian translationMichele Ballabio Thu, 13 Mar 2008 16:46:30 +0000 (17:46 +0100)

gitk: initial Italian translation

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Default to using po2msg.sh if msgfmt doesn't... Paul Mackerras Fri, 14 Mar 2008 09:24:31 +0000 (20:24 +1100)

gitk: Default to using po2msg.sh if msgfmt doesn't grok --tcl, -l and -d

This is a similar change to that submitted by Junio C Hamano for
git-gui. It tests whether the msgfmt command can be run successfully
with --tcl, -l and -d, and if not, falls back to using po/po2msg.sh.

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

wt-status.c: no need for dup() dance anymoreKristian Høgsberg Mon, 10 Mar 2008 17:58:26 +0000 (13:58 -0400)

wt-status.c: no need for dup() dance anymore

Now we can generate diff to a file descriptor, we do not have to
dup() the stdout around when writing the status output.

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

Write diff output to a file in struct diff_optionsDaniel Barkalow Mon, 10 Mar 2008 02:43:39 +0000 (22:43 -0400)

Write diff output to a file in struct diff_options

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documention: web--browse: add info about "browser.... Christian Couder Fri, 14 Mar 2008 04:56:53 +0000 (05:56 +0100)

Documention: web--browse: add info about "browser.<tool>.cmd" config var

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

web--browse: use custom commands defined at config... Christian Couder Fri, 14 Mar 2008 04:56:49 +0000 (05:56 +0100)

web--browse: use custom commands defined at config time

Currently "git web--browse" is restricted to a set of commands defined
in the script. You can subvert the "browser.<tool>.path" to force "git
web--browse" to use a different command, but if you have a command
whose invocation syntax does not match one of the current tools then
you would have to write a wrapper script for it.

This patch adds a git config variable "browser.<tool>.cmd" which
allows a more flexible browser choice.

If you run "git web--browse" with -t/--tool, -b/--browser or the
"web.browser" config variable set to an unrecognized tool then "git
web--browse" will query the "browser.<tool>.cmd" config variable. If
this variable exists, then "git web--browse" will treat the specified
tool as a custom command and will use a shell eval to run the command
with the URLs added as extra parameters.

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

Merge branch 'mr/autoconf-fread'Junio C Hamano Fri, 14 Mar 2008 07:27:59 +0000 (00:27 -0700)

Merge branch 'mr/autoconf-fread'

* mr/autoconf-fread:
autoconf: Test FREAD_READS_DIRECTORIES

Merge branch 'maint'Junio C Hamano Fri, 14 Mar 2008 07:16:42 +0000 (00:16 -0700)

Merge branch 'maint'

* maint:
merge-file: handle empty files gracefully
merge-recursive: handle file mode changes
Minor wording changes in the keyboard descriptions in git-add --interactive.
git fetch: Take '-n' to mean '--no-tags'
quiltimport: fix misquoting of parsed -p<num> parameter
git-quiltimport: better parser to grok "enhanced" series files.

Merge branch 'ph/maint-quiltimport' into maintJunio C Hamano Fri, 14 Mar 2008 07:16:26 +0000 (00:16 -0700)

Merge branch 'ph/maint-quiltimport' into maint

* ph/maint-quiltimport:
quiltimport: fix misquoting of parsed -p<num> parameter
git-quiltimport: better parser to grok "enhanced" series files.

read-tree() and unpack_trees(): use consistent limitJunio C Hamano Fri, 14 Mar 2008 05:07:18 +0000 (22:07 -0700)

read-tree() and unpack_trees(): use consistent limit

read-tree -m can read up to MAX_TREES, which was arbitrarily set to 8 since
August 2007 (4 is needed to deal with 2 merge-base case).

However, the updated unpack_trees() code had an advertised limit of 4
(which it enforced). In reality the code was prepared to take only 3
trees and giving 4 caused it to stomp on its stack. Rename the MAX_TREES
constant to MAX_UNPACK_TREES, move it to the unpack-trees.h common header
file, and use it from both places to avoid future confusion.

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

merge-file: handle empty files gracefullyJohannes Schindelin Thu, 13 Mar 2008 15:19:35 +0000 (16:19 +0100)

merge-file: handle empty files gracefully

Earlier, it would error out while trying to read and/or writing them.
Now, calling merge-file with empty files is neither interesting nor
useful, but it is a bug that needed fixing.

Noticed by Clemens Buchacher.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

merge-recursive: handle file mode changesClemens Buchacher Thu, 13 Mar 2008 22:47:41 +0000 (23:47 +0100)

merge-recursive: handle file mode changes

File mode changes should be handled similarly to changes of content.
That is, if the file mode changed in only one branch, keep the changed
version, and if both branch changed to different mode, mark it as a
conflict.

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

git-gui: updated Swedish translationPeter Karlsson Fri, 14 Mar 2008 06:36:44 +0000 (02:36 -0400)

git-gui: updated Swedish translation

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

git-gui: Regenerated po template and merged translation... Peter Karlsson Fri, 14 Mar 2008 06:36:18 +0000 (02:36 -0400)

git-gui: Regenerated po template and merged translations with it

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

pack-objects: proper pack time stamping with --max... Nicolas Pitre Thu, 13 Mar 2008 18:59:29 +0000 (14:59 -0400)

pack-objects: proper pack time stamping with --max-pack-size

Runtime pack access is done in the pack file mtime order since recent
packs are more likely to contain frequently used objects than old packs.
However the --max-pack-size option can produce multiple packs with mtime
in the reversed order as newer objects are always written first.

Let's modify mtime of later pack files (when any) so they appear older
than preceding ones when a repack creates multiple packs.

Signed-off-by: Nicolas Pitre <nico@cam.org>

Minor wording changes in the keyboard descriptions... Vineet Kumar Thu, 13 Mar 2008 18:32:16 +0000 (11:32 -0700)

Minor wording changes in the keyboard descriptions in git-add --interactive.

The wording of the interactive help text from git-add--interactive.perl is
clearer. Just duplicate that text here.

Signed-off-by: Vineet Kumar <vineet@doorstop.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-help: typofixJunio C Hamano Fri, 14 Mar 2008 02:15:30 +0000 (19:15 -0700)

Documentation/git-help: typofix

Noticed by Xavier Maillard

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

Update Hungarian translation. 100% completed.Miklos Vajna Thu, 13 Mar 2008 12:31:10 +0000 (13:31 +0100)

Update Hungarian translation. 100% completed.

t7505: use SHELL_PATH in hookJeff King Wed, 12 Mar 2008 21:42:43 +0000 (17:42 -0400)

t7505: use SHELL_PATH in hook

The hook doesn't run properly under Solaris /bin/sh. Let's
use the SHELL_PATH the user told us about already instead.

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

t9112: add missing #!/bin/sh headerJeff King Wed, 12 Mar 2008 21:42:15 +0000 (17:42 -0400)

t9112: add missing #!/bin/sh header

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

filter-branch: use $SHELL_PATH instead of 'sh'Jeff King Wed, 12 Mar 2008 21:41:39 +0000 (17:41 -0400)

filter-branch: use $SHELL_PATH instead of 'sh'

On some systems, 'sh' isn't very friendly. In particular,
t7003 fails on Solaris because it doesn't understand $().
Instead, use the specified SHELL_PATH to run shell code.

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

filter-branch: don't use xargs -0Jeff King Wed, 12 Mar 2008 21:41:02 +0000 (17:41 -0400)

filter-branch: don't use xargs -0

Some versions of xargs don't understand "-0"; fortunately in
this case we can get the same effect by using "git clean".

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

add NO_EXTERNAL_GREP build optionJeff King Wed, 12 Mar 2008 21:39:16 +0000 (17:39 -0400)

add NO_EXTERNAL_GREP build option

Previously, we just chose whether to allow external grep
based on the __unix__ define. However, there are systems
which define this macro but which have an inferior group
(e.g., one that does not support all options used by t7002).
This allows users to accept the potential speed penalty to
get a more consistent grep experience (and to pass the
testsuite).

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

t6000lib: tr portability fixJeff King Wed, 12 Mar 2008 21:38:31 +0000 (17:38 -0400)

t6000lib: tr portability fix

Some versions of tr complain if the number of characters in
both sets isn't the same. So here we must manually expand
the dashes in set2.

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

t4020: don't use grep -aJeff King Wed, 12 Mar 2008 21:37:37 +0000 (17:37 -0400)

t4020: don't use grep -a

Solaris /usr/bin/grep doesn't understand "-a". In this case
we can just include the expected output with the test, which
is a better test anyway.

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

add test_cmp function for test scriptsJeff King Wed, 12 Mar 2008 21:36:36 +0000 (17:36 -0400)

add test_cmp function for test scripts

Many scripts compare actual and expected output using
"diff -u". This is nicer than "cmp" because the output shows
how the two differ. However, not all versions of diff
understand -u, leading to unnecessary test failure.

This adds a test_cmp function to the test scripts and
switches all "diff -u" invocations to use it. The function
uses the contents of "$GIT_TEST_CMP" to compare its
arguments; the default is "diff -u".

On systems with a less-capable diff, you can do:

GIT_TEST_CMP=cmp make test

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

remove use of "tail -n 1" and "tail -1"Jeff King Wed, 12 Mar 2008 21:34:34 +0000 (17:34 -0400)

remove use of "tail -n 1" and "tail -1"

The "-n" syntax is not supported by System V versions of
tail (which prefer "tail -1"). Unfortunately "tail -1" is
not actually POSIX. We had some of both forms in our
scripts.

Since neither form works everywhere, this patch replaces
both with the equivalent sed invocation:

sed -ne '$p'

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

grep portability fix: don't use "-e" or "-q"Jeff King Wed, 12 Mar 2008 21:32:17 +0000 (17:32 -0400)

grep portability fix: don't use "-e" or "-q"

System V versions of grep (such as Solaris /usr/bin/grep)
don't understand either of these options. git's usage of
"grep -e pattern" fell into one of two categories:

1. equivalent to "grep pattern". -e is only useful here if
the pattern begins with a "-", but all of the patterns
are hardcoded and do not begin with a dash.

2. stripping comments and blank lines with

grep -v -e "^$" -e "^#"

We can fortunately do this in the affirmative as

grep '^[^#]'

Uses of "-q" can be replaced with redirection to /dev/null.
In many tests, however, "grep -q" is used as "if this string
is in the expected output, we are OK". In this case, it is
fine to just remove the "-q" entirely; it simply makes the
"verbose" mode of the test slightly more verbose.

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

more tr portability test script fixesJeff King Wed, 12 Mar 2008 21:31:06 +0000 (17:31 -0400)

more tr portability test script fixes

Dealing with NULs is not always safe with tr. On Solaris,
incoming NULs are silently deleted by both the System V and
UCB versions of tr. When converting to NULs, the System V
version works fine, but the UCB version silently ignores the
request to convert the character.

This patch changes all instances of tr using NULs to use
"perl -pe 'y///'" instead.

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

t0050: perl portability fixJeff King Wed, 12 Mar 2008 21:30:10 +0000 (17:30 -0400)

t0050: perl portability fix

Older versions of perl (such as 5.005) don't understand -CO, nor
do they understand the "U" pack specifier. Instead of using perl,
let's just printf the binary bytes we are interested in.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git fetch: Take '-n' to mean '--no-tags'Johannes Schindelin Thu, 13 Mar 2008 07:13:15 +0000 (08:13 +0100)

git fetch: Take '-n' to mean '--no-tags'

Prior to commit 8320199 (Rewrite builtin-fetch option parsing to use
parse_options().), we understood '-n' as a short option to mean "don't
fetch tags from the remote". This patch reinstates behaviour similar,
but not identical to the pre commit 8320199 times.

Back then, -n always overrode --tags, so if both --tags and -n was
given on command-line, no tags were fetched regardless of argument
ordering. Now we use a "last entry wins" strategy, so '-n --tags'
means "fetch tags".

Since it's patently absurd to say both --tags and --no-tags, this
shouldn't matter in practice.

Spotted-by: Artem Zolochevskiy <azol@altlinux.org>
Reported-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 13 Mar 2008 06:47:31 +0000 (23:47 -0700)

Merge branch 'maint'

* maint:
git-cvsimport: fix merging with remote parent branch
gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' form

gc: call "prune --expire 2.weeks.ago" by defaultJohannes Schindelin Wed, 12 Mar 2008 20:55:47 +0000 (21:55 +0100)

gc: call "prune --expire 2.weeks.ago" by default

The only reason we did not call "prune" in git-gc was that it is an
inherently dangerous operation: if there is a commit going on, you will
prune loose objects that were just created, and are, in fact, needed by the
commit object just about to be created.

Since it is dangerous, we told users so. That led to many users not even
daring to run it when it was actually safe. Besides, they are users, and
should not have to remember such details as when to call git-gc with
--prune, or to call git-prune directly.

Of course, the consequence was that "git gc --auto" gets triggered much
more often than we would like, since unreferenced loose objects (such as
left-overs from a rebase or a reset --hard) were never pruned.

Alas, git-prune recently learnt the option --expire <minimum-age>, which
makes it a much safer operation. This allows us to call prune from git-gc,
with a grace period of 2 weeks for the unreferenced loose objects (this
value was determined in a discussion on the git list as a safe one).

If you want to override this grace period, just set the config variable
gc.pruneExpire to a different value; an example would be

[gc]
pruneExpire = 6.months.ago

or even "never", if you feel really paranoid.

Note that this new behaviour makes "--prune" be a no-op.

While adding a test to t5304-prune.sh (since it really tests the implicit
call to "prune"), also the original test for "prune --expire" was moved
there from t1410-reflog.sh, where it did not belong.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Documentation/config: typofixJunio C Hamano Thu, 13 Mar 2008 06:11:15 +0000 (23:11 -0700)

Documentation/config: typofix

Each heading of enumerated list should end with double-colon, not single.

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

help: warn if specified 'man.viewer' is unsupported... Christian Couder Thu, 13 Mar 2008 06:10:40 +0000 (07:10 +0100)

help: warn if specified 'man.viewer' is unsupported, instead of erroring out

When a document viewer that is unknown to the current version of git is
specified in the .git/config file, instead of erroring out the process
entirely, just issue a warning. It might be that the user usually is
using a newer git that supports it (and the configuration is written for
that version) but is temporarily using an older git that does not know the
viewer.

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

Documentation: help: explain 'man.viewer' multiple... Christian Couder Thu, 13 Mar 2008 05:48:46 +0000 (06:48 +0100)

Documentation: help: explain 'man.viewer' multiple values

Also add titles to paragraphs under "CONFIGURATION VARIABLES".

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

git-gui: update Italian translationMichele Ballabio Thu, 14 Feb 2008 12:42:19 +0000 (13:42 +0100)

git-gui: update Italian translation

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

tr portability fixesJeff King Wed, 12 Mar 2008 21:29:57 +0000 (17:29 -0400)

tr portability fixes

Specifying character ranges in tr differs between System V
and POSIX. In System V, brackets are required (e.g.,
'[A-Z]'), whereas in POSIX they are not.

We can mostly get around this by just using the bracket form
for both sets, as in:

tr '[A-Z] '[a-z]'

in which case POSIX interpets this as "'[' becomes '['",
which is OK.

However, this doesn't work with multiple sequences, like:

# rot13
tr '[A-Z][a-z]' '[N-Z][A-M][n-z][a-m]'

where the POSIX version does not behave the same as the
System V version. In this case, we must simply enumerate the
sequence.

This patch fixes problematic uses of tr in git scripts and
test scripts in one of three ways:

- if a single sequence, make sure it uses brackets
- if multiple sequences, enumerate
- if extra brackets (e.g., tr '[A]' 'a'), eliminate
brackets

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

quiltimport: fix misquoting of parsed -p<num> parameterJunio C Hamano Thu, 13 Mar 2008 04:07:19 +0000 (21:07 -0700)

quiltimport: fix misquoting of parsed -p<num> parameter

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

git-cvsimport: fix merging with remote parent branchMarc-Andre Lureau Wed, 12 Mar 2008 19:54:21 +0000 (21:54 +0200)

git-cvsimport: fix merging with remote parent branch

commit-tree fails when specifying a remote name (via -r option) and
one of the parent branch has a name. Prefixing with "$remote/" fix it.

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: Fix bug in href(..., -replay=>1) when using... Jakub Narebski Thu, 14 Feb 2008 08:22:30 +0000 (09:22 +0100)

gitweb: Fix bug in href(..., -replay=>1) when using 'pathinfo' form

URLs generated by href(..., -replay=>1) (which includes 'next page'
links and alternate view links) didn't set project info correctly
when current page URL is in pathinfo form.

This resulted in broken links such like:

http://www.example.com/w/ARRAY(0x85a5318)?a=shortlog;pg=1

if the 'pathinfo' feature was used, or

http://www.example.com/w/?a=shortlog;pg=1

if it wasn't, instead of correct:

http://www.example.com/w/project.git?a=shortlog;pg=1

This was caused by the fact that href() always replays params in the
arrayref form, were they multivalued or singlevalued, and the code
dealing with 'pathinfo' feature couldn't deal with $params{'project'}
being arrayref.

Setting $params{'project'} is moved before replaying params; this
ensures that 'project' parameter is processed correctly.

Noticed-by: Peter Oberndorfer <kumbayo84@arcor.de>
Noticed-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: flatten enumeration of headers, objects and... Junio C Hamano Wed, 12 Mar 2008 08:46:26 +0000 (01:46 -0700)

Makefile: flatten enumeration of headers, objects and programs

With flattened one-line-per-item list that is sorted, hopefully we will
have less merge conflicts when various topics are merged.

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

Makefile: DIFF_OBJS is not special at all these daysJunio C Hamano Wed, 12 Mar 2008 08:31:01 +0000 (01:31 -0700)

Makefile: DIFF_OBJS is not special at all these days

It used to make sense back when nothing but diff-files, diff-index and
friends depended on diffcore infrastructure, but pretty much everything
depends on revision infrastructure which in turn depends on DIFF_OBJS.

There is no reason to treat them any differently in the Makefile.

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

git-submodule summary: fix that some "wc" flavors produ... Johannes Sixt Wed, 12 Mar 2008 08:30:01 +0000 (09:30 +0100)

git-submodule summary: fix that some "wc" flavors produce leading spaces

We print the number of commits in parentheses, but without this change
we would get an oddly looking line like this:

* sm1 4c8d358...41fbea9 ( 4):

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule summary: testPing Yin Tue, 11 Mar 2008 13:52:19 +0000 (21:52 +0800)

git-submodule summary: test

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule summary: documentationPing Yin Tue, 11 Mar 2008 13:52:18 +0000 (21:52 +0800)

git-submodule summary: documentation

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule summary: limit summary sizePing Yin Tue, 11 Mar 2008 13:52:17 +0000 (21:52 +0800)

git-submodule summary: limit summary size

This patch teaches git-submodule an option '--summary-limit|-n <number>'
to limit number of commits in total for the summary of each submodule in
the modified case (only a single commit is shown in other cases).

Giving 0 will disable the summary; a negative number means unlimted, which
is the default.

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule summary: show commit summaryPing Yin Tue, 11 Mar 2008 13:52:16 +0000 (21:52 +0800)

git-submodule summary: show commit summary

This patch does the hard work to show submodule commit summary.

For a modified submodule, a series of commits will be shown with
the following command:

git log --pretty='format:%m %s' \
--first-parent sha1_src...sha1_dst

where the sha1_src is from the given super project commit and the
sha1_dst is from the index or working tree (switched by --cached).

For a deleted, added, or typechanged (blob<->submodule) submodule,
only one single newest commit from the existing end (for example,
src end for submodule deleted or type changed from submodule to blob)
will be shown.

If the src/dst sha1 for a submodule is missing in the submodule
directory, a warning will be issued except in two cases where the
submodule directory is deleted (type 'D') or typechanged to blob
(one case of type 'T').

In the title line for a submodule, the src/dst sha1 and the number
of commits (--first-parent) between the two commits will be shown.

The following example demonstrates most cases.

Example: commit summary for modified submodules sm1-sm5.
--------------------------------------------
$ git submodule summary
* sm1 354cd45...3f751e5 (4):
< one line message for C
< one line message for B
> one line message for D
> one line message for E

* sm2 5c8bfb5...000000 (3):
< one line message for F

* sm3 354cd45...3f751e5:
Warn: sm3 doesn't contain commit 354cd45

* sm4 354cd34(submodule)-> 235efa(blob) (1):
< one line message for G

* sm5 354cd34(blob)-> 235efa(submodule) (5):
> one line message for H

--------------------------------------------

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help: implement multi-valued "man.viewer" config optionChristian Couder Tue, 11 Mar 2008 07:51:12 +0000 (08:51 +0100)

help: implement multi-valued "man.viewer" config option

This allows multiple viewer candidates to be listed in the configuration
file, like this:

[man]
viewer = woman
viewer = konqueror
viewer = man

The candidates are tried in the order listed in the configuration file,
and the first suitable one (e.g. konqueror cannot be used outside windowed
environment) is used.

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

Documentation: help: describe 'man.viewer' config variableChristian Couder Fri, 7 Mar 2008 07:46:55 +0000 (08:46 +0100)

Documentation: help: describe 'man.viewer' config variable

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

help: add "man.viewer" config var to use "woman" or... Christian Couder Fri, 7 Mar 2008 07:46:28 +0000 (08:46 +0100)

help: add "man.viewer" config var to use "woman" or "konqueror"

This patch makes it possible to view man pages using other tools
than the "man" program. It also implements support for emacs'
"woman" and konqueror with the man KIO slave to view man pages.

Note that "emacsclient" is used with option "-e" to launch "woman"
on emacs and this works only on versions >= 22.

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

Merge git://repo.or.cz/git-guiJunio C Hamano Wed, 12 Mar 2008 05:59:35 +0000 (22:59 -0700)

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

* git://repo.or.cz/git-gui:
git-gui: Simplify MSGFMT setting in Makefile
git-gui: Add option for changing the width of the commit message text box
git-gui: if a background colour is set, set foreground colour as well
git-gui: translate the remaining messages in zh_cn.po to chinese

git-gui: Simplify MSGFMT setting in MakefileJunio C Hamano Wed, 12 Mar 2008 05:29:52 +0000 (22:29 -0700)

git-gui: Simplify MSGFMT setting in Makefile

To prepare msg files for Tcl scripts, the command that is set to MSGFMT
make variable needs to be able to grok "--tcl -l <lang> -d <here>" options
correctly. This patch simplifies the tests done in git-gui's Makefile to
directly test this condition. If the test run does not exit properly with
zero status (either because you do not have "msgfmt" itself, or your
"msgfmt" is too old to grok --tcl option --- the reason does not matter),
have it fall back to po/po2msg.sh

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'js/remote'Junio C Hamano Wed, 12 Mar 2008 05:33:51 +0000 (22:33 -0700)

Merge branch 'js/remote'

* js/remote:
"remote update": print remote name being fetched from
builtin remote rm: remove symbolic refs, too
remote: fix "update [group...]"
remote show: Clean up connection correctly if object fetch wasn't done
builtin-remote: prune remotes correctly that were added with --mirror
Make git-remote a builtin
Test "git remote show" and "git remote prune"
parseopt: add flag to stop on first non option
path-list: add functions to work with unsorted lists

Conflicts:

parse-options.c

Merge branch 'lt/unpack-trees'Junio C Hamano Wed, 12 Mar 2008 05:13:44 +0000 (22:13 -0700)

Merge branch 'lt/unpack-trees'

* lt/unpack-trees:
unpack_trees(): fix diff-index regression.
traverse_trees_recursive(): propagate merge errors up
unpack_trees(): minor memory leak fix in unused destination index
Make 'unpack_trees()' have a separate source and destination index
Make 'unpack_trees()' take the index to work on as an argument
Add 'const' where appropriate to index handling functions
Fix tree-walking compare_entry() in the presense of --prefix
Move 'unpack_trees()' over to 'traverse_trees()' interface
Make 'traverse_trees()' traverse conflicting DF entries in parallel
Add return value to 'traverse_tree()' callback
Make 'traverse_tree()' use linked structure rather than 'const char *base'
Add 'df_name_compare()' helper function

"remote update": print remote name being fetched fromSamuel Tardieu Sun, 9 Mar 2008 12:37:55 +0000 (13:37 +0100)

"remote update": print remote name being fetched from

When the other end has dangling symref, "git fetch" issues an error
message but that is not grave enough to cause the fetch process to fail.
As the result, the user will see something like this:

$ git remote update
error: refs/heads/2.0-uobjects points nowhere!

"remote update" used to report which remote it is fetching from, like
this:

$ git remote update
Updating core
Updating matthieu
error: refs/heads/2.0-uobjects points nowhere!
Updating origin

This reinstates the message "Updating <name>" in "git remote update".

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 12 Mar 2008 04:40:47 +0000 (21:40 -0700)

Merge branch 'maint'

* maint:
git-svn: fix find-rev error message when missing arg
t0021: tr portability fix for Solaris
launch_editor(): allow spaces in the filename
git rebase --abort: always restore the right commit

git-svn: fix find-rev error message when missing argMarc-Andre Lureau Tue, 11 Mar 2008 08:00:45 +0000 (10:00 +0200)

git-svn: fix find-rev error message when missing arg

Just let the user know that a revision argument is missing instead of
a perl error. This error message mimic the "init" error message, but
could be improved.

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t0021: tr portability fix for SolarisJeff King Tue, 11 Mar 2008 17:40:45 +0000 (13:40 -0400)

t0021: tr portability fix for Solaris

Solaris' /usr/bin/tr doesn't seem to like multiple character
ranges in brackets (it simply prints "Bad string").

Instead, let's just enumerate the transformation we want.

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

git-submodule summary: code frameworkPing Yin Tue, 11 Mar 2008 13:52:15 +0000 (21:52 +0800)

git-submodule summary: code framework

These patches teach git-submodule a new subcommand 'summary' to show
commit summary of checked out submodules between a given super project
commit (defaults to HEAD) and working tree (or index, when --cached is
given).

This patch just introduces the framework to find submodules which have
summary to show. A submodule will have summary if it falls into these
cases:

- type 'M': modified and checked out (1)
- type 'A': added and checked out (2)
- type 'D': deleted
- type 'T': typechanged (blob <-> submodule)

Notes:

1. There may be modified but not checked out cases. In the case of a
merge conflict, even if the submodule is not checked out, there may
be still a diff between index and HEAD on the submodule entry
(i.e. modified). The summary will not be show for such a submodule.
2. A similar explanation applies to the added but not checked out case.

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>