gitweb.git
use lockfile.c routines in git_commit_set_multivar()Bradford C. Smith Thu, 26 Jul 2007 16:55:28 +0000 (12:55 -0400)

use lockfile.c routines in git_commit_set_multivar()

Changed git_commit_set_multivar() to use the routines provided by
lockfile.c to reduce code duplication and ensure consistent behavior.

Signed-off-by: Bradford C. Smith <bradford.carl.smith@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fully resolve symlinks when creating lockfilesBradford C. Smith Thu, 26 Jul 2007 17:34:14 +0000 (13:34 -0400)

fully resolve symlinks when creating lockfiles

Make the code for resolving symlinks in lockfile.c more robust as
follows:

1. Handle relative symlinks
2. recursively resolve symlink chains up to 5

[jc: removed lstat/stat calls to do things stupid way]

Signed-off-by: Bradford C. Smith <bradford.carl.smith@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Don't kill modified commit message buffer... Shawn O. Pearce Fri, 27 Jul 2007 06:30:15 +0000 (02:30 -0400)

git-gui: Don't kill modified commit message buffer with merge templates

If the user is in the middle of a merge and has already started to
modify their commit message we were losing the user's changes when
they pressed 'Rescan' after resolving issues or making changes in
the working directory.

The problem here was our background timer that saves the commit
message buffer. It marks the commit message buffer as not being
modified when it writes it out to disk, so during the rescan we
assumed the buffer should be replaced with what we read from the
MERGE_MSG file. So we now only read these files from .git if we
have a valid backup file. Since we clear it on commit this will
only have an impact while the user is actively editing the current
commit.

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

git-stash: do not remove a ref by hand.Junio C Hamano Fri, 27 Jul 2007 06:24:28 +0000 (23:24 -0700)

git-stash: do not remove a ref by hand.

Somebody on #git noticed that "git stash clear" left a packed
ref behind for ref/stash.

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

Document commit.template configuration variable.Brian Gernhardt Thu, 26 Jul 2007 20:34:59 +0000 (16:34 -0400)

Document commit.template configuration variable.

Add it to the list in config.txt and explicitly say that the
--template option to git-commit overrides the configuration variable.

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

gitk: Fix bugs in the Find functionPaul Mackerras Thu, 26 Jul 2007 12:36:39 +0000 (22:36 +1000)

gitk: Fix bugs in the Find function

This fixes the problem reported by Brian Downing where searching for
a string that doesn't exist would give a Tcl error. The basic problem
was that we weren't reading the data for the last commit since it
wasn't terminated with a null. This effectively adds a null on the end
(if there isn't one already) to make sure we process the last commit.

This also makes the yellow background behind instances of the search
string appear more consistently, and fixes a bug where the "/" key
would just find the same commit again and again instead of advancing.

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

Update description of -z option.Junio C Hamano Thu, 26 Jul 2007 06:45:42 +0000 (23:45 -0700)

Update description of -z option.

The NUL you see in "git log" (without diff) output are between records,
not at the end of each record.

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

rebase -i: fix overzealous output redirectionJohannes Schindelin Thu, 26 Jul 2007 06:35:51 +0000 (07:35 +0100)

rebase -i: fix overzealous output redirection

When squashing, you no longer saw what the editor had to say to you
after commit 'Shut "git rebase -i" up when no --verbose was given'
(if you used a console based editor, at least).

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

git-write-tree should not crash if prefix does not... Nguyễn Thái Ngọc Duy Thu, 26 Jul 2007 03:14:54 +0000 (23:14 -0400)

git-write-tree should not crash if prefix does not exist

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

git_mkstemp(): be careful not to overflow the path... Junio C Hamano Thu, 26 Jul 2007 04:34:53 +0000 (21:34 -0700)

git_mkstemp(): be careful not to overflow the path buffer.

If user's TMPDIR is insanely long, return negative after
setting errno to ENAMETOOLONG, pretending that the underlying
mkstemp() choked on a temporary file path that is too long.

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

When locking in a symlinked repository, try to lock... Junio C Hamano Wed, 25 Jul 2007 23:22:55 +0000 (16:22 -0700)

When locking in a symlinked repository, try to lock the original.

In a working tree prepared in new-workdir (in contrib/), some files in .git/
directory are symbolic links to the original repository. The usual sequence of
lock-write-rename would break the symbolic link.

Ideally we should resolve relative symbolic link with maxdepth, but I do not
want to risk too elaborate patch before 1.5.3 release, so this is a minimum
and trivially obvious fix. new-workdir creates its symbolic links absolute,
and does not link from a symlinked workdir, so this fix should suffice for now.

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

git-submodule: remove redundant call to git-describeJunio C Hamano Wed, 25 Jul 2007 23:13:55 +0000 (16:13 -0700)

git-submodule: remove redundant call to git-describe

The code to find a more descriptive name given a commit in a
submodule were improved in bffe71f, but it forgot to remove the
older logic the patch replaced.

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

git-p4: Fix p4 user cache population on Windows.Simon Hausmann Wed, 25 Jul 2007 07:31:38 +0000 (09:31 +0200)

git-p4: Fix p4 user cache population on Windows.

Fall back to USERPROFILE if HOME isn't set.

Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule module_name: avoid using unwieldy "value_... Junio C Hamano Wed, 25 Jul 2007 22:51:26 +0000 (15:51 -0700)

git-submodule module_name: avoid using unwieldy "value_regexp" feature.

"module_name $path" function wants to look up a configuration
variable "submodule.<modulename>.path" whose value is $path, and
return the <modulename> found. "git-config --get-regexp" is the
natural thing to use for this, but (1) its value matching has an
unfortunate "feature" that takes leading '!' specially, and (2)
its output needs to be parsed with sed to extract <modulename>
part anyway.

This changes the call to "git-config --get-regexp" not to use
the value-regexp part, and moves the "pick the one whose value
is $path" part to the downstream sed.

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

gitweb: fix broken snapshotJunio C Hamano Wed, 25 Jul 2007 22:49:55 +0000 (15:49 -0700)

gitweb: fix broken snapshot

Recent updates to snapshot code had a typo that broke the command line to
invoke underlying "git archive" command. This is a simple typofix for it.

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

Make sure git-stash works from subdirectory.Junio C Hamano Wed, 25 Jul 2007 22:32:22 +0000 (15:32 -0700)

Make sure git-stash works from subdirectory.

We say "SUBDIRECTORY_OK" but we did not chdir to toplevel; this
is fine as long as everything we use can be started from a
subdirectory, but unfortunately "merge-recursive" is not one of
the programs you can safely use from a subdirectory.

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

Document --unified/-U optionRobin Rosenberg Wed, 25 Jul 2007 10:08:17 +0000 (12:08 +0200)

Document --unified/-U option

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Remove usernames from absolute SSH urls during... Shawn O. Pearce Wed, 25 Jul 2007 09:02:38 +0000 (05:02 -0400)

git-gui: Remove usernames from absolute SSH urls during merging

If we are being asked to merge a tracking branch that comes from a
remote repository accessed by the very common SSH URL format of
"user@host:/path/to/repo" then we really don't need the username
as part of the merge message, it only clutters up the history and
makes things more confusing. So we instead clip the username part
off if the local filesystem path is absolute, as its probably not
going to be an ambiguous URL even when it is missing the username.

On the other hand we cannot clip the username off if the URL is
not absolute, because in such cases (e.g. "user@host:myrepo") the
directory that the repository path is resolved in is relative to
the user's home directory, and the username becomes important.

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

git-gui: Format tracking branch merges as though they... Shawn O. Pearce Wed, 25 Jul 2007 08:54:53 +0000 (04:54 -0400)

git-gui: Format tracking branch merges as though they were pulls

If we are merging a tracking branch we know exactly what remote URL
that branch is fetched from, and what its name is on that remote
repository. In this case we can setup a merge message that looks
just like a standard `git-pull $remote $branch` operation by filling
out FETCH_HEAD before we start git-merge, and then run git-merge just
like git-pull does.

I think the result of this behavior is that merges look a lot nicer
when the came off of local tracking branches, because they no longer
say "commit 'origin/...'" to describe the commit being merged but
instead now mention the specific repository we fetched those commits
from.

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

git-gui: Cleanup bindings within merge dialogShawn O. Pearce Wed, 25 Jul 2007 08:32:18 +0000 (04:32 -0400)

git-gui: Cleanup bindings within merge dialog

Misc. code cleanups in the merge dialog's binding setup and action
button creation.

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

git-gui: Replace merge dialog with our revision picker... Shawn O. Pearce Wed, 25 Jul 2007 07:44:50 +0000 (03:44 -0400)

git-gui: Replace merge dialog with our revision picker widget

Now that we only support merging one branch we can offer the user
a better user interface experience by allowing them to select the
revision they want to merge through our revision picking widget.

This change neatly solves the problem of locating a branch out of
a sea of 200 tracking branches, and of dealing with very long branch
names that all have a common prefix.

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

git-gui: Show ref last update times in revision chooser... Shawn O. Pearce Wed, 25 Jul 2007 08:20:02 +0000 (04:20 -0400)

git-gui: Show ref last update times in revision chooser tooltips

If we can we now show the last modification date of a loose ref as
part of the tooltip information shown in the revision picker. This
gives the user an indication of when was the last time that the ref
was modified locally, and may especially be of interest when looking
at a tracking branch.

If we cannot find the loose ref file than we try to fallback on the
reflog and scan it for the date of the last record. We don't start
with the reflog however as scanning it backwards from the end is not
an easy thing to do in Tcl. So I'm being lazy here and just going
through the entire file, line by line. Since that is less efficient
than a single stat system call, its our fallback strategy.

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

git-gui: Display commit/tag/remote info in tooltip... Shawn O. Pearce Wed, 25 Jul 2007 08:13:00 +0000 (04:13 -0400)

git-gui: Display commit/tag/remote info in tooltip of revision picker

Our revision chooser mega-widget now sets up tooltips for itself so
that it displays details about a commit (or a tag and the commit
it refers to) when the user mouses over that line in the filtered
ref list. If the item is from a remote tracking branch then we also
show the remote url and what branch on that remote we fetch from, so
the user has a clear concept of where that revision data originated.

To help the merge dialog I've also added a new constructor that
makes the dialog only offer unmerged revisions (those not in HEAD),
as this allows users to avoid performing merges only to get "Already
up to date" messages back from core Git.

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

git-gui: Save remote urls obtained from config/remotes... Shawn O. Pearce Wed, 25 Jul 2007 07:27:57 +0000 (03:27 -0400)

git-gui: Save remote urls obtained from config/remotes setup

I'm storing the URLs of any pre-configured remote repositories
that we happen to come across so that we can later use these
URLs to show to the user in parts of the UI that might care.

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

GIT 1.5.3-rc3 v1.5.3-rc3Junio C Hamano Wed, 25 Jul 2007 04:39:33 +0000 (21:39 -0700)

GIT 1.5.3-rc3

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

git.el: Pass an explicit argument to enable smerge... Alexandre Julliard Tue, 24 Jul 2007 10:02:28 +0000 (12:02 +0200)

git.el: Pass an explicit argument to enable smerge-mode.

Without argument the mode is toggled, which would do the wrong thing
if the file was already open.

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

pretty-options.txt: tiny doc fixJim Meyering Tue, 24 Jul 2007 18:59:47 +0000 (20:59 +0200)

pretty-options.txt: tiny doc fix

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t9200: Be careful when checking CVS/EntriesJunio C Hamano Wed, 25 Jul 2007 06:25:38 +0000 (23:25 -0700)

t9200: Be careful when checking CVS/Entries

CVS/Entries file can contain a line with single D to say "this
directory does not have any subdirectories". Do not get
confused with such an entry.

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

git am: skip pine's internal folder dataJohannes Schindelin Tue, 24 Jul 2007 00:02:25 +0000 (01:02 +0100)

git am: skip pine's internal folder data

Test if the From: line contains "Mail System Internal Data" and if
it is, skip this mail.

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

Teach git-commit about commit message templates.Steven Grimm Mon, 23 Jul 2007 04:17:42 +0000 (21:17 -0700)

Teach git-commit about commit message templates.

These are useful in organizations that enforce particular formats
for commit messages, e.g., to specify bug IDs or test plans.
Use of the template is not enforced; it is simply used as the
initial content when the editor is invoked.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach approxidate() to understand "never"Johannes Schindelin Tue, 24 Jul 2007 18:18:34 +0000 (19:18 +0100)

Teach approxidate() to understand "never"

If you want to keep the reflogs around for a really long time, you should be
able to say so:

$ git config gc.reflogExpire never

Now it works, too.

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

git log -g: Complain, but do not fail, when no reflogs... Johannes Schindelin Mon, 23 Jul 2007 23:39:50 +0000 (00:39 +0100)

git log -g: Complain, but do not fail, when no reflogs are there

When asking "git log -g --all", clearly you want to see only those refs
that do have reflogs, but you do not want it to fail, either.

So instead of die()ing, complain about it, but move on to the other refs.

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

send-email: Update regex parsing for pine aliasesKumar Gala Tue, 24 Jul 2007 14:50:38 +0000 (09:50 -0500)

send-email: Update regex parsing for pine aliases

The pine address book format is tab seperated and the first field
is the nickname/alias and the third field is the email address as
per:

http://www.washington.edu/pine/tech-notes/low-level.html

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cvsexportcommit: avoid racy CVS problem.Robin Rosenberg Tue, 24 Jul 2007 22:56:20 +0000 (00:56 +0200)

cvsexportcommit: avoid racy CVS problem.

If git cvsexportcommit is executed fast enough in sequence, the CVS
timestamps could end up being the same. CVS tries to fix this
by sleeping until the CPU clock changes seconds. Unfortunately,
the CPU clock and the file system clock are not necessarily the same, so
the timestamps could be the same anyway. When that happens CVS may not
recognize changed files and cvs will forget to commit some files.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cleanup unpack-trees.c: shrink struct tree_entry_listRené Scharfe Tue, 24 Jul 2007 21:54:25 +0000 (23:54 +0200)

cleanup unpack-trees.c: shrink struct tree_entry_list

Remove the two write-only fields executable and symlink from struct
tree_entry_list. Also replace usage of the field directory with
S_ISDIR checks on the mode field, and then remove this now obsolete
field, too. Noticed by David Kastrup.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

filter-branch: fix dash complaining about "Missing... René Scharfe Tue, 24 Jul 2007 21:29:29 +0000 (23:29 +0200)

filter-branch: fix dash complaining about "Missing '))'"

On e.g. Ubuntu, dash is used as /bin/sh. Unlike bash it parses
commands like

a=$((echo stuff) | wc)

as an arithmetic expression while what we want is a subshell inside
a command substitution. Resolve the ambiguity by placing a space
between the two opening parentheses.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb: More detailed error messages for snapshot formatJakub Narebski Tue, 24 Jul 2007 23:19:58 +0000 (01:19 +0200)

gitweb: More detailed error messages for snapshot format

Improve error messages for snapshot format in git_snapshot:
distinguish between situation where snapshots are turned off, where
snapshot format ('sf') parameter is invalid, where given snapshot
format does not exist in %known_snapshot_formats hash, and where
gitweb was given unsupported snapshot format.

While at it, use first from all supported snapshots format as default,
if no snapshot format was provided.

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

git.el: Support for incremental status updates.Alexandre Julliard Tue, 24 Jul 2007 10:12:47 +0000 (12:12 +0200)

git.el: Support for incremental status updates.

When we know which files have been modified, we can now run diff-index
or ls-files with a file list to refresh only the specified files
instead of the whole project.

This also allows proper refreshing of files upon add/delete/resolve,
instead of making assumptions about the new file state.

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

user-manual: fix typolets.Junio C Hamano Tue, 24 Jul 2007 08:58:51 +0000 (01:58 -0700)

user-manual: fix typolets.

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

Mark user-manual as UTF-8Junio C Hamano Tue, 24 Jul 2007 07:46:35 +0000 (00:46 -0700)

Mark user-manual as UTF-8

There have been several complaints against k.org's user-manual
page. The document is generated in ISO-8859-1 by the xsltproc
toolchain (I suspect this is because released docbook.xsl we use
has xsl:output element that says the output is ISO-8859-1) but
server delivers it with "charset=UTF-8", and all h*ll breaks
loose.

This attempts to force UTF-8 on the generating end.

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

Teach revision machinery about --no-walkJohannes Schindelin Mon, 23 Jul 2007 23:38:40 +0000 (00:38 +0100)

Teach revision machinery about --no-walk

The flag "no_walk" is present in struct rev_info since a long time, but
so far has been in use exclusively by "git show".

With this flag, you can see all your refs, ordered by date of the last
commit:

$ git log --abbrev-commit --pretty=oneline --decorate --all --no-walk

which is extremely helpful if you have to juggle with a lot topic
branches, and do not remember in which one you introduced that uber
debug option, or simply want to get an overview what is cooking.

(Note that the "git log" invocation above does not output the same as

$ git show --abbrev-commit --pretty=oneline --decorate --all --quiet

since "git show" keeps the alphabetic order that "--all" returns the
refs in, even if the option "--date-order" was passed.)

For good measure, this also adds the "--do-walk" option which overrides
"--no-walk".

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

filter-branch: Big syntax change; support rewriting... Johannes Schindelin Mon, 23 Jul 2007 17:34:13 +0000 (18:34 +0100)

filter-branch: Big syntax change; support rewriting multiple refs

We used to take the first non-option argument as the name for the new
branch. This syntax is not extensible to support rewriting more than just
HEAD.

Instead, we now have the following syntax:

git filter-branch [<filter options>...] [<rev-list options>]

All positive refs given in <rev-list options> are rewritten. Yes,
in-place. If a ref was changed, the original head is stored in
refs/original/$ref now, for your inspecting pleasure, in addition to the
reflogs (since it is easier to inspect "git show-ref | grep original" than
to inspect all the reflogs).

This commit also adds the --force option to remove .git-rewrite/ and all
refs from refs/original/ before filtering.

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

rebase -i: exchange all "if [ .. ]" by "if test .."Johannes Schindelin Tue, 24 Jul 2007 02:18:28 +0000 (03:18 +0100)

rebase -i: exchange all "if [ .. ]" by "if test .."

This patch is literally

:%s/if \[ *\(.*[^ ]\) *\]/if test \1/

in vi, after making sure that the other instances of "[..]" are not
actually invocations of "test".

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

Shut "git rebase -i" up when no --verbose was givenJohannes Schindelin Mon, 23 Jul 2007 22:45:49 +0000 (23:45 +0100)

Shut "git rebase -i" up when no --verbose was given

Up to now, git rebase -i was quite chatty, showing through all the
nice core programs it called.

Now it only shows a progress meter by default.

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

mailinfo: fix 'fatal: cannot convert from utf-8 to... Johannes Schindelin Tue, 24 Jul 2007 00:03:26 +0000 (01:03 +0100)

mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'

For some reason, I got this error message. Maybe it does not make sense,
but then we should not really try to convert the text when it is not
necessary.

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

gitk: Wait for the window to become visible after creat... Paul Mackerras Mon, 23 Jul 2007 11:35:03 +0000 (21:35 +1000)

gitk: Wait for the window to become visible after creating it

When the git log process returned an error immediately, we were
sometimes getting no main window and no error window displayed,
with the gitk process just hanging waiting for something. It appears
that the tkwait in show_error, which waits for the error window to
be destroyed, wasn't sufficient to allow the main window or the error
window to be mapped.

This adds a wait in the main startup code after the main window
has been created to wait until it is visible. This seems to fix the
problem.

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

git-gui: Avoid unnecessary symbolic-ref call during... Shawn O. Pearce Sun, 22 Jul 2007 08:49:06 +0000 (04:49 -0400)

git-gui: Avoid unnecessary symbolic-ref call during checkout

If we are checking out the branch we are already on then there is no
need to call symbolic-ref to update the HEAD pointer to the "new"
branch name, it is already correct.

Currently this situation does not happen very often, but it can be
seen in some workflows where the user always recreates their local
branch from a remote tracking branch and more-or-less ignores what
branch he/she is on right now. As they say, ignorance is bliss.

This case will however become a tad more common when we overload
checkout_op to actually also perform all of our merges. In that
case we will likely see that the branch we want to "checkout" is
the current branch, as we are actually just merging into it.

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

git-gui: Refactor current branch menu items to make... Shawn O. Pearce Mon, 23 Jul 2007 05:11:08 +0000 (01:11 -0400)

git-gui: Refactor current branch menu items to make i18n easier

The i18n team has also identified a rather ugly block of code in
git-gui that is used to make a pair of Repository menu items show
the current branch name. This code is difficult to convert to use
[mc ...] to lookup the translation, so I'm refactoring it into a
procedure.

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

git-gui: Refactor diff popup into a procedure to ease... Shawn O. Pearce Mon, 23 Jul 2007 04:36:39 +0000 (00:36 -0400)

git-gui: Refactor diff popup into a procedure to ease i18n work

The folks working on the i18n version of git-gui have had some
trouble trying to convert these English strings into [mc] calls
due to the double evaluation. Moving this block into a standard
procedure eliminates the double evaluation, making their work
easier.

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

git-gui: Paper bag fix quitting crash after commitShawn O. Pearce Mon, 23 Jul 2007 04:20:04 +0000 (00:20 -0400)

git-gui: Paper bag fix quitting crash after commit

My earlier introduction of the GITGUI_BCK file (which saves the user's
commit message buffer while they are typing it) broke the Quit function.
If the user makes a commit we delete the GITGUI_BCK file; if they then
immediately quit the application we fail to rename the GITGUI_BCK file
to GITGUI_MSG. This is because the file does not exist, but our flag
still says it does. The root cause is we did not unset the flag during
commit.

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

git-gui: Clarify meaning of add tracked menu optionShawn O. Pearce Mon, 23 Jul 2007 04:12:30 +0000 (00:12 -0400)

git-gui: Clarify meaning of add tracked menu option

Junio recently pointed out on the mailing list that our "Add Existing"
feature is a lot like `git add -u`, which is generally described as
"(Re)Add Tracked Files". This came up during discussion of how to
translate "Add Existing" into Japanese, as the individual working on
the translation was not quite sure what the option meant and therefore
had some trouble selecting the best translation.

I'm changing the menu option to "Add Tracked Files To Commit" and the
button to "Add Tracked". This should help new users to better understand
the actions behind those GUI widgets.

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

gitweb: Fix support for legacy gitweb config for snapshotsJakub Narebski Sun, 22 Jul 2007 21:41:20 +0000 (23:41 +0200)

gitweb: Fix support for legacy gitweb config for snapshots

Earlier commit which cleaned up snapshot support and introduced
support for multiple snapshot formats changed the format of
$feature{'snapshot'}{'default'} (gitweb configuration) and
gitweb.snapshot configuration variable (repository configuration).
It supported old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip'
and tried to support, but failed to do that, old values of
$feature{'snapshot'}{'default'}; at least those corresponding to
old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip', i.e.
['x-gzip', 'gz', 'gzip']
['x-bzip2', 'bz2', 'bzip2']
['x-zip', 'zip', '']

This commit moves legacy configuration support out of feature_snapshot
subroutine to separate filter_snapshot_fmts subroutine. The
filter_snapshot_fmts is used on result on result of
gitweb_check_feature('snapshot'). This way feature_snapshot deals
_only_ with repository config.

As a byproduct you can now use 'gzip' and 'bzip2' as aliases to 'tgz'
and 'tbz2' also in $feature{'snapshot'}{'default'}, not only in
gitweb.snapshot.

While at it do some whitespace cleanup: use tabs for indent, but
spaces for align.

Noticed-by: Matt McCutchen <hashproduct@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Tested-by: Matt McCutchen <hashproduct@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck --lost-found: write blob's contents, not their... Johannes Schindelin Sun, 22 Jul 2007 20:20:26 +0000 (21:20 +0100)

fsck --lost-found: write blob's contents, not their SHA-1

When looking for a lost blob, it is much nicer to be able to grep
through .git/lost-found/other/* than to write an inefficient loop
over the file names. So write the contents of the dangling blobs,
not their object names.

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

[PATCH] gitk: Bind keyboard actions to the command... Shawn O. Pearce Thu, 19 Jul 2007 04:37:58 +0000 (00:37 -0400)

[PATCH] gitk: Bind keyboard actions to the command key on Mac OS

git-gui already uses the command key for accelerators, but gitk has
never done so. I'm actually finding it very hard to move back and
forth between the two applications as git-gui is following the Mac
OS X conventions and gitk is not.

This trick is the same one that git-gui uses to determine which
key to bind actions to.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

[PATCH] gitk: Ignore ctrl-z as EOF on windowsMark Levedahl Tue, 17 Jul 2007 22:42:04 +0000 (18:42 -0400)

[PATCH] gitk: Ignore ctrl-z as EOF on windows

Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
end-of-file marker, while some commits in the git repository and possibly
elsewhere include that character in the commit comment. This causes gitk
ignore commit history following such a comment and incorrect graphs. This
change affects only Windows as Tcl on other platforms already has
eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
the fix was suggested by Shawn Pierce.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Make the fake commit for the index changes green... Paul Mackerras Sun, 22 Jul 2007 12:05:30 +0000 (22:05 +1000)

gitk: Make the fake commit for the index changes green rather than magenta

The magenta was a bit close in color to the normal blue commits. This
makes them green instead as suggested by Linus.

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

Avoid to duplicate commit message when is not encodedMarco Costalba Sun, 22 Jul 2007 08:23:05 +0000 (10:23 +0200)

Avoid to duplicate commit message when is not encoded

When a commit message doesn't have encoding information
and encoding output is utf-8 (default) then an useless
xstrdup() of commit message is done.

If we assume most of users live in an utf-8 world, this
useless copy is the common case.

Performance issue found with KCachegrind.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Synonyms: -i == --regexp-ignore-case, -E == --extended... Junio C Hamano Sun, 22 Jul 2007 06:18:33 +0000 (23:18 -0700)

Synonyms: -i == --regexp-ignore-case, -E == --extended-regexp

These options to log family were too long to type. Give them
shorter synonyms.

Fix the parsing of the long options while at it.

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

git-gui: Fix unnecessary fast-forward during checkoutShawn O. Pearce Sun, 22 Jul 2007 08:09:53 +0000 (04:09 -0400)

git-gui: Fix unnecessary fast-forward during checkout

If we are trying to checkout a local branch which is matched to a
remote tracking branch, but the local branch is newer than the remote
tracking branch we actually just want to switch to the local branch.
The local branch is "Already up to date".

Unfortunately we tossed away the local branch's commit SHA-1 and kept
the remote tracking branch's SHA-1, which meant that the user lost the
local changes when we updated the working directory. At least we did
not update the local branch ref, so the user's data was still intact.

We now toss the tracking branch's SHA-1 and replace with the local
branch's SHA-1 before the checkout, ensuring that we pass of the right
tree to git-read-tree when we update the working directory.

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

git-gui: Completely remove my Tools/Migrate hackShawn O. Pearce Sat, 21 Jul 2007 20:32:42 +0000 (16:32 -0400)

git-gui: Completely remove my Tools/Migrate hack

This menu option of Tools/Migrate has been living inside of git-gui
as a local hack to support some coworkers of mine. It has no value
to anyone outside of my day-job team and never really should have
been in a release version of git-gui. So I'm pulling it out, so
that nobody else has to deal with this garbage.

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

Documentation/gitignore.txt: Fix the seriously misleadi... David Kastrup Sat, 21 Jul 2007 23:53:49 +0000 (01:53 +0200)

Documentation/gitignore.txt: Fix the seriously misleading priority explanation

Signed-off-by: David Kastrup <dak@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix VISUAL/EDITOR preference order in Documentation... Junio C Hamano Sun, 22 Jul 2007 05:37:56 +0000 (22:37 -0700)

Fix VISUAL/EDITOR preference order in Documentation/config.txt.

I screwed up when amending ef0c2abf.

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

gitweb: snapshot cleanups & support for offering multip... Matt McCutchen Sat, 21 Jul 2007 23:30:27 +0000 (01:30 +0200)

gitweb: snapshot cleanups & support for offering multiple formats

- Centralize knowledge about snapshot formats (mime types, extensions,
commands) in %known_snapshot_formats and improve how some of that
information is specified. In particular, zip files are no longer a
special case.

- Add support for offering multiple snapshot formats to the user so
that he/she can download a snapshot in the format he/she prefers.
The site-wide or project configuration now gives a list of formats
to offer, and if more than one format is offered, the "_snapshot_"
link becomes something like "snapshot (_tar.bz2_ _zip_)".

- If only one format is offered, a tooltip on the "_snapshot_" link
tells the user what it is.

- Fix out-of-date "tarball" -> "archive" in comment.

Alert for gitweb site administrators: This patch changes the format of
$feature{'snapshot'}{'default'} in gitweb_config.perl from a list of
three pieces of information about a single format to a list of one or
more formats you wish to offer from the set ('tgz', 'tbz2', 'zip').
Update your gitweb_config.perl appropriately. There was taken care
for old-style gitweb configuration to work as it used to, but this
backward compatibility works only for the values which correspond to
gitweb.snapshot values of 'gzip', 'bzip2' and 'zip', i.e.
['x-gzip', 'gz', 'gzip']
['x-bzip2', 'bz2', 'bzip2']
['x-zip', 'zip', '']

The preferred names for gitweb.snapshot in repository configuration
have also changed from 'gzip' and 'bzip2' to 'tgz' and 'tbz2', but
the old names are still recognized for compatibility.

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

rebase -i: call editor just once for a multi-squashJohannes Schindelin Sat, 21 Jul 2007 17:09:41 +0000 (18:09 +0100)

rebase -i: call editor just once for a multi-squash

Sometimes you want to squash more than two commits. Before this patch,
the editor was fired up for each squash command. Now the editor is
started only with the last squash command.

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

git-gui: Internally allow fetch without storing for... Shawn O. Pearce Fri, 20 Jul 2007 08:10:13 +0000 (04:10 -0400)

git-gui: Internally allow fetch without storing for future pull support

This is actually just an underlying code improvement that has no user
visible component yet. UI improvements to actually fetch and merge via
an arbitrary remote with no tracking branches must still follow to make
this change useful for the end-user.

Our tracking branch specifications are a Tcl list of three components:

- local tracking branch name
- remote name/url
- remote branch name/tag name

This change just makes the first element optional. If it is an empty
string we will run the fetch, but have the value be saved only into the
special .git/FETCH_HEAD, where we can pick it up and use it for this one
time operation.

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

git-gui: Skip unnecessary read-tree work during checkoutShawn O. Pearce Fri, 20 Jul 2007 07:56:06 +0000 (03:56 -0400)

git-gui: Skip unnecessary read-tree work during checkout

I totally missed this obvious optimization in the checkout code path.
If our current repository HEAD is actually at the commit we are moving
to, and we agreed to perform this switch earlier, then we have no files
to update in the working directory and any stale mtimes are simply not
of consequence right now. We can pretend like we ran a read-tree and
skip right into the post-read-tree work, such as updating the branch
and setting the symbolic-ref.

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

git-gui: Simplify error case for unsupported merge... Shawn O. Pearce Fri, 20 Jul 2007 07:37:43 +0000 (03:37 -0400)

git-gui: Simplify error case for unsupported merge types

If we are given a merge type we don't understand in checkout_op there
is probably a bug in git-gui somewhere that allowed this unknown merge
strategy to come into this part of the code path. We currently only
recognize three merge types ('none', 'ff' and 'reset') but are going
to be supporting more in the future. Rather than keep editing this
message I'm going with a very generic "Uh, we don't do that!" type of
error.

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

git-gui: Factor out common fast-forward merge caseShawn O. Pearce Fri, 20 Jul 2007 07:34:56 +0000 (03:34 -0400)

git-gui: Factor out common fast-forward merge case

In both the ff and reset merge_types supported by checkout_op the
result is the same if the merge base of our target commit and the
existing commit is the existing commit: its a fast-forward as the
existing commit is fully contained in the target commit.

This minor cleanup in logic will make it easier to implement a
new kind of merge_type that actually merges the two trees with a
real merge strategy, such as git-merge-recursive.

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

git-gui: Save the merge base during checkout_op processingShawn O. Pearce Fri, 20 Jul 2007 06:13:24 +0000 (02:13 -0400)

git-gui: Save the merge base during checkout_op processing

I've decided to teach checkout_op how to perform more than just a
fast-forward and reset type of merge. This way we can also do a full
recursive merge even when we are recreating an existing branch from
a remote. To help with that process I'm saving the merge-base we
computed during the ff/reset/fail decision process, in case we need
it later on when we actually start a true merge operation.

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

git-gui: Automatically backup the user's commit bufferShawn O. Pearce Sat, 21 Jul 2007 08:57:57 +0000 (04:57 -0400)

git-gui: Automatically backup the user's commit buffer

A few users have been seeing crashes in Tk when using the undo key
binding to undo the last few keystroke events in the commit buffer.
Unfortunately that means the user loses their commit message and
must start over from scratch when the user restarts the process.

git-gui now saves the user's commit message buffer every couple of
seconds to a temporary file under .git (specifically .git/GITGUI_BCK).
At exit time we rename this file to .git/GITGUI_MSG if there is a
message, the file exists, and it is currently synchronized with the
Tk buffer. Otherwise we do our usual routine of saving the Tk buffer
to .git/GITGUI_MSG and delete .git/GITGUI_BCK, if it exists.

During startup we favor .git/GITGUI_BCK over .git/GITGUI_MSG. This
way a crash doesn't take out the user's message buffer but instead
will cause the user to lose only a few keystrokes. Most people do
not type more than 200 WPM, and with 30 possible saves per minute
we are unlikely to lose more than 7 words.

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

Fix up duplicate parents removalLinus Torvalds Sat, 21 Jul 2007 06:11:19 +0000 (23:11 -0700)

Fix up duplicate parents removal

This removes duplicate parents properly, making gitk happy again.

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

gitweb cleanup: Move @diff_opts declaration earlierJakub Narebski Fri, 20 Jul 2007 00:15:09 +0000 (02:15 +0200)

gitweb cleanup: Move @diff_opts declaration earlier

Move @diff_opts declaration earlier, so that all gitweb options are
together (and not separated by %feature hash and some subroutines),
with the exception of $GITWEB_CONFIG which must be after all option
variables including %feature hash.

While at it, in the moved comment, note that diff option '-C' implies
'-M', instead of suggesting that '-M', '-C' is required.

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

Add GIT_EDITOR environment and core.editor configuratio... Adam Roben Fri, 20 Jul 2007 05:09:35 +0000 (22:09 -0700)

Add GIT_EDITOR environment and core.editor configuration variables

These variables let you specify an editor that will be launched in
preference to the EDITOR and VISUAL environment variables. The order
of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL.

[jc: added a test and config variable documentation]

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

Document how to tell git to not launch a pagerSteven Grimm Thu, 19 Jul 2007 10:43:51 +0000 (03:43 -0700)

Document how to tell git to not launch a pager

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Completely remove support for creating octopus... Shawn O. Pearce Thu, 19 Jul 2007 06:24:25 +0000 (02:24 -0400)

git-gui: Completely remove support for creating octopus merges

I'm working on refactoring the UI of the merge dialog, because as it
currently stands the dialog is absolutely horrible, especially when
you have 200+ branches available from a single remote system.

In that refactoring I plan on using the choose_rev widget to allow
the user to select exactly which branch/commit they want to merge.
However since that only selects a single commit I'm first removing
the code that supports octopus merges.

A brief consultation on #git tonight seemed to indicate that the
octopus merge strategy is not as useful as originally thought when
it was invented, and that most people don't commonly use them. So
making users fall back to the command line to create an octopus is
actually maybe a good idea here, as they might think twice before
they use it.

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

git-gui: Don't show blame tooltips that we have no... Shawn O. Pearce Thu, 19 Jul 2007 05:45:42 +0000 (01:45 -0400)

git-gui: Don't show blame tooltips that we have no data for

If we haven't yet loaded any commit information for a given line but
our tooltip timer fired and tried to draw the tooltip we shouldn't;
there is nothing to show.

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

git-gui: Translate standard encoding names to Tcl onesShawn O. Pearce Thu, 19 Jul 2007 05:13:29 +0000 (01:13 -0400)

git-gui: Translate standard encoding names to Tcl ones

This is a essentially a copy of Paul Mackerras encoding support from
gitk. I stole the code from gitk commit fd8ccbec4f0161, as Paul has
already done all of the hard work setting up this translation table.

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

git-gui: Avoid unnecessary global statements when possibleShawn O. Pearce Thu, 19 Jul 2007 04:43:16 +0000 (00:43 -0400)

git-gui: Avoid unnecessary global statements when possible

Running global takes slightly longer than just accessing the variable
via its package name, especially if the variable is just only once in
the procedure, or isn't even used at all in the procedure. So this is
a minor cleanup for some of our commonly invoked procedures.

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

git-gui: Bind Ctrl/Cmd-M to merge actionShawn O. Pearce Thu, 19 Jul 2007 04:39:23 +0000 (00:39 -0400)

git-gui: Bind Ctrl/Cmd-M to merge action

Users who merge often may want to access the merge action quickly,
so we now bind M to the merge action.

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

Don't offer my special Tools/Migrate hack unless in... Shawn O. Pearce Wed, 18 Jul 2007 13:37:27 +0000 (09:37 -0400)

Don't offer my special Tools/Migrate hack unless in multicommit

Users shouldn't see this menu option if they startup a browser or
blame from the command line, especially if they are doing so on a
bare repository.

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

Rename read_pipe() with read_fd() and make its buffer... Carlos Rica Wed, 18 Jul 2007 18:31:03 +0000 (20:31 +0200)

Rename read_pipe() with read_fd() and make its buffer nul-terminated.

The new name is closer to the purpose of the function.

A NUL-terminated buffer makes things easier when callers need that.
Since the function returns only the memory written with data,
almost always allocating more space than needed because final
size is unknown, an extra NUL terminating the buffer is harmless.
It is not included in the returned size, so the function
remains working as before.

Also, now the function allows the buffer passed to be NULL at first,
and alloc_nr is now used for growing the buffer, instead size=*2.

Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://people.freedesktop.org... Junio C Hamano Thu, 19 Jul 2007 00:23:03 +0000 (17:23 -0700)

Merge branch 'master' of git://people.freedesktop.org/~hausmann/git-p4

* 'master' of git://people.freedesktop.org/~hausmann/git-p4:
git-p4: Cleanup, used common function for listing imported p4 branches
git-p4: Fix upstream branch detection for submit/rebase with multiple branches.
git-p4: Cleanup, make listExistingP4Branches a global function for later use.
git-p4: input to "p4 files" by stdin instead of arguments
git-p4: use subprocess in p4CmdList

filter-branch: get rid of "set -e"Johannes Schindelin Wed, 18 Jul 2007 13:17:43 +0000 (14:17 +0100)

filter-branch: get rid of "set -e"

It was reported by Alex Riesen that "set -e" can break something as
trivial as "unset CDPATH" in bash.

So get rid of "set -e".

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

git-svn: Minimalistic patch which allows svn usernames... Richard MUSIL Tue, 17 Jul 2007 17:02:57 +0000 (19:02 +0200)

git-svn: Minimalistic patch which allows svn usernames with space(s).

Changed filter for username in svn-authors file, so even 'user name' is accepted.

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

Do a better job at guessing unknown character setsLinus Torvalds Tue, 17 Jul 2007 17:34:44 +0000 (10:34 -0700)

Do a better job at guessing unknown character sets

At least in the kernel development community, we're generally slowly
converting to UTF-8 everywhere, and the old default of Latin1 in emails is
being supplanted by UTF-8, and it doesn't necessarily show up as such in
the mail headers (because, quite frankly, when people send patches
around, they want the email client to do as little as humanly possible
about the patch)

Despite that, it's often the case that email addresses etc still have
Latin1, so I've seen emails where this is a mixed bag, with Signed-off
parts being copied from email (and containing Latin1 characters), and the
rest of the email being a patch in UTF-8.

So this suggests a very natural change: if the target character set is
utf-8 (the default), and if the source already looks like utf-8, just
assume that it doesn't need any conversion at all.

Only assume that it needs conversion if it isn't already valid utf-8, in
which case we (for historical reasons) will assume it's Latin1.

Basically no really _valid_ latin1 will ever look like utf-8, so while
this changes our historical behaviour, it doesn't do so in practice, and
makes the default behaviour saner for the case where the input was already
in proper format.

We could do a more fancy guess, of course, but this correctly handled a
series of patches I just got from Andrew that had a mixture of Latin1 and
UTF-8 (in different emails, but without any character set indication).

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

Document "git stash message..."しらいしななこ Tue, 17 Jul 2007 08:15:42 +0000 (17:15 +0900)

Document "git stash message..."

The command was recently updated to take message on the command line, but
this feature has not been documented.

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

unpack-trees.c: assume submodules are clean during... Sven Verdoolaege Tue, 17 Jul 2007 18:28:28 +0000 (20:28 +0200)

unpack-trees.c: assume submodules are clean during check-out

In particular, when moving back to a commit without a given submodule
and then moving back forward to a commit with the given submodule,
we shouldn't complain that updating would lose untracked file in
the submodule, because git currently does not checkout subprojects
during superproject check-out.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Thu, 19 Jul 2007 00:00:36 +0000 (17:00 -0700)

Merge branch 'maint'

* maint:
Force listingblocks to be monospaced in manpages
Do not expect unlink(2) to fail on a directory.

Force listingblocks to be monospaced in manpagesJulian Phillips Wed, 18 Jul 2007 21:33:57 +0000 (22:33 +0100)

Force listingblocks to be monospaced in manpages

For the html output we can use a stylesheet to make sure that the
listingblocks are presented in a monospaced font. For the manpages do
it manually by inserting a ".ft C" before and ".ft" after the block in
question.

In order for these roff commands to get through to the manpage they
have to be element encoded to prevent quoting.

Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Cleanup, used common function for listing impor... Simon Hausmann Wed, 18 Jul 2007 15:27:50 +0000 (17:27 +0200)

git-p4: Cleanup, used common function for listing imported p4 branches

Signed-off-by: Simon Hausmann <simon@lst.de>

git-p4: Fix upstream branch detection for submit/rebase... Simon Hausmann Wed, 18 Jul 2007 10:40:12 +0000 (12:40 +0200)

git-p4: Fix upstream branch detection for submit/rebase with multiple branches.

Don't use git name-rev to locate the upstream git-p4 branch for rebase and submit but instead locate the branch by comparing the depot paths.
name-rev may produce results like wrongbranch~12 as it uses the first match.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>

git-p4: Cleanup, make listExistingP4Branches a global... Simon Hausmann Wed, 18 Jul 2007 08:56:31 +0000 (10:56 +0200)

git-p4: Cleanup, make listExistingP4Branches a global function for later use.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>

Do not expect unlink(2) to fail on a directory.Junio C Hamano Wed, 18 Jul 2007 05:58:28 +0000 (22:58 -0700)

Do not expect unlink(2) to fail on a directory.

When "git checkout-index" checks out path A/B/C, it makes sure A
and A/B are truly directories; if there is a regular file or
symlink at A, we prefer to remove it.

We used to do this by catching an error return from mkdir(2),
and on EEXIST did unlink(2), and when it succeeded, tried
another mkdir(2).

Thomas Glanzmann found out the above does not work on Solaris
for a root user, as unlink(2) was so old fashioned there that it
allowed to unlink a directory.

As pointed out, this still doesn't guarantee that git won't call
"unlink()" on a directory (race conditions etc), but that's
fundamentally true (there is no "funlink()" like there is
"fstat()"), and besides, that is in no way git-specific (ie it's
true of any application that gets run as root).

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

git-gui: Convert merge dialog to use class systemShawn O. Pearce Wed, 18 Jul 2007 06:56:44 +0000 (02:56 -0400)

git-gui: Convert merge dialog to use class system

I've found that the class code makes it a whole lot easier to create
more complex GUI code, especially the dialogs. So before I make any
major improvements to the merge dialog's interface I'm going to first
switch it to use the class system, so the code is slightly cleaner.

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

git-gui: Increase the default height of the revision... Shawn O. Pearce Wed, 18 Jul 2007 06:27:39 +0000 (02:27 -0400)

git-gui: Increase the default height of the revision picker

Showing only five lines of heads/tags is not very useful to a user
when they have about 10 branches that match the filter expression.
The list is just too short to really be able to read easily, at
least not without scrolling up and down. Expanding the list out
to 10 really makes the revision picker easier to read and access,
as you can read the matching branches much more quickly.

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

git-gui: Clarify the visualize history menu optionsShawn O. Pearce Wed, 18 Jul 2007 05:48:41 +0000 (01:48 -0400)

git-gui: Clarify the visualize history menu options

Users who are new to Git may not realize that visualizing things in
a repository involves looking at history. Adding in a small amount
of text to the menu items really helps to understand what the action
might do, before you invoke it.

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

git-gui: Allow users to browse any branch, not just... Shawn O. Pearce Wed, 18 Jul 2007 05:39:27 +0000 (01:39 -0400)

git-gui: Allow users to browse any branch, not just the current one

We now allow users to pick which commit they want to browse through
our revision picking mega-widget. This opens up in a dialog first,
and then opens a tree browser for that selected commit. It is a very
simple approach and requires minimal code changes.

I also clarified the language a bit in the Repository menu, to show
that these actions will access files. Just in case a user is not
quite sure what specific action they are looking for, but they know
they want some sort of file thing.

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

git-gui: Allow browser subcommand to start in subdirectoryShawn O. Pearce Wed, 18 Jul 2007 04:53:14 +0000 (00:53 -0400)

git-gui: Allow browser subcommand to start in subdirectory

Like our blame subcommand the browser subcommand now accepts both
a revision and a path, just a revision or just a path. This way
the user can start the subcommand on any branch, or on any subtree.

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

git-gui: Allow blame/browser subcommands on bare reposi... Shawn O. Pearce Wed, 18 Jul 2007 03:58:56 +0000 (23:58 -0400)

git-gui: Allow blame/browser subcommands on bare repositories

A long time ago Linus Torvalds tried to run git-gui on a bare
repository to look at the blame viewer, but it failed to start
because we required that the user run us only from within a
working directory that had a normal git repository associated
with it.

This change relaxes that requirement so that you can start the
tree browser or the blame viewer against a bare repository. In
the latter case we do require that you provide a revision and a
pathname if we cannot find the pathname in the current working
directory.

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

git-gui: Move feature option selection before GIT_DIR... Shawn O. Pearce Wed, 18 Jul 2007 03:23:56 +0000 (23:23 -0400)

git-gui: Move feature option selection before GIT_DIR init

By moving our feature option determination up before we look for GIT_DIR
we can make a decision about whether or not we need a working tree up
front, before we look for GIT_DIR. A future change could then allow
us to start in a bare Git repository if we only need access to the ODB.

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