gitweb.git
git-apply: notice "diff --git" patch againJunio C Hamano Wed, 21 Feb 2007 22:31:10 +0000 (14:31 -0800)

git-apply: notice "diff --git" patch again

Earlier one that tried to be too consistent with GNU patch by
not stripping the leading path when we _know_ we are in a
subdirectory and the patch is relative to the toplevel was a
mistake. This fixes it.

- No change to behaviour when it is run from the toplevel of
the repository.

- When run from a subdirectory to apply a git-generated patch,
it uses the right -p<n> value automatically, with or without
--index nor --cached option.

- When run from a subdirectory to apply a randomly generated
patch, it wants the right -p<n> value to be given by the
user.

The second one is a pure improvement to correct inconsistency
between --index and non --index case, compared with 1.5.0. The
third point could be further improved to guess what the right
value for -p<n> should be by looking at the patch, but should be
a topic of a separate patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix botched "leak fix"Junio C Hamano Wed, 21 Feb 2007 08:58:18 +0000 (00:58 -0800)

Fix botched "leak fix"

When (new_name == old_name), the previous one prefixed old_name
alone, leaving new_name untouched, and worse yet, left it
dangling pointing at an already freed memory location.

Signed-off-by: Junio C Hamano <junkio@cox.net>

t4119: add test for traditional patch and different... Junio C Hamano Wed, 21 Feb 2007 09:14:22 +0000 (01:14 -0800)

t4119: add test for traditional patch and different p_value

Signed-off-by: Junio C Hamano <junkio@cox.net>

apply: fix memory leak in prefix_one()Johannes Schindelin Tue, 20 Feb 2007 02:45:49 +0000 (03:45 +0100)

apply: fix memory leak in prefix_one()

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-apply: require -p<n> when working in a subdirectory.Junio C Hamano Tue, 20 Feb 2007 01:57:29 +0000 (17:57 -0800)

git-apply: require -p<n> when working in a subdirectory.

git-apply running inside a subdirectory, with or without --index,
used to always assume that the patch is formatted in such a way
to apply with -p1 from the toplevel, but it is more useful and
consistent with the use of "GNU patch -p1" if it defaulted to
assume that its input is meant to apply at the level it is
invoked in.

This changes the behaviour. It used to be that the patch
generated this way would apply without any trick:

edit Documentation/Makefile
git diff >patch.file
cd Documentation
git apply ../patch.file

You need to give an explicit -p2 to git-apply now. On the other
hand, if you got a patch from somebody else who did not follow
"patch is to apply from the top with -p1" convention, the input
patch would start with:

diff -u Makefile.old Makefile
--- Makefile.old
+++ Makefile

and in such a case, you can apply it with:

git apply -p0 patch.file

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-apply: do not lose cwd when run from a subdirectory.Junio C Hamano Tue, 20 Feb 2007 01:58:58 +0000 (17:58 -0800)

git-apply: do not lose cwd when run from a subdirectory.

When a patch modifies (not deletes) the last file in a
directory, because we treat a modification just as deletion
followed by creation, and deleting the last file in a directory
automatically rmdir(2)'s that directory, we ended up removing
the directory, which can potentially be the cwd, and then
recreating the same directory to create the patch result.

Avoid the rmdir step when remove_file() is called only because
we are replacing it with the result by later calling
create_file().

Signed-off-by: Junio C Hamano <junkio@cox.net>

Teach 'git apply' to look at $HOME/.gitconfig even... Junio C Hamano Sun, 18 Feb 2007 02:12:46 +0000 (18:12 -0800)

Teach 'git apply' to look at $HOME/.gitconfig even outside of a repository

Signed-off-by: Junio C Hamano <junkio@cox.net>

Teach 'git apply' to look at $GIT_DIR/configJunio C Hamano Sat, 17 Feb 2007 21:12:52 +0000 (13:12 -0800)

Teach 'git apply' to look at $GIT_DIR/config

When neither --index nor --cached was used, git-apply did not
try calling setup_git_directory(), which means it did not look
at configuration files at all. This fixes it to call the setup
function but still allow the command to be run in a directory
not controlled by git.

The bug probably meant that 'git apply', not moving up to the
toplevel, did not apply properly formatted diffs from the
toplevel when you are inside a subdirectory, even though 'git
apply --index' would. As a side effect, this patch fixes it as
well.

Signed-off-by: Junio C Hamano <junkio@cox.net>

GIT 1.5.0 v1.5.0Junio C Hamano Wed, 14 Feb 2007 00:00:00 +0000 (00:00 +0000)

GIT 1.5.0

Add release notes to the distribution.Junio C Hamano Tue, 13 Feb 2007 23:15:05 +0000 (15:15 -0800)

Add release notes to the distribution.

This also adds a hook in the Makefile I can use to automatically
include pointers to documentation for older releases when updating
the pages at http://kernel.org/pub/software/scm/git/docs/.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano Tue, 13 Feb 2007 21:48:52 +0000 (13:48 -0800)

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

* 'master' of git://repo.or.cz/git-gui:
git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"

Documentation: Moving out of detached HEAD does not... Junio C Hamano Tue, 13 Feb 2007 16:58:01 +0000 (08:58 -0800)

Documentation: Moving out of detached HEAD does not warn anymore.

The documentation still talked about the unnecessary 'safety'
in git-checkout.

Pointed out by Matthias Lederhofer.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Mark places that need blob munging later for CRLF conve... Linus Torvalds Tue, 13 Feb 2007 17:23:59 +0000 (09:23 -0800)

Mark places that need blob munging later for CRLF conversion.

Here's a patch that I think we can merge right now. There may be
other places that need this, but this at least points out the
three places that read/write working tree files for git
update-index, checkout and diff respectively. That should cover
a lot of it [jc: git-apply uses an entirely different codepath
both for reading and writing].

Some day we can actually implement it. In the meantime, this
points out a place for people to start. We *can* even start with
a really simple "we do CRLF conversion automatically, regardless
of filename" kind of approach, that just look at the data (all
three cases have the _full_ file data already in memory) and
says "ok, this is text, so let's convert to/from DOS format
directly".

THAT somebody can write in ten minutes, and it would already
make git much nicer on a DOS/Windows platform, I suspect.

And it would be totally zero-cost if you just make it a config
option (but please make it dynamic with the _default_ just being
0/1 depending on whether it's UNIX/Windows, just so that UNIX
people can _test_ it easily).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Update RPM core package descriptionNicolas Pitre Tue, 13 Feb 2007 16:39:01 +0000 (11:39 -0500)

Update RPM core package description

Git isn't as stupid as it used to be

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix potential command line overflow in hooks--updateAndy Parkins Tue, 13 Feb 2007 14:23:58 +0000 (14:23 +0000)

Fix potential command line overflow in hooks--update

In a repository with a large number of refs, the following command line
could easily overflow the command line size limitations

git-rev-list $newref $(git-rev-parse --not --all)

Fortunately, git-rev-list already has the means to cope with this
situation with the --stdin switch

git-rev-parse --not --all | git-rev-list --stdin $newref

Which is exactly what this patch does.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gc: run pack-refs by default unless the repo is... Johannes Schindelin Tue, 13 Feb 2007 13:01:42 +0000 (14:01 +0100)

git-gc: run pack-refs by default unless the repo is bare

The config variable gc.packrefs is tristate now: "true", "false"
and "notbare", where "notbare" is the default.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not... Andy Parkins Tue, 13 Feb 2007 15:26:16 +0000 (15:26 +0000)

git-gui: fix typo in GIT-VERSION-GEN, "/dev/null" not "/devnull"

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

"git-fetch --tags $URL" should not overwrite existing... Junio C Hamano Sun, 11 Feb 2007 21:41:23 +0000 (13:41 -0800)

"git-fetch --tags $URL" should not overwrite existing tags

Use the same --exclude-existing filter as we use for automatic
tag following to avoid overwriting existing tags with replacement
ones the other side created.

Signed-off-by: Junio C Hamano <junkio@cox.net>

for-each-reflog: not having $GIT_DIR/logs directory... Junio C Hamano Tue, 13 Feb 2007 07:21:34 +0000 (23:21 -0800)

for-each-reflog: not having $GIT_DIR/logs directory is not an error.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Do not forget to pack objects reachable from HEAD reflog.Junio C Hamano Tue, 13 Feb 2007 07:06:54 +0000 (23:06 -0800)

Do not forget to pack objects reachable from HEAD reflog.

Similar to commit eb8381c8, we need to use for_each_reflog() to make
sure we do not miss objects reachable from HEAD reflog.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Work around Subversion race in git-svn tests.Michael Spang Tue, 13 Feb 2007 00:33:37 +0000 (19:33 -0500)

Work around Subversion race in git-svn tests.

Some of the git-svn tests can fail on fast machines due to a race in
Subversion: if a file is modified in the same second it was checked out
(or in for that matter), Subversion will not consider it modified. This
works around the problem by increasing the timestamp by one second
before each commit.

[jc: with "touch -r -d" replacement from Eric]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Michael Spang <mspang@uwaterloo.ca>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Clarify that git-update-server-info should be run for... Pavel Roskin Tue, 13 Feb 2007 05:43:44 +0000 (00:43 -0500)

Clarify that git-update-server-info should be run for every git-push

The old text suggested that git-update-server-info only needs to be run
if new tags or branches are created, but not for new commits.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

blameview: Move the commit info to a pane below the... Aneesh Kumar K.V Mon, 12 Feb 2007 17:30:28 +0000 (23:00 +0530)

blameview: Move the commit info to a pane below the blame window.

Also spawn the the new blameview in the background

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git merge documentation: -m is optionalMatthias Lederhofer Mon, 5 Feb 2007 11:37:27 +0000 (12:37 +0100)

git merge documentation: -m is optional

Changed -m=<msg> to -m <msg> too.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Make gitk save and restore window pane position on... Mark Levedahl Tue, 13 Feb 2007 00:19:34 +0000 (19:19 -0500)

Make gitk save and restore window pane position on Linux and Cygwin.

Subtle bugs remained on both Cygwin and Linux that caused the various
window panes to be restored in positions different than where the user
last placed them. Sergey Vlasov posed a pair of suggested fixes to this,
what is done here is slightly different. The basic fix here involves
a) explicitly remembering and restoring the sash positions for the upper
window, and b) using paneconfigure to redundantly set height and width of
other elements. This redundancy is needed as Cygwin Tcl has a nasty habit
of setting pane sizes to zero if their slaves are not configured with a
specific size, but Linux Tcl does not honor the specific size given.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Add RPM target for git-guiJunio C Hamano Tue, 13 Feb 2007 00:28:15 +0000 (16:28 -0800)

Add RPM target for git-gui

Signed-off-by: Junio C Hamano <junkio@cox.net>

Link git-gui into the master Makefile.Shawn O. Pearce Mon, 12 Feb 2007 23:20:34 +0000 (18:20 -0500)

Link git-gui into the master Makefile.

I'm exporting gitexecdir because git-gui wants to know where
it should install git-gui and git-citool. These belong under
gitexecdir, just like git-diff, as the git wrapper is able to
invoke these commands for the end-user.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano Tue, 13 Feb 2007 00:07:29 +0000 (16:07 -0800)

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

* 'master' of git://repo.or.cz/git-gui:
git-gui: Change base version to 0.6.
git-gui: Guess our version accurately as a subproject.
git-gui: Handle gitgui tags in version gen.
git-gui: Generate a version file on demand.
git-gui: Rename GIT_VERSION to GITGUI_VERSION.
git-gui: Allow gitexecdir, INSTALL to be set by the caller.

git-gui: Change base version to 0.6. gitgui-0.6.0Shawn O. Pearce Mon, 12 Feb 2007 22:45:21 +0000 (17:45 -0500)

git-gui: Change base version to 0.6.

This is the start of the 0.6 series of git-gui. I'm calling it 0.6
(rather than any other value) as I already had a private tag on
one system based on 0.5, and that tag is quite a bit behind this
version.

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

git-gui: Guess our version accurately as a subproject.Shawn O. Pearce Mon, 12 Feb 2007 22:05:10 +0000 (17:05 -0500)

git-gui: Guess our version accurately as a subproject.

When we are included as a subproject, such as how git.git carries
us, we want to retain our own version number and not the version
number assigned by git.git's own tags. Consequently we need to
locate the correct tag which applies to our tree content and
its commit lineage.

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

git-gui: Handle gitgui tags in version gen.Shawn O. Pearce Mon, 12 Feb 2007 21:38:29 +0000 (16:38 -0500)

git-gui: Handle gitgui tags in version gen.

I've decided to use gitgui-0.5 as the format for tags in the
git-gui repository. The prefix of gitgui was chosen here to
make its namespace different from the namespace used by git
itself, allowing developers to pull both tag namespaces into
the same repository.

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

git-gui: Generate a version file on demand.Shawn O. Pearce Mon, 12 Feb 2007 21:14:44 +0000 (16:14 -0500)

git-gui: Generate a version file on demand.

Because git-gui is being shipped as a subproject of the main
Git project and will often have a different lifecycle than
the main Git project, we should ship our own version number
in the release tarball rather than relying on the main Git
version file.

Git's master Makefile will invoke our own with the target
dist-version, asking us to save off our GITGUI_VERSION value
into our own version file, so that our GIT-VERSION-GEN script
can recover it at build time.

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

git-gui: Rename GIT_VERSION to GITGUI_VERSION.Shawn O. Pearce Mon, 12 Feb 2007 21:12:04 +0000 (16:12 -0500)

git-gui: Rename GIT_VERSION to GITGUI_VERSION.

Now that the decision has been made to treat git-gui as a
subproject, rather than merging it directly into git, we
should use a different substitution for our version value
to avoid any possible confusion.

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

git-gui: Allow gitexecdir, INSTALL to be set by the... Shawn O. Pearce Mon, 12 Feb 2007 20:37:50 +0000 (15:37 -0500)

git-gui: Allow gitexecdir, INSTALL to be set by the caller.

When used as a subproject within git.git our Makefile must honor
the gitexecdir which git.git's Makefile is passing down to us,
ensuring that we install our executables into the libexec chosen
by the end-user or packager.

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

import-tars: brown paper bag fix for file mode.Michael Loeffler Mon, 12 Feb 2007 14:17:11 +0000 (15:17 +0100)

import-tars: brown paper bag fix for file mode.

There is a bug with this $git_mode variable which should be 0644
or 0755, but nothing else I think.

Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

fast-import: Support reusing 'from' and brown paper... Shawn O. Pearce Mon, 12 Feb 2007 09:08:43 +0000 (04:08 -0500)

fast-import: Support reusing 'from' and brown paper bag fix reset.

It was suggested on the mailing list that being able to use `from`
in any commit to reset the current branch is useful in some types of
importers, such as a darcs importer.

We originally did not permit resetting an existing branch with a
new `from` command during a `commit` command, but this restriction
was only to help debug the hacked up cvs2svn that Jon Smirl was
developing in parallel with git-fast-import. It is probably more
of a problem to disallow it than to allow it. So now we permit a
`from` during any `commit`.

While making the changes required to permit multiple `from`
commands on the same branch, I discovered we no longer needed the
last_commit field to be set to 0 during a reset, so that was removed.
(Reset was originally setting the field to 0 to signal cmd_from()
that it was OK to execute on the branch.)

While poking around in this section of fast-import I also realized
the `reset` command was not working as intended if the corresponding
`from` command was omitted (as allowed by the BNF grammar and the
code). If `from` was omitted we cleared out the tree but we left
the tree SHA-1 and parent commit SHA-1 intact. This is not what
the user intended in this case. Instead they would be trying to
reset the branch to have no parent and to have no tree, making the
branch look new-born during the next commit. We now clear these
SHA-1 values during `reset`, ensuring the branch looks new-born if
`from` does not get supplied.

New test cases for these were also added.

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

Merge git-guiJunio C Hamano Mon, 12 Feb 2007 07:04:00 +0000 (23:04 -0800)

Merge git-gui

This merges git-gui project of Shawn as a subproject of git.git
at git-gui/ subdirectory.

This merge only melds two histories together. The toplevel Makefile
does not even know about git-gui yet.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Add discussion section to git-tag documentation.Junio C Hamano Mon, 12 Feb 2007 06:29:12 +0000 (22:29 -0800)

Add discussion section to git-tag documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Teach git-am to pass -p option down to git-applyJunio C Hamano Mon, 12 Feb 2007 06:05:36 +0000 (22:05 -0800)

Teach git-am to pass -p option down to git-apply

This is originally from Andy Parkins whose patch used --patchdepth; let's
use -p which is more in line with the underlying git-apply.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation: git-rebase -C<n>Junio C Hamano Mon, 12 Feb 2007 06:03:55 +0000 (22:03 -0800)

Documentation: git-rebase -C<n>

Replace -CNUM in Synopsis section with -C<n> to make it consistent with
the description text.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano Mon, 12 Feb 2007 04:34:57 +0000 (20:34 -0800)

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

* 'master' of git://repo.or.cz/git/fastimport:
bash: Hide git-fast-import.
fast-import: Add tip about importing renames.
fast-import: Hide the pack boundary commits by default.

bash: Hide git-fast-import.Shawn O. Pearce Mon, 12 Feb 2007 00:55:22 +0000 (19:55 -0500)

bash: Hide git-fast-import.

The new git-fast-import command is not intended to be invoked
directly by an end user. So offering it as a possible completion
for a subcommand is not very useful.

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

fast-import: Add tip about importing renames.Shawn O. Pearce Mon, 12 Feb 2007 00:50:50 +0000 (19:50 -0500)

fast-import: Add tip about importing renames.

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

fast-import: Hide the pack boundary commits by default.Shawn O. Pearce Mon, 12 Feb 2007 00:45:56 +0000 (19:45 -0500)

fast-import: Hide the pack boundary commits by default.

Most users don't need the pack boundary information that fast-import
was printing to standard output, especially if they were calling
it with --quiet.

Those users who do want this information probably want it captured
so they can go back and use it to repack the imported repository.
So dumping the boundary commits to a log file makes more sense then
printing them to standard output.

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

git-gui: Stop deleting gitk preferences.Shawn O. Pearce Sun, 11 Feb 2007 22:19:38 +0000 (17:19 -0500)

git-gui: Stop deleting gitk preferences.

Now that git 1.5.0 and later contains a version of gitk that uses
correct geometry on Windows platforms, even if ~/.gitk exists, we
should not delete the user's ~/.gitk to work around the bug. It
is downright mean to remove a user's preferences for another app.

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

Document that git-am can read standard input.Michael S. Tsirkin Fri, 9 Feb 2007 10:23:23 +0000 (12:23 +0200)

Document that git-am can read standard input.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Make gitk save and restore the user set window position.Mark Levedahl Fri, 9 Feb 2007 03:22:24 +0000 (22:22 -0500)

Make gitk save and restore the user set window position.

gitk was saving widget sizes and positions when the main window was
destroyed, which is after all child widgets are destroyed. The cure
is to trap the WM_DELETE_WINDOW event before the gui is torn down. Also,
the saved geometry was captured using "winfo geometry .", rather than
"wm geometry ." Under Linux, these two return different answers and the
latter one is correct.

[jc: credit goes to Brett Schwarz for suggesting the use of "wm protocol";
I also squashed the follow-up patch to remove extraneous -0
from expressions.]

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

t4016: test quoting funny pathnames in diff outputJunio C Hamano Sun, 11 Feb 2007 21:28:42 +0000 (13:28 -0800)

t4016: test quoting funny pathnames in diff output

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff.c: More logical file name quoting for renames... Alexandre Julliard Sat, 10 Feb 2007 14:39:00 +0000 (15:39 +0100)

diff.c: More logical file name quoting for renames in diffstat.

Quote both file names separately when printing a rename, yielding
something like

"foo" => "bar"

instead of the current

"foo => bar"

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

diff.c: Properly quote file names in diff --summary... Alexandre Julliard Sat, 10 Feb 2007 14:37:48 +0000 (15:37 +0100)

diff.c: Properly quote file names in diff --summary output.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

diff.c: Reuse the pprint_rename function for diff ... Alexandre Julliard Sat, 10 Feb 2007 14:36:47 +0000 (15:36 +0100)

diff.c: Reuse the pprint_rename function for diff --summary output.

This avoids some code duplication, and yields more readable results
for directory renames.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Make it easier to override path to asciidoc commandDotan Barak Sun, 11 Feb 2007 15:54:40 +0000 (17:54 +0200)

Make it easier to override path to asciidoc command

Allow setting the path of asciidoc in only one place when creating
the documentation.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Avoid ugly linewrap in git helpRen\e,bi\e(B Scharfe Sun, 11 Feb 2007 13:29:58 +0000 (14:29 +0100)

Avoid ugly linewrap in git help

Some of the short help texts that are shown e.g. when running 'git'
without any parameters wrap on a 80-column terminal. They are just
one character over the line. This patch avoids it by decreasing the
number of spaces around the preceding command name from four to
three (on both sides for symmetry).

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fixed some typos in git-repack docsMukund Sat, 10 Feb 2007 18:12:01 +0000 (23:42 +0530)

Fixed some typos in git-repack docs

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-svn: correctly handle boolean options via git-configEric Wong Sun, 11 Feb 2007 05:07:12 +0000 (21:07 -0800)

git-svn: correctly handle boolean options via git-config

We don't append a space after '--bool', so we can't expect
a regular expression to match the space.

Semi-noticed by Junio C Hamano :)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Allow aliases to expand to shell commandsTheodore Ts'o Sun, 11 Feb 2007 00:33:58 +0000 (19:33 -0500)

Allow aliases to expand to shell commands

If the alias expansion is prefixed with an exclamation point, treat
it as a shell command which is run using system(3).

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Print a sane error message if an alias expands to an... Theodore Ts'o Sun, 11 Feb 2007 00:33:57 +0000 (19:33 -0500)

Print a sane error message if an alias expands to an invalid git command

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>

diff_flush_name(): take struct diff_options parameter.Junio C Hamano Sat, 10 Feb 2007 06:18:19 +0000 (22:18 -0800)

diff_flush_name(): take struct diff_options parameter.

Among the low-level output functions called from flush_one_pair(),
this was the only function that did not take (filepair, options)
as arguments.

Signed-off-by: Junio C Hamano <junkio@cox.net>

wt_status_prepare(): clean up structure initialization.Junio C Hamano Sat, 10 Feb 2007 00:22:42 +0000 (16:22 -0800)

wt_status_prepare(): clean up structure initialization.

Otherwise it would be a pain to add members to it.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-fetch: document automatic tag following.Junio C Hamano Fri, 9 Feb 2007 23:41:35 +0000 (15:41 -0800)

git-fetch: document automatic tag following.

Signed-off-by: Junio C Hamano <junkio@cox.net>

remove mailmap.linuxNicolas Pitre Fri, 9 Feb 2007 17:18:28 +0000 (12:18 -0500)

remove mailmap.linux

This file is incomplete, unmaintained, and it doesn't belong in the GIT
package anyway.

A more complete version is already included in the Linux -mm tree and
is about to make its way into mainline RSN.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame.el: Autoupdate while editingDavid Kågedal Fri, 9 Feb 2007 08:22:19 +0000 (09:22 +0100)

git-blame.el: Autoupdate while editing

This adds the support for automatically updating the buffer while editing.
A configuration variable git-blame-autoupdate controls whether this should
be enabled or not.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame.el: Doc fixes and cleanupDavid Kågedal Fri, 9 Feb 2007 08:21:51 +0000 (09:21 +0100)

git-blame.el: Doc fixes and cleanup

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame.el: blame unsaved changesDavid Kågedal Fri, 9 Feb 2007 08:21:32 +0000 (09:21 +0100)

git-blame.el: blame unsaved changes

Make git-blame use the current buffer contents for the blame, instead of
the saved file. This makes the blame correct even if there are unsaved
changes.

Also added a git-reblame command.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame.el: improve color handlingDavid Kågedal Fri, 9 Feb 2007 08:21:03 +0000 (09:21 +0100)

git-blame.el: improve color handling

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Handle uncommitted changes and cache descriptionsDavid Kågedal Fri, 9 Feb 2007 08:20:38 +0000 (09:20 +0100)

Handle uncommitted changes and cache descriptions

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame: Change installation instructionsJakub Narebski Fri, 9 Feb 2007 08:19:59 +0000 (09:19 +0100)

git-blame: Change installation instructions

Change installation instructions to using either "(require 'git-blame)"
or appropriate autoload instruction in GNU Emacs init file, .emacs
This required adding "(provide 'git-blame)" at the end of git-blame.el
and adding [preliminary] docstring to `git-blame-mode' function for
consistency (to mark function as interactive in `autoload' we have to
provide docstring as DOCSTRING is third arg, and INTERACTIVE fourth,
and both are optional). `git-blame-mode' is marked to autoload.

While at it ensure that we add `git-blame-mode' to `minor-mode-alist'
only once (in a way that does not depend on `cl' package).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-blame: Add Emacs Lisp file headers and GNU GPL... Jakub Narebski Fri, 9 Feb 2007 08:19:28 +0000 (09:19 +0100)

git-blame: Add Emacs Lisp file headers and GNU GPL boilerplate

Add Emacs Lisp file headers, according to "Coding Conventions" chapter
in Emacs Lisp Reference Manual and Elisp Area Convetions for
EmacsWiki:
http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions
Those include: copyright notice, GNU GPL boilerplate, description and
instalation instructions as provided in email and in commit message
introducing git-blame.el, compatibility notes from another email by
David Kågedal about what to change to use it in GNU Emacs 20, and
"git-blame ends here" to detect if file was truncated. First line
includes setting file encoding via first line local variable values
(file variables).

Added comment to "(require 'cl)" to note why it is needed; "Coding
Conventions" advises to avoid require the `cl' package of Common Lisp
extensions at run time.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation/git-pull: describe default behaviour... Junio C Hamano Fri, 9 Feb 2007 07:35:43 +0000 (23:35 -0800)

Documentation/git-pull: describe default behaviour and config interactions

The way 'git pull' without explicit parameters work were not
explained well in any existing documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Focus into blame panels on Mac OS.Shawn O. Pearce Fri, 9 Feb 2007 07:28:32 +0000 (02:28 -0500)

git-gui: Focus into blame panels on Mac OS.

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

reflog: handle $name => remotes/%s/HEAD mapping consist... Junio C Hamano Fri, 9 Feb 2007 07:24:51 +0000 (23:24 -0800)

reflog: handle $name => remotes/%s/HEAD mapping consistently for logs

When refs/remotes/gfi/master and refs/remotes/gfi/HEAD exist,
and the latter is a symref that points at the former, dwim_ref()
resolves string "gfi" to "refs/remotes/gfi/master" as expected,
but dwim_log() does not understand "gfi@{1.day}" and needs to be
told "gfi/master@{1.day}". This is confusing.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Improve annotated file display.Shawn O. Pearce Fri, 9 Feb 2007 06:59:38 +0000 (01:59 -0500)

git-gui: Improve annotated file display.

Rather than trying to mark the background color of the line numbers
to show which lines have annotated data loaded, we now show a ruler
between the line numbers and the file data. This ruler is just 1
character wide and its background color is set to grey to denote
which lines have annotation ready. I had to make this change as I
kept loosing the annotation marker when a line was no longer colored
as part of the current selection.

We now color the lines blamed on the current commit in yellow, the
lines in the commit which came after (descendant) in red (hotter,
less tested) and the lines in the commit before (ancestor) in blue
(cooler, better tested).

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

git-gui: Jump to the first annotation block as soon... Shawn O. Pearce Fri, 9 Feb 2007 03:41:51 +0000 (22:41 -0500)

git-gui: Jump to the first annotation block as soon as its available.

To help clue users into the fact that annotation data arrives
incrementally, and that they should try to locate the region
they want while the tool is running, we jump to the first line
of the first annotation if the user has not already clicked on
a line they are interested in and if the window is still looking
at the very top of the file.

Since it takes a second (at least on my PowerBook) to even generate
the first annotation for git-gui.sh, the user should have plenty of
time to adjust the scrollbar or click on a line even before we get
that first annotation record in, which allows the user to bypass
our automatic jumping.

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

git-gui: Redesign the display of annotated files.Shawn O. Pearce Fri, 9 Feb 2007 02:39:27 +0000 (21:39 -0500)

git-gui: Redesign the display of annotated files.

Using 180 columns worth of screen space to display just 20 columns of
file data and 160 columns worth of annotation information is not
practically useful. Users need/want to see the file data, and have
the anotation associated with it displayed in a detail pane only when
they have focused on a particular region of the file.

Now our file viewer has a small 10-line high pane below the file
which shows the commit message for the commit this line was blamed
on. The columns have all been removed, except the current line
number column as that has some real value when trying to locate an
interesting block.

To keep the user entertained we have a progress meter in the status
bar of the viewer which lets them know how many lines have been
annotated, and how much has been completed. We use a grey background
on the line numbers for lines which we have obtained annotation from,
and we color all lines in the current commit with a yellow background,
so they stand out when scanning through the file. All other lines
are kept with a white background, making the yellow really pop.

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

log --reflog: use dwim_logJohannes Schindelin Fri, 9 Feb 2007 00:28:23 +0000 (01:28 +0100)

log --reflog: use dwim_log

Since "git log origin/master" uses dwim_log() to match
"refs/remotes/origin/master", it makes sense to do that for
"git log --reflog", too.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

format-patch -n: make sorting easier by padding numberJohannes Schindelin Fri, 9 Feb 2007 00:43:54 +0000 (01:43 +0100)

format-patch -n: make sorting easier by padding number

Now, when format-patch outputs more than 9 patches, the numbers
are padded accordingly. Example:

[PATCH 009/167] The 9th patch of a series of 167

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Use git-config now over git-repo-config.Shawn O. Pearce Fri, 9 Feb 2007 00:53:36 +0000 (19:53 -0500)

git-gui: Use git-config now over git-repo-config.

Now that core Git has "renamed" git-repo-config to git-config,
we should do the same. I don't know how long core Git will
keep the repo-config command, and since git-gui's userbase
is so small and almost entirely on some flavor of 1.5.0-rc2
or later, where the rename has already taken place, it should
be OK to rename now.

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

git-gui: Relabel the Add All action.Shawn O. Pearce Fri, 9 Feb 2007 00:44:49 +0000 (19:44 -0500)

git-gui: Relabel the Add All action.

One user that I spoke with recently was confused why the 'Add All'
button did not add all of his 'Changed But Not Updated' files.
The particular files in question were new, and thus not known to
Git. Since the 'Add All' routine only updates files which are
already tracked, they were not added automatically.

I suspect that calling this action 'Add Existing' would be less
confusing, so I'm renaming it.

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

git-gui: Select subcommands like git does.Shawn O. Pearce Fri, 9 Feb 2007 00:41:32 +0000 (19:41 -0500)

git-gui: Select subcommands like git does.

If we are invoked as `git-foo`, then we should run the `foo` subcommand,
as the user has made some sort of link from `git-foo` to our actual
program code. So we should honor their request.

If we are invoked as `git-gui foo`, the user has not made a link (or
did, but is not using it right now) so we should execute the `foo`
subcommand.

We now can start the single commit UI mode via `git-citool` and also
through `git gui citool`.

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

log --reflog: honour --relative-dateJohannes Schindelin Thu, 8 Feb 2007 20:58:33 +0000 (21:58 +0100)

log --reflog: honour --relative-date

If you say "git log -g --relative-date", it is very likely that
you want to see the reflog names in terms of a relative date.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: View blame from the command line.Shawn O. Pearce Fri, 9 Feb 2007 00:10:52 +0000 (19:10 -0500)

git-gui: View blame from the command line.

Viewing annotated files is one of those tasks that is relatively
difficult to do in a simple vt100 terminal emulator. The user
really wants to be able to browse through a lot of information,
and to interact with it by navigating through revisions.

Now users can start our file viewer with annotations by running
'git gui blame commit path', thereby seeing the contents of the
given file at the given commit. Right now I am being lazy by
not allowing the user to omit the commit name (and have us thus
assume HEAD).

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

for_each_reflog_ent: be forgiving about missing messageJohannes Schindelin Thu, 8 Feb 2007 23:59:47 +0000 (00:59 +0100)

for_each_reflog_ent: be forgiving about missing message

Some reflogs are/were generated without a message; do not plainly
ignore those entries.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano Thu, 8 Feb 2007 23:47:08 +0000 (15:47 -0800)

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

* 'master' of git://repo.or.cz/git/fastimport:
tar archive frontend for fast-import.
Correct spelling of fast-import in docs.
Correct some language in fast-import documentation.
Correct ^0 asciidoc syntax in fast-import docs.

git reflog showLinus Torvalds Thu, 8 Feb 2007 17:51:56 +0000 (09:51 -0800)

git reflog show

It makes "git reflog [show]" act as

git log -g --pretty=oneline --abbrev-cmit

and is fairly straightforward. So you can just write

git reflog

or

git reflog show

and it will show you the reflog in a nice format.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

add -C[NUM] to git-amMichael S. Tsirkin Thu, 8 Feb 2007 13:57:08 +0000 (15:57 +0200)

add -C[NUM] to git-am

Add -C[NUM] to git-am and git-rebase so that patches can be applied even
if context has changed a bit.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Update git-log and git-show documentationMichael S. Tsirkin Thu, 8 Feb 2007 23:22:21 +0000 (15:22 -0800)

Update git-log and git-show documentation

Point at where the options not so frequently used are found.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-gui: Optionally save commit buffer on exit.Shawn O. Pearce Thu, 8 Feb 2007 22:47:17 +0000 (17:47 -0500)

git-gui: Optionally save commit buffer on exit.

If the commit area does not exist, don't save the commit message to
a file, or the window geometry. The reason I'm doing this is I want
to make the main window entirely optional, such as if the user has
asked us to show a blame from the command line. In such cases the
commit area won't exist and trying to get its text would cause an
error.

If we are running without the commit message area, we cannot save
our window geometry either, as the root window '.' won't be a normal
commit window.

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

git-gui: Separate transport/branch menus from multicommit.Shawn O. Pearce Thu, 8 Feb 2007 23:10:05 +0000 (18:10 -0500)

git-gui: Separate transport/branch menus from multicommit.

These are now controlled by the transport and branch options, rather
than the multicommit option.

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

git-gui: Refactor single_commit to a proc.Shawn O. Pearce Thu, 8 Feb 2007 23:03:41 +0000 (18:03 -0500)

git-gui: Refactor single_commit to a proc.

This is a minor code cleanup to make working with what used to be the
$single_commit flag easier. Its also to better handle various UI
configurations, depending on command line parameters given by the
user, or perhaps user preferences.

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

git-gui: Replace \ with \\ when showing paths.Shawn O. Pearce Thu, 8 Feb 2007 22:13:51 +0000 (17:13 -0500)

git-gui: Replace \ with \\ when showing paths.

We already replace \n with \\n so that Tk widgets don't start a new
display line with part of a file path which is just unlucky enough
to contain an LF. But then its confusing to read a path whose name
actually contains \n as literal characters. Escaping \ to \\ would
make that case display as \\n, clarifying the output.

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

git-gui: Support keyboard traversal in browser.Shawn O. Pearce Thu, 8 Feb 2007 22:07:59 +0000 (17:07 -0500)

git-gui: Support keyboard traversal in browser.

Users want to navigate the file list shown in our branch browser
windows using the keyboard. So we now support basic traversal
with the arrow keys:

Up/Down: Move the "selection bar" to focus on a different name.

Return: Move into the subtree, or open the annotated file.
M1-Right: Ditto.

M1-Up: Move to the parent tree.
M1-Left: Ditto.

Probably the only feature missing from this is to key a leading part
of the file name and jump directly to that file (or subtree).

This change did require a bit of refactoring, to pull the navigation
logic out of the mouse click procedure and into more generic routines
which can also be used in bindings.

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

git-gui: Update known branches during rescan.Shawn O. Pearce Thu, 8 Feb 2007 20:59:39 +0000 (15:59 -0500)

git-gui: Update known branches during rescan.

If the user has created (or deleted) a branch through an external tool,
and uses Rescan, they probably are trying to make git-gui update to show
their newly created branch.

So now we load all known heads and update the branch menu during any
rescan operation, just in-case the set of known branches was modified.

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

tar archive frontend for fast-import.Shawn O. Pearce Thu, 8 Feb 2007 20:26:01 +0000 (15:26 -0500)

tar archive frontend for fast-import.

This is an example fast-import frontend, in less than 100 lines
of Perl. It accepts one or more tar archives on the command line,
passes them through gzcat/bzcat/zcat if necessary, parses out the
individual file headers and feeds all contained data to fast-import.
No temporary files are involved.

Each tar is treated as one commit, with the commit timestamp coming
from the oldest file modification date found within the tar.

Each tar is also tagged with an annotated tag, using the basename
of the tar file as the name of the tag.

Currently symbolic links and hard links are not handled by the
importer. The file checksums are also not verified.

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

Correct spelling of fast-import in docs.Shawn O. Pearce Thu, 8 Feb 2007 18:49:06 +0000 (13:49 -0500)

Correct spelling of fast-import in docs.

Its spelled 'fast-import', not 'gfi'. Linus and Dscho have both
recently pointed this out to me on the mailing list.

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

Read cvsimport options from repo-configJames Bowes Wed, 7 Feb 2007 22:57:43 +0000 (17:57 -0500)

Read cvsimport options from repo-config

Default values for command line options can be saved in .git/config (or the
global ~/.gitconfig). Config option names match the command line option names,
so cvsimport.d corresponds to git-cvsimport -d. One may also set
cvsimport.module to specify a default cvs module name.

Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

create_symref(): create leading directories as needed.Junio C Hamano Thu, 8 Feb 2007 07:41:43 +0000 (23:41 -0800)

create_symref(): create leading directories as needed.

Otherwise "git remote add -t master -m master" without the
initial fetch would not work.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Correct some language in fast-import documentation.Shawn O. Pearce Thu, 8 Feb 2007 06:53:48 +0000 (01:53 -0500)

Correct some language in fast-import documentation.

Minor documentation improvements, as suggested on the Git mailing
list by Horst H. von Brand and Karl Hasselström.

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

Correct ^0 asciidoc syntax in fast-import docs.Shawn O. Pearce Thu, 8 Feb 2007 06:35:37 +0000 (01:35 -0500)

Correct ^0 asciidoc syntax in fast-import docs.

I wrote this documentation with asciidoc 7.1.2, but apparently
asciidoc 8 assumes ^ means superscript. The solution was already
documented in rev-parse's manpage and is to use {caret} instead.

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

GIT v1.5.0-rc4 v1.5.0-rc4Junio C Hamano Wed, 7 Feb 2007 22:31:21 +0000 (14:31 -0800)

GIT v1.5.0-rc4

Signed-off-by: Junio C Hamano <junkio@cox.net>

Documentation: Add gfi to the main command list.Junio C Hamano Wed, 7 Feb 2007 22:30:47 +0000 (14:30 -0800)

Documentation: Add gfi to the main command list.

Signed-off-by: Junio C Hamano <junkio@cox.net>