gitweb.git
gitk: Allow users to view diffs in external diff viewerThomas Arcila Mon, 24 Mar 2008 11:55:36 +0000 (12:55 +0100)

gitk: Allow users to view diffs in external diff viewer

This allows gitk to run an external diff viewer such as meld.

Right-click on a file in the file list view gives "External diff"
popup menu entry, which launches the selected external diff tool.
The menu entry is only active in "Patch" mode, not in "Tree" mode.

The program to run to display the diff is configurable through
Edit/Preference/External diff tool. The program is run with two
arguments, being the names of files containing the two versions to
diff. Gitk will create temporary directories called
.gitk-tmp.<pid>/<n> to place these files in, and remove them when
it's finished.

If the file doesn't exist in one or other revision, gitk will supply
/dev/null as the name of the file on that side of the diff. This may
need to be adjusted for Windows or MacOS.

[paulus@samba.org - cleaned up and rewrote some parts of the patch.]

Signed-off-by: Thomas Arcila <thomas.arcila@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Synchronize highlighting in file view for 'f... Paul Mackerras Sat, 10 May 2008 03:15:36 +0000 (13:15 +1000)

gitk: Synchronize highlighting in file view for 'f' and 'b' commands

This is based on a patch by Eric Raible <raible@gmail.com>, but does
things a bit more simply.

Previously, 'b', backspace, and delete all did the same thing.
This changes 'b' to perform the inverse of 'f'. And both of
them now highlight the filename of the currently diff.

This makes it easier to review and navigate the diffs associated
with a particular commit using only f, b, and space because the
filename of the currently display diff will be dynamically
highlighted.

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

Merge branch 'maint'Junio C Hamano Fri, 9 May 2008 03:50:03 +0000 (20:50 -0700)

Merge branch 'maint'

* maint:
Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
doc: clarify definition of "update" for git-add -u

Merge branch 'maint-1.5.4' into maintJunio C Hamano Fri, 9 May 2008 03:12:44 +0000 (20:12 -0700)

Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"
doc: clarify definition of "update" for git-add -u

Merge branch 'sg/merge-options' (early part)Junio C Hamano Fri, 9 May 2008 03:06:36 +0000 (20:06 -0700)

Merge branch 'sg/merge-options' (early part)

* 'sg/merge-options' (early part):
merge, pull: add '--(no-)log' command line option
fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
add 'merge.stat' config variable
merge, pull: introduce '--(no-)stat' option
doc: moved merge.* config variables into separate merge-config.txt

Merge branch 'db/learn-HEAD'Junio C Hamano Fri, 9 May 2008 03:06:23 +0000 (20:06 -0700)

Merge branch 'db/learn-HEAD'

* db/learn-HEAD:
Make ls-remote http://... list HEAD, like for git://...
Make walker.fetch_ref() take a struct ref.

Merge branch 'jn/webfeed'Junio C Hamano Fri, 9 May 2008 03:06:15 +0000 (20:06 -0700)

Merge branch 'jn/webfeed'

* jn/webfeed:
gitweb: Use feed link according to current view

Merge branch 'cc/help'Junio C Hamano Fri, 9 May 2008 03:06:11 +0000 (20:06 -0700)

Merge branch 'cc/help'

* cc/help:
documentation: web--browse: add a note about konqueror
documentation: help: add info about "man.<tool>.cmd" config var
help: use "man.<tool>.cmd" as custom man viewer command
documentation: help: add "man.<tool>.path" config variable
help: use man viewer path from "man.<tool>.path" config var

Merge branch 'dm/cherry-pick-s'Junio C Hamano Fri, 9 May 2008 03:06:06 +0000 (20:06 -0700)

Merge branch 'dm/cherry-pick-s'

* dm/cherry-pick-s:
Allow cherry-pick (and revert) to add signoff line

Merge branch 'lt/dirmatch-optim'Junio C Hamano Fri, 9 May 2008 03:05:43 +0000 (20:05 -0700)

Merge branch 'lt/dirmatch-optim'

* lt/dirmatch-optim:
Optimize match_pathspec() to avoid fnmatch()

bisect: print an error message when "git rev-list ... Christian Couder Wed, 7 May 2008 21:54:28 +0000 (23:54 +0200)

bisect: print an error message when "git rev-list --bisect-vars" fails

Before this patch no error was printed when "git rev-list --bisect-vars"
failed. This can happen when bad and good revs are mistaken.

This patch prints an error message on stderr that describe the likely
failure cause.

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

compat-util: avoid macro redefinition warningJohannes Sixt Thu, 8 May 2008 07:34:49 +0000 (09:34 +0200)

compat-util: avoid macro redefinition warning

Some systems define fopen as a macro based on compiler settings, and
unconditionally redefining it triggers a compilation warning.

compat/fopen.c: avoid clobbering the system defined... Brandon Casey Wed, 7 May 2008 17:34:18 +0000 (12:34 -0500)

compat/fopen.c: avoid clobbering the system defined fopen macro

Some systems define fopen as a macro based on compiler settings.
The previous technique for reverting to the system fopen function
by merely undefining fopen is inadequate in this case. Instead,
avoid defining fopen entirely when compiling this source file.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Tested-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Delete branches with 'git branch -D' to clear... Shawn O. Pearce Fri, 9 May 2008 00:29:42 +0000 (20:29 -0400)

git-gui: Delete branches with 'git branch -D' to clear config

If we are deleting a local branch from refs/heads/ we need to
make sure any associated configuration stored in .git/config is
also removed (such as branch.$name.remote and branch.$name.merge).
The easiest way to do this is to use git-branch as that automatically
will look for and delete configuration keys as necessary.

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

git-gui: Setup branch.remote,merge for shorthand git... Shawn O. Pearce Fri, 9 May 2008 00:16:43 +0000 (20:16 -0400)

git-gui: Setup branch.remote,merge for shorthand git-pull

When creating new branches if branch.autosetupmerge is not set, or
is set to true or always and we have been given a remote tracking
branch as the starting point for a new branch we want to create the
necessary configuration options in .git/config for the new branch
so that a no argument git-pull on the command line pulls from the
remote repository's branch.

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

gitk: Make updates go fasterPaul Mackerras Fri, 9 May 2008 00:14:07 +0000 (10:14 +1000)

gitk: Make updates go faster

This goes back to the method of doing updates where we translate the
revisions we're given to SHA1 ids and then remove the ones we've asked
for before or that we've already come across. This speeds up updates
enormously in most cases since it means git log doesn't have to traverse
large parts of the tree. We used to do this, but it had bugs, and commit
468bcaedbb1589f16955e63b6bfba01c2f53e433 (gitk: Don't filter view
arguments through git rev-parse) went to the slower method to avoid the
bugs.

In order to do this properly, we have to parse the command line and
understand all the flag arguments. So this adds a parser that checks
all the flag arguments. If there are any we don't know about, we
disable the optimization and just pass the whole lot to git log
(except for -d/--date-order, which we remove from the list).

With this we can then use git rev-parse on the non-flag arguments to
work out exactly what SHA1 ids are included and excluded in the list,
which then enables us to ask for just the new ones when updating.
One wrinkle is that we have to turn symmetric diff arguments (of the
form a...b) back into symmetric diff form so that --left-right still
works, as git rev parse turns a...b into a b ^merge_base(a,b).

This also updates a couple of copyright notices.

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

Documentation/config.txt: Mention branch.<name>.rebase... Dustin Sallings Thu, 8 May 2008 18:28:07 +0000 (11:28 -0700)

Documentation/config.txt: Mention branch.<name>.rebase applies to "git pull"

Signed-off-by: Dustin Sallings <dustin@spy.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: clarify definition of "update" for git-add -uJeff King Thu, 8 May 2008 17:25:06 +0000 (13:25 -0400)

doc: clarify definition of "update" for git-add -u

The "-u" option is described only in terms of "updating"
files, which in turn is described only as "similar to what
git commit -a does". Let's be a little more specific about
what updating entails.

Suggested by Geoffrey Irving.

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

Documentation: bisect: add a few "git bisect run" examplesChristian Couder Wed, 7 May 2008 23:00:54 +0000 (01:00 +0200)

Documentation: bisect: add a few "git bisect run" examples

Before this patch, there were no "git bisect run" example.

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

Documentation/config.txt: Add git-gui optionsGustaf Hendeby Thu, 8 May 2008 08:55:02 +0000 (10:55 +0200)

Documentation/config.txt: Add git-gui options

The 'git gui' has a number of options that can be specified using the
options dialog. Sometimes it is convenient to be able to specify these
from the command line, therefor document these options.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Shawn O. Pearce <speace@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: improve "add", "pull" and "format-patch... Christian Couder Wed, 7 May 2008 04:29:28 +0000 (06:29 +0200)

Documentation: improve "add", "pull" and "format-patch" examples

Before this patch in "git-add.txt" and "git-format-patch.txt", the
commands used in the examples were "git-CMD" instead of "git CMD".
This patch fixes that.

In "git-pull.txt" only the last example had the code sample in an
asciidoc "Listing Block", and in the other two files, none.
This patch fixes that by putting all code samples in listing
blocks.

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

Be more careful with objects directory permissions... Mark Hills Mon, 5 May 2008 16:46:42 +0000 (17:46 +0100)

Be more careful with objects directory permissions on clone

Honour the setgid and umask when re-creating the objects directory
at the destination.

cpio in copy-pass mode aims to copy file permissions which causes this
problem and cannot be disabled. Be explicit by copying the directory
structure first, honouring the permissions at the destination, then copy
the files with 0444 permissions. This also avoids bugs in some versions
of cpio.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: Show committer if automaticSanti Béjar Sun, 4 May 2008 16:04:51 +0000 (18:04 +0200)

commit: Show committer if automatic

To warn the user in case he/she might be using an unintended
committer identity.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit: Show author if different from committerSanti Béjar Sun, 4 May 2008 16:04:50 +0000 (18:04 +0200)

commit: Show author if different from committer

That would help reassure anybody while committing other's changes.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Preparation to call determine_author_info from prepare_... Santi Béjar Sun, 4 May 2008 16:04:49 +0000 (18:04 +0200)

Preparation to call determine_author_info from prepare_to_commit

Reorder functions definitions such that determine_author_info is
defined before prepare_to_commit. No code changes.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cat-file: Add --batch optionAdam Roben Wed, 23 Apr 2008 19:17:47 +0000 (15:17 -0400)

git-cat-file: Add --batch option

--batch is similar to --batch-check, except that the contents of each object is
also printed. The output's form is:

<sha1> SP <type> SP <size> LF
<contents> LF

Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cat-file: Add --batch-check optionAdam Roben Wed, 23 Apr 2008 19:17:46 +0000 (15:17 -0400)

git-cat-file: Add --batch-check option

This new option allows multiple objects to be specified on stdin. For each
object specified, a line of the following form is printed:

<sha1> SP <type> SP <size> LF

If the object does not exist in the repository, a line of the following form is
printed:

<object> SP missing LF

Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cat-file: Make option parsing a little more flexibleAdam Roben Wed, 23 Apr 2008 19:17:45 +0000 (15:17 -0400)

git-cat-file: Make option parsing a little more flexible

This will make it easier to add newer options later.

Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-cat-file: Small refactor of cmd_cat_fileAdam Roben Wed, 23 Apr 2008 19:17:44 +0000 (15:17 -0400)

git-cat-file: Small refactor of cmd_cat_file

I separated the logic of parsing the arguments from the logic of fetching and
outputting the data. cat_one_file now does the latter.

Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add tests for git cat-fileAdam Roben Wed, 23 Apr 2008 19:17:43 +0000 (15:17 -0400)

Add tests for git cat-file

Signed-off-by: Adam Roben <aroben@apple.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/lstat'Junio C Hamano Tue, 6 May 2008 02:16:26 +0000 (19:16 -0700)

Merge branch 'jc/lstat'

* jc/lstat:
diff-files: mark an index entry we know is up-to-date as such
write_index(): optimize ce_smudge_racily_clean_entry() calls with CE_UPTODATE

Merge branch 'bc/filter-branch'Junio C Hamano Tue, 6 May 2008 02:16:20 +0000 (19:16 -0700)

Merge branch 'bc/filter-branch'

* bc/filter-branch:
filter-branch.sh: support nearly proper tag name filtering

Merge branch 'lh/git-file'Junio C Hamano Tue, 6 May 2008 02:16:16 +0000 (19:16 -0700)

Merge branch 'lh/git-file'

* lh/git-file:
Teach GIT-VERSION-GEN about the .git file
Teach git-submodule.sh about the .git file
Teach resolve_gitlink_ref() about the .git file
Add platform-independent .git "symlink"

Merge branch 'jk/fetch-status'Junio C Hamano Tue, 6 May 2008 02:16:12 +0000 (19:16 -0700)

Merge branch 'jk/fetch-status'

* jk/fetch-status:
git-fetch: always show status of non-tracking-ref fetches

Merge branch 'lh/branch-merged'Junio C Hamano Tue, 6 May 2008 02:16:06 +0000 (19:16 -0700)

Merge branch 'lh/branch-merged'

* lh/branch-merged:
Add tests for `branch --[no-]merged`
git-branch.txt: compare --contains, --merged and --no-merged
git-branch: add support for --merged and --no-merged

Merge branch 'pb/remote-mirror-config'Junio C Hamano Tue, 6 May 2008 02:15:39 +0000 (19:15 -0700)

Merge branch 'pb/remote-mirror-config'

* pb/remote-mirror-config:
Add a remote.*.mirror configuration option

graph API: eliminate unnecessary indentationAdam Simpkins Mon, 5 May 2008 07:57:03 +0000 (00:57 -0700)

graph API: eliminate unnecessary indentation

This change improves the calculation of the amount of horizontal
padding, so that there is always exactly 1 space of padding.
Previously, most commits had 3 spaces of padding, but commits that
didn't have any children in the graph had only 1 space of padding.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log and rev-list: add --graph optionAdam Simpkins Sun, 4 May 2008 10:36:54 +0000 (03:36 -0700)

log and rev-list: add --graph option

This new option causes a text-based representation of the history to be
printed to the left of the normal output.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add history graph APIAdam Simpkins Sun, 4 May 2008 10:36:53 +0000 (03:36 -0700)

Add history graph API

This new API allows the commit history to be displayed as a text-based
graphical representation.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revision API: split parent rewriting and parent printin... Adam Simpkins Sun, 4 May 2008 10:36:52 +0000 (03:36 -0700)

revision API: split parent rewriting and parent printing options

This change allows parent rewriting to be performed without causing
the log and rev-list commands to print the parents.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

post-merge: Add it's not executed if merge failed.Jörg Sommer Mon, 5 May 2008 09:06:49 +0000 (11:06 +0200)

post-merge: Add it's not executed if merge failed.

Signed-off-by: J��rg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-bisect.sh: don't accidentally override existing... Gerrit Pape Mon, 5 May 2008 07:43:00 +0000 (07:43 +0000)

git-bisect.sh: don't accidentally override existing branch "bisect"

If a branch named "bisect" or "new-bisect" already was created in the
repo by other means than git bisect, doing a git bisect used to override
the branch without a warning. Now if the branch "bisect" or
"new-bisect" already exists, and it was not created by git bisect itself,
git bisect start fails with an appropriate error message. Additionally,
if checking out a new bisect state fails due to a merge problem, git
bisect cleans up the temporary branch "new-bisect".

The accidental override has been noticed by Andres Salomon, reported
through
http://bugs.debian.org/478647

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Add create-ignore to git svn manualGustaf Hendeby Sun, 4 May 2008 22:33:10 +0000 (00:33 +0200)

Documentation: Add create-ignore to git svn manual

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: Make create-ignore use git add -fGustaf Hendeby Sun, 4 May 2008 22:33:09 +0000 (00:33 +0200)

git-svn: Make create-ignore use git add -f

When having a svn:ignore that ignores the .gitignore file the -f
option to git add must be used to avoid git complaining about adding
an ignored file and hence stop the process of creating .gitignores.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

INSTALL: add a note about GNU interactive tools has... Miklos Vajna Sun, 4 May 2008 14:55:11 +0000 (16:55 +0200)

INSTALL: add a note about GNU interactive tools has been renamed

In recent versions GNU's git has been renamed to gnuit, document this
while talking about how to resolve the conflict.

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

Rename the test trash directory to contain spaces.Bryan Donlan Sun, 4 May 2008 05:38:00 +0000 (01:38 -0400)

Rename the test trash directory to contain spaces.

In order to help prevent regressions in the future, rename the trash directory
for all tests to contain spaces. This patch also corrects two failures that
were caused or exposed by this change.

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix tests breaking when checkout path contains shell... Bryan Donlan Sun, 4 May 2008 05:37:59 +0000 (01:37 -0400)

Fix tests breaking when checkout path contains shell metacharacters

This fixes the remainder of the issues where the test script itself is at
fault for failing when the git checkout path contains whitespace or other
shell metacharacters.

The majority of git svn tests used the idiom

test_expect_success "title" "test script using $svnrepo"

These were changed to have the test script in single-quotes:

test_expect_success "title" 'test script using "$svnrepo"'

which unfortunately makes the patch appear larger than it really is.

One consequence of this change is that in the verbose test output the
value of $svnrepo (and in some cases other variables, too) is no
longer expanded, i.e. previously we saw

* expecting success:
test script using /path/to/git/t/trash/svnrepo

but now it is:

* expecting success:
test script using "$svnrepo"

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Don't use the 'export NAME=value' in the test scripts.Bryan Donlan Sun, 4 May 2008 05:37:58 +0000 (01:37 -0400)

Don't use the 'export NAME=value' in the test scripts.

This form is not portable across all shells, so replace instances of:

export FOO=bar

with:

FOO=bar
export FOO

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

lib-git-svn.sh: Fix quoting issues with paths containin... Bryan Donlan Sun, 4 May 2008 05:37:57 +0000 (01:37 -0400)

lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib.sh: Fix some missing path quotingBryan Donlan Sun, 4 May 2008 05:37:56 +0000 (01:37 -0400)

test-lib.sh: Fix some missing path quoting

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use test_set_editor in t9001-send-email.shBryan Donlan Sun, 4 May 2008 05:37:55 +0000 (01:37 -0400)

Use test_set_editor in t9001-send-email.sh

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib.sh: Add a test_set_editor function to safely... Bryan Donlan Sun, 4 May 2008 05:37:54 +0000 (01:37 -0400)

test-lib.sh: Add a test_set_editor function to safely set $VISUAL

In particular, this function correctly handles cases where the pwd contains
spaces, quotes, and other troublesome metacharacters.

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email.perl: Handle shell metacharacters in... Bryan Donlan Sun, 4 May 2008 05:37:53 +0000 (01:37 -0400)

git-send-email.perl: Handle shell metacharacters in $EDITOR properly

This fixes the git-send-perl semantics for launching an editor when
$GIT_EDITOR (or friends) contains shell metacharacters to match
launch_editor() in builtin-tag.c. If we use the current approach
(sh -c '$0 $@' "$EDITOR" files ...), we see it fails when $EDITOR has
shell metacharacters:

$ sh -x -c '$0 $@' "$VISUAL" "foo"
+ "$FAKE_EDITOR" foo
"$FAKE_EDITOR": 1: "$FAKE_EDITOR": not found

Whereas builtin-tag.c will invoke sh -c "$EDITOR \"$@\"".

Thus, this patch changes git-send-email.perl to use the same method as the
C utilities, and additionally updates t/t9001-send-email.sh to test for
this bug.

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config.c: Escape backslashes in section names properlyBryan Donlan Sun, 4 May 2008 05:37:52 +0000 (01:37 -0400)

config.c: Escape backslashes in section names properly

If an element of the configuration key name other than the first or last
contains a backslash, it is not escaped on output, but is treated as an
escape sequence on input. Thus, the backslash is lost when re-loading
the configuration.

This patch corrects this by having backslashes escaped properly, and
introduces a new test for this bug.

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-rebase.sh: Fix --merge --abort failures when path... Bryan Donlan Sun, 4 May 2008 05:37:51 +0000 (01:37 -0400)

git-rebase.sh: Fix --merge --abort failures when path contains whitespace

Also update t/t3407-rebase-abort.sh to expose the bug.

Signed-off-by: Bryan Donlan <bdonlan@fushizen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: add documentation for --add-author-from option.Avery Pennarun Wed, 16 Apr 2008 01:04:18 +0000 (21:04 -0400)

git-svn: add documentation for --add-author-from option.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: Add --add-author-from option.Avery Pennarun Wed, 16 Apr 2008 01:04:17 +0000 (21:04 -0400)

git-svn: Add --add-author-from option.

This option adds a From: line (based on the commit's author information)
at the beginning of the body of the commit log message when sending to
svn, if a From: or Signed-off-by: header does not exist.

This, combined with --use-log-author, can retain the author field of commits
through a round trip from git to svn and back.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: add documentation for --use-log-author option.Avery Pennarun Wed, 16 Apr 2008 01:04:16 +0000 (21:04 -0400)

git-svn: add documentation for --use-log-author option.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Build in cloneDaniel Barkalow Sun, 27 Apr 2008 17:39:30 +0000 (13:39 -0400)

Build in clone

Thanks to Johannes Schindelin for various comments and improvements,
including supporting cloning full bundles.

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

Provide API access to init_db()Daniel Barkalow Sun, 27 Apr 2008 17:39:27 +0000 (13:39 -0400)

Provide API access to init_db()

The caller first calls set_git_dir() to specify the GIT_DIR, and then
calls init_db() to initialize it. This also cleans up various parts of
the code to account for the fact that everything is done with GIT_DIR
set, so it's unnecessary to pass the specified directory around.

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

Add a function to set a non-default work treeDaniel Barkalow Sun, 27 Apr 2008 17:39:21 +0000 (13:39 -0400)

Add a function to set a non-default work tree

This function may only be used before the work tree is used.

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

Allow for having for_each_ref() list extra refsDaniel Barkalow Sun, 27 Apr 2008 17:39:24 +0000 (13:39 -0400)

Allow for having for_each_ref() list extra refs

These refs can be anything, but they are most likely useful as
pointing to objects that you know are in the object database but don't
have any regular refs for. For example, when cloning with --reference,
the refs in this repository should be listed as objects that we have,
even though we don't have refs in our newly-created repository for
them yet.

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

Have a constant extern refspec for "--tags"Daniel Barkalow Thu, 17 Apr 2008 23:32:35 +0000 (19:32 -0400)

Have a constant extern refspec for "--tags"

The refspec refs/tags/*:refs/tags/* is sufficiently common and generic
to merit having a constant instead of generating it as needed.

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

Add a library function to add an alternate to the alter... Daniel Barkalow Thu, 17 Apr 2008 23:32:30 +0000 (19:32 -0400)

Add a library function to add an alternate to the alternates file

This is in the core so that, if the alternates file has already been
read, the addition can be parsed and put into effect for the current
process.

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

Add a lockfile function to append to a fileDaniel Barkalow Thu, 17 Apr 2008 23:32:26 +0000 (19:32 -0400)

Add a lockfile function to append to a file

This takes care of copying the original contents into the replacement
file after the lock is held, so that concurrent additions can't miss
each other's changes.

[jc: munged to drop mmap in favor of copy_file.]

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

Mark the list of refs to fetch as constDaniel Barkalow Thu, 17 Apr 2008 23:32:22 +0000 (19:32 -0400)

Mark the list of refs to fetch as const

Fetching the objects doesn't actually modify the list in any of the
code paths, so this will allow code that fetches the entire (const)
list of available refs to just pass the list in directly.

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

add special "matching refs" refspecPaolo Bonzini Mon, 28 Apr 2008 15:32:12 +0000 (11:32 -0400)

add special "matching refs" refspec

This patch provides a way to specify "push matching heads" using a
special refspec ":". This is useful because it allows "push = +:"
as a way to specify that matching refs will be pushed but, in addition,
forced updates will be allowed, which was not possible before.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: rename "hooks.txt" to "githooks.txt... Christian Couder Fri, 2 May 2008 03:30:47 +0000 (05:30 +0200)

Documentation: rename "hooks.txt" to "githooks.txt" and make it a man page

Also now "gitcli(5)" becomes "gitcli(7)".

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

is_racy_timestamp(): do not check timestamp for gitlinksJunio C Hamano Sun, 4 May 2008 00:24:28 +0000 (17:24 -0700)

is_racy_timestamp(): do not check timestamp for gitlinks

Because we do not even check the timestamp to determie if a gitlink
is up to date or not, triggering the racy-timestamp check for gitlinks
does not make sense.

This fixes the recently added test in t7506.

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

diff-lib.c: rename check_work_tree_entity()Junio C Hamano Sun, 4 May 2008 00:23:46 +0000 (17:23 -0700)

diff-lib.c: rename check_work_tree_entity()

The function is about checking for removed work tree item, so name it
accordingly to avoid future confusion.

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

diff: a submodule not checked out is not modifiedJunio C Hamano Sun, 4 May 2008 00:04:42 +0000 (17:04 -0700)

diff: a submodule not checked out is not modified

948dd34 (diff-index: careful when inspecting work tree items, 2008-03-30)
made the work tree check careful not to be fooled by a new directory that
exists at a place the index expects a blob. For such a change to be a
typechange from blob to submodule, the new directory has to be a
repository.

However, if the index expects a submodule there, we should not insist the
work tree entity to be a repository --- a simple directory that is not a
full fledged repository (even an empty directory would do) should be
considered an unmodified subproject, because that is how a superproject
with a submodule is checked out sparsely by default.

This makes the function check_work_tree_entity() even more careful not to
report a submodule that is not checked out as removed. It fixes the
recently added test in t4027.

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

Add t7506 to test submodule related functions for git... Ping Yin Fri, 2 May 2008 13:35:34 +0000 (21:35 +0800)

Add t7506 to test submodule related functions for git-status

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

t4027: test diff for submodule with empty directoryPing Yin Fri, 2 May 2008 13:35:33 +0000 (21:35 +0800)

t4027: test diff for submodule with empty directory

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

Cleanup xread() loops to use read_in_full()Heikki Orsila Sat, 3 May 2008 13:27:26 +0000 (16:27 +0300)

Cleanup xread() loops to use read_in_full()

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 4 May 2008 05:15:09 +0000 (22:15 -0700)

Merge branch 'maint'

* maint:
checkout: don't rfc2047-encode oneline on detached HEAD
filter-branch: Documentation fix.

Merge branch 'maint-1.5.4' into maintJunio C Hamano Sun, 4 May 2008 01:55:33 +0000 (18:55 -0700)

Merge branch 'maint-1.5.4' into maint

* maint-1.5.4:
filter-branch: Documentation fix.

checkout: don't rfc2047-encode oneline on detached... Jeff King Fri, 2 May 2008 14:05:36 +0000 (10:05 -0400)

checkout: don't rfc2047-encode oneline on detached HEAD

When calling pretty_print_commit, there is an implicit
assumption that passing in a non-NULL "subject" variable
for oneline or email formats means that the output is part
of a subject and therefore "subject" to rfc2047 encoding.
This is not the desired effect when reporting the movement
of detached HEAD.

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

pack-objects: fix early eviction for max depth delta... Nicolas Pitre Fri, 2 May 2008 19:11:51 +0000 (15:11 -0400)

pack-objects: fix early eviction for max depth delta objects

The 'depth' variable doesn't reflect the actual maximum depth used
when other objects already depend on the current one.

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

pack-objects: allow for early delta deflatingNicolas Pitre Fri, 2 May 2008 19:11:50 +0000 (15:11 -0400)

pack-objects: allow for early delta deflating

When the delta data is cached in memory until it is written to a pack
file on disk, it is best to compress it right away in find_deltas() for
the following reasons:

- we have to compress that data anyway;

- this allows for caching more deltas with the same cache size limit;

- compression is potentially threaded.

This last point is especially relevant for SMP run time. For example,
repacking the Linux repo on a quad core processor using 4 threads with
all default settings produce the following results before this change:

real 2m27.929s
user 4m36.492s
sys 0m3.091s

And with this change applied:

real 2m13.787s
user 4m37.486s
sys 0m3.159s

So the actual execution time stayed more or less the same but the
wall clock time is shorter.

This is however not a good thing to do when generating a pack for
network transmission. In that case, the network is most likely to
throttle the data throughput, so it is best to make find_deltas()
faster in order to start writing data ASAP since we can afford
spending more time between writes to compress the data
at that point.

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

pack-objects: move compression code in a separate functionNicolas Pitre Fri, 2 May 2008 19:11:49 +0000 (15:11 -0400)

pack-objects: move compression code in a separate function

A later patch will make use of that code too.

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

pack-objects: clean up write_object() a bitNicolas Pitre Fri, 2 May 2008 19:11:48 +0000 (15:11 -0400)

pack-objects: clean up write_object() a bit

... for improved readability. No functional changes.

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

pack-objects: simplify the condition associated with... Nicolas Pitre Fri, 2 May 2008 19:11:47 +0000 (15:11 -0400)

pack-objects: simplify the condition associated with --all-progress

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

pack-objects: remove some double negative logicNicolas Pitre Fri, 2 May 2008 19:11:46 +0000 (15:11 -0400)

pack-objects: remove some double negative logic

Parsing !no_reuse_delta everywhere makes my brain spend extra
cycles wondering each time.

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

pack-objects: small cleanupNicolas Pitre Fri, 2 May 2008 19:11:45 +0000 (15:11 -0400)

pack-objects: small cleanup

Better encapsulate delta creation for writing.

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

Documentation: hooks: fix missing verb in pre-applypatc... Christian Couder Fri, 2 May 2008 03:30:41 +0000 (05:30 +0200)

Documentation: hooks: fix missing verb in pre-applypatch description

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

diff: make "too many files" rename warning optionalJeff King Wed, 30 Apr 2008 17:25:53 +0000 (13:25 -0400)

diff: make "too many files" rename warning optional

In many cases, the warning ends up as clutter, because the
diff is being done "behind the scenes" from the user (e.g.,
when generating a commit diffstat), and whether we show
renames or not is not particularly interesting to the user.

However, in the case of a merge (which is what motivated the
warning in the first place), it is a useful hint as to why a
merge with renames might have failed.

This patch makes the warning optional based on the code
calling into diffcore. We default to not showing the
warning, but turn it on for merges.

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

bump rename limit defaultsJeff King Wed, 30 Apr 2008 17:24:43 +0000 (13:24 -0400)

bump rename limit defaults

The current rename limit default of 100 was arbitrarily
chosen. Testing[1] has shown that on modern hardware, a
limit of 200 adds about a second of computation time, and a
limit of 500 adds about 5 seconds of computation time.

This patch bumps the default limit to 200 for viewing diffs,
and to 500 for performing a merge. The limit for generating
git-status templates is set independently; we bump it up to
200 here, as well, to match the diff limit.

[1]: See <20080211113516.GB6344@coredump.intra.peff.net>

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

add merge.renamelimit config optionJeff King Wed, 30 Apr 2008 17:23:55 +0000 (13:23 -0400)

add merge.renamelimit config option

The point of rename limiting is to bound the amount of time
we spend figuring out inexact renames. Currently we use a
single value, diff.renamelimit, for all situations. However,
it is probably the case that a user is willing to spend more
time finding renames during a merge than they are while
looking at git-log.

This patch provides a way of setting those values separately
(though for backwards compatibility, merge still falls back
on the diff renamelimit).

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

Merge commit 'sg/merge-options^' into jk/renamelimitJunio C Hamano Sat, 3 May 2008 20:18:20 +0000 (13:18 -0700)

Merge commit 'sg/merge-options^' into jk/renamelimit

* commit 'sg/merge-options^':
merge, pull: add '--(no-)log' command line option
fmt-merge-msg: add '--(no-)log' options and 'merge.log' config variable
add 'merge.stat' config variable
merge, pull: introduce '--(no-)stat' option
doc: moved merge.* config variables into separate merge-config.txt

filter-branch: Documentation fix.Florian Ragwitz Wed, 30 Apr 2008 07:47:43 +0000 (09:47 +0200)

filter-branch: Documentation fix.

It's --msg-filter, not --message-filter.

Signed-off-by: Florian Ragwitz <rafl@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log: print log entry terminator even if the message... Adam Simpkins Tue, 29 Apr 2008 08:33:00 +0000 (01:33 -0700)

log: print log entry terminator even if the message is empty

This eliminates a special case in the show_log() function, to help
simplify the terminator semantics. Now show_log() always prints a
newline after the log entry when use_terminator is set, even if the log
message is empty.

This change should only affect the --pretty=tformat output, since that
was the only way to trigger this special case.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove dead code: show_log() sep argument and diff_opti... Adam Simpkins Tue, 29 Apr 2008 08:32:59 +0000 (01:32 -0700)

Remove dead code: show_log() sep argument and diff_options.msg_sep

These variables were made unnecessary by commit
3969cf7db1a13a78f3b7a36d8c1084bbe0a53459.

Signed-off-by: Adam Simpkins <adam@adamsimpkins.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Disable "Reset %s branch to here" when on a detac... Michele Ballabio Fri, 2 May 2008 15:46:20 +0000 (17:46 +0200)

gitk: Disable "Reset %s branch to here" when on a detached head

When we are on a detached head - since gitk does not display where
we are - reset has no sense, so disable the relevant line on the
context menu, and point out to the user that we are on a detached head.

Otherwise, a reset from gitk when on a detached head returns the
error:

can't read "headids()": no such element in array
can't read "headids()": no such element in array
while executing
"removehead $headids($name) $name"
(procedure "movehead" line 4)
invoked from within
"movehead $newhead $mainhead"
(procedure "readresetstat" line 20)
invoked from within
"readresetstat file4"
("eval" body line 1)
invoked from within
"eval $script"
(procedure "dorunq" line 9)
invoked from within
"dorunq"
("after" script)

[paulus@samba.org: changed menu item to "Detached head: can't reset"]

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

gitk: German translation again updatedChristian Stimming Fri, 2 May 2008 19:33:34 +0000 (21:33 +0200)

gitk: German translation again updated

This includes suggestions by Stephan Beyer.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Update German translationChristian Stimming Thu, 1 May 2008 19:38:37 +0000 (21:38 +0200)

gitk: Update German translation

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Makefile/install: force permissions when installi... Gerrit Pape Mon, 14 Apr 2008 08:27:09 +0000 (08:27 +0000)

gitk: Makefile/install: force permissions when installing files and dirs

The msg-files msgs/*.msg used to be installed with mode 755 although
they're not executables. With this commit, files are forced to be
installed with mode 644, directories and executables with mode 755.

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

gitk: Initial Swedish translation.Peter Karlsson Fri, 14 Mar 2008 15:13:17 +0000 (16:13 +0100)

gitk: Initial Swedish translation.

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

gitk: Spanish translation of gitkSantiago Gala Tue, 25 Mar 2008 10:48:22 +0000 (11:48 +0100)

gitk: Spanish translation of gitk

I copied the Italian translation and translated the strings
to Spanish starting from there. This incorporates suggestions
from Wincent Colaiuta and Carlos Rica.

Signed-off-by: Santiago Gala <sgala@apache.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

git-gui: Update German translationChristian Stimming Thu, 1 May 2008 09:51:47 +0000 (11:51 +0200)

git-gui: Update German translation

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

git-svn: Same default as cvsimport when using --use... Stephen R. van den Berg Tue, 29 Apr 2008 21:20:32 +0000 (23:20 +0200)

git-svn: Same default as cvsimport when using --use-log-author

When using git-cvsimport, the author is inferred from the cvs commit,
e.g. cvs commit logname is foobaruser, then the author field in git
results in:

Author: foobaruser <foobaruser>

Which is not perfect, but perfectly acceptable given the circumstances.

The default git-svn import however, results in:

Author: foobaruser <foobaruser@acf43c95-373e-0410-b603-e72c3f656dc1>

When using mixes of imports, from CVS and SVN into the same git
repository, you'd like to harmonise the imports to the format cvsimport
uses.
git-svn supports an experimental option --use-log-author which currently
results in the same logentry as without that option when no From: or
Signed-off-by: is found in the logentry ($email currently ends up empty,
and hence is generated again).

This patches harmonises the result with cvsimport, and makes
git-svn --use-log-author produce:

Author: foobaruser <foobaruser>

Signed-off-by: Stephen R. van den Berg <srb@cuci.nl>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>