gitweb.git
Fix t5516 to create test repo without hooksAlex Riesen Wed, 4 Jul 2007 12:06:04 +0000 (14:06 +0200)

Fix t5516 to create test repo without hooks

Otherwise the hooks will be executed on cygwin and the test will fail
because of the contributed hooks.

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

filter-branch: Avoid an error message in the map function.Johannes Sixt Wed, 4 Jul 2007 12:08:17 +0000 (14:08 +0200)

filter-branch: Avoid an error message in the map function.

When the map function didn't find the rewritten commit of the passed in
original id, it printed the original id, but it still fell through to
the 'cat', which failed with an error message.

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

Handle format.subjectprefix for every command which... Alex Riesen Wed, 4 Jul 2007 10:37:27 +0000 (12:37 +0200)

Handle format.subjectprefix for every command which accepts --pretty

Because the --pretty can be given as --pretty=email which historically produced
mails with patches. IOW, exactly what git-format-patch does.

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

Handle missing prefix for "Subject:" as if no prefix... Alex Riesen Wed, 4 Jul 2007 10:33:46 +0000 (12:33 +0200)

Handle missing prefix for "Subject:" as if no prefix given

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

Update reflog message created for stashesJunio C Hamano Wed, 4 Jul 2007 19:37:17 +0000 (12:37 -0700)

Update reflog message created for stashes

A stash is about a change on top of an existing commit, and not
about that commit that happened to be on which the change was
created. Match the message we see in "git stash list" with the
commit log message to make this clear.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>

repack: don't report "Nothing new to pack." if -q is... Uwe Kleine-König Tue, 3 Jul 2007 08:47:58 +0000 (10:47 +0200)

repack: don't report "Nothing new to pack." if -q is given

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add core.pager config variable.Brian Gernhardt Tue, 3 Jul 2007 18:18:11 +0000 (14:18 -0400)

Add core.pager config variable.

This adds a configuration variable that performs the same function as,
but is overridden by, GIT_PAGER.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Acked-by: Johannes E. Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule: Fix two instances of the same typoCJ van den Berg Wed, 4 Jul 2007 16:22:14 +0000 (18:22 +0200)

git-submodule: Fix two instances of the same typo

They break the output of git submodule status.

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

Merge branch 'maint'Junio C Hamano Wed, 4 Jul 2007 05:56:59 +0000 (22:56 -0700)

Merge branch 'maint'

* maint:
Document -<n> for git-format-patch
glossary: add 'reflog'
diff --no-index: fix --name-status with added files
Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIES is too long

filter-branch: add a test for the commit removal exampleJohannes Schindelin Tue, 3 Jul 2007 16:50:19 +0000 (17:50 +0100)

filter-branch: add a test for the commit removal example

In the man page, there is an example which describes how to remove
single commits (although it keeps the changes which were not reverted
in the next non-removed commit). Better make sure that it works as
expected.

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

fsck --lost-found writes to subdirectories in .git... Jonas Fonseca Wed, 4 Jul 2007 01:33:11 +0000 (03:33 +0200)

fsck --lost-found writes to subdirectories in .git/lost-found/

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

Add diff-option --ext-diffJohannes Schindelin Sat, 30 Jun 2007 17:47:07 +0000 (18:47 +0100)

Add diff-option --ext-diff

To prevent funky games with external diff engines, git-log and
friends prevent external diff engines from being called. That makes
sense in the context of git-format-patch or git-rebase.

However, for "git log -p" it is not so nice to get the message
that binary files cannot be compared, while "git diff" has no
problems with them, if you provided an external diff driver.

With this patch, "git log --ext-diff -p" will do what you expect,
and the option "--no-ext-diff" can be used to override that
setting.

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

Document git-filter-branchJohannes Schindelin Tue, 3 Jul 2007 23:41:55 +0000 (00:41 +0100)

Document git-filter-branch

This moves the documentation in git-filter-branch.sh to its own
man page, with a few touch ups (incorporating comments by Frank
Lichtenheld).

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

stash: end commit log with a newlineUwe Kleine-König Tue, 3 Jul 2007 08:59:06 +0000 (10:59 +0200)

stash: end commit log with a newline

If I do

git cat-file commit $commitid

for a commit created by stash, the next prompt starts directly after the
shortlog of HEAD.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft Release Notes for 1.5.3Junio C Hamano Tue, 3 Jul 2007 19:04:24 +0000 (12:04 -0700)

Update draft Release Notes for 1.5.3

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

Document -<n> for git-format-patchMiklos Vajna Tue, 3 Jul 2007 23:38:29 +0000 (01:38 +0200)

Document -<n> for git-format-patch

The -<n> option was not mentioned in git-format-patch's manpage till
now. Fix this.

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

glossary: add 'reflog'Johannes Schindelin Tue, 3 Jul 2007 20:28:24 +0000 (21:28 +0100)

glossary: add 'reflog'

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

diff --no-index: fix --name-status with added filesJohannes Schindelin Tue, 3 Jul 2007 15:01:06 +0000 (16:01 +0100)

diff --no-index: fix --name-status with added files

Without this patch, an added file would be reported as /dev/null.

Noticed by David Kastrup.

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

Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIE... Jim Meyering Tue, 3 Jul 2007 10:40:20 +0000 (12:40 +0200)

Don't smash stack when $GIT_ALTERNATE_OBJECT_DIRECTORIES is too long

There is no restriction on the length of the name returned by
get_object_directory, other than the fact that it must be a stat'able
git object directory. That means its name may have length up to
PATH_MAX-1 (i.e., often 4095) not counting the trailing NUL.

Combine that with the assumption that the concatenation of that name and
suffixes like "/info/alternates" and "/pack/---long-name---.idx" will fit
in a buffer of length PATH_MAX, and you see the problem. Here's a fix:

sha1_file.c (prepare_packed_git_one): Lengthen "path" buffer
so we are guaranteed to be able to append "/pack/" without checking.
Skip any directory entry that is too long to be appended.
(read_info_alternates): Protect against a similar buffer overrun.

Before this change, using the following admittedly contrived environment
setting would cause many git commands to clobber their stack and segfault
on a system with PATH_MAX == 4096:

t=$(perl -e '$s=".git/objects";$n=(4096-6-length($s))/2;print "./"x$n . $s')
export GIT_ALTERNATE_OBJECT_DIRECTORIES=$t
touch g
./git-update-index --add g

If you run the above commands, you'll soon notice that many
git commands now segfault, so you'll want to do this:

unset GIT_ALTERNATE_OBJECT_DIRECTORIES

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

Mark disused commit walkers officially deprecated. v1.5.3-rc0Junio C Hamano Tue, 3 Jul 2007 06:29:54 +0000 (23:29 -0700)

Mark disused commit walkers officially deprecated.

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

git-stash: make "save" the default action again.Junio C Hamano Tue, 3 Jul 2007 06:15:45 +0000 (23:15 -0700)

git-stash: make "save" the default action again.

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

Rewrite "git-frotz" to "git frotz"Junio C Hamano Tue, 3 Jul 2007 05:52:14 +0000 (22:52 -0700)

Rewrite "git-frotz" to "git frotz"

This uses the remove-dashes target to replace "git-frotz" to "git frotz".

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

Start deprecating "git-command" in favor of "git command"Linus Torvalds Sat, 30 Jun 2007 18:49:17 +0000 (11:49 -0700)

Start deprecating "git-command" in favor of "git command"

I realize that a lot of people use the "git-xyzzy" format, and we have
various historical reasons for it, but I also think that most people have
long since started thinking of the git command as a single command with
various subcommands, and we've long had the documentation talk about it
that way.

Slowly migrating away from the git-xyzzy format would allow us to
eventually no longer install hundreds of binaries (even if most of them
are symlinks or hardlinks) in users $PATH, and the _original_ reasons for
it (implementation issues and bash completion) are really long long gone.

Using "git xyzzy" also has some fundamental advantages, like the ability
to specify things like paging ("git -p xyzzy") and making the whole notion
of aliases act like other git commands (which they already do, but they do
*not* have a "git-xyzzy" form!)

Anyway, while actually removing the "git-xyzzy" things is not practical
right now, we can certainly start slowly to deprecate it internally inside
git itself - in the shell scripts we use, and the test vectors.

This patch adds a "remove-dashes" makefile target, which does that. It
isn't particularly efficient or smart, but it *does* successfully rewrite
a lot of our shell scripts to use the "git xyzzy" form for all built-in
commands.

(For non-builtins, the "git xyzzy" format implies an extra execve(), so
this script leaves those alone).

So apply this patch, and then run

make remove-dashes
make test
git commit -a

to generate a much larger patch that actually starts this transformation.

(The only half-way subtle thing about this is that it also fixes up
git-filter-branch.sh for the new world order by adding quoting around
the use of "git-commit-tree" as an argument. It doesn't need it in that
format, but when changed into "git commit-tree" it is no longer a single
word, and the quoting maintains the old behaviour).

NOTE! This does not yet mean that you can actually stop installing the
"git-xyzzy" binaries for the builtins. There are some remaining places
that want to use the old form, this just removes the most obvious ones
that can easily be done automatically.

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

Merge branch 'jo/init'Junio C Hamano Tue, 3 Jul 2007 04:48:08 +0000 (21:48 -0700)

Merge branch 'jo/init'

* jo/init:
Quiet the output from git-init when cloning, if requested.
Add an option to quiet git-init.

git-fsck: add --lost-found optionJohannes Schindelin Tue, 3 Jul 2007 00:33:54 +0000 (01:33 +0100)

git-fsck: add --lost-found option

With this option, dangling objects are not only reported, but also
written to .git/lost-found/commit/ or .git/lost-found/other/. This
option implies '--full' and '--no-reflogs'.

'git fsck --lost-found' is meant as a replacement for git-lost-found.

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

Merge branch 'maint'Junio C Hamano Tue, 3 Jul 2007 04:05:59 +0000 (21:05 -0700)

Merge branch 'maint'

* maint:
Correctly document the name of the global excludes file configuration

format-patch: Add format.subjectprefix config optionAdam Roben Mon, 2 Jul 2007 00:48:59 +0000 (17:48 -0700)

format-patch: Add format.subjectprefix config option

This change lets you use the format.subjectprefix config option to override the
default subject prefix.

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

Test 'git add' for unmerged entries when core.symlinks... Johannes Sixt Mon, 2 Jul 2007 11:28:42 +0000 (13:28 +0200)

Test 'git add' for unmerged entries when core.symlinks=false.

In 20314271679e169f324c118c69c8d9e0399feec9 git add was fixed if unmerged
entries are in the index and core.filemode=false. core.symlinks=false is
a similar case, which touches the same code path. Here is a test that
makes sure that the symlink property in the index is preserved, too.

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

"git-push $URL" without refspecs pushes only matching... Junio C Hamano Mon, 2 Jul 2007 02:00:08 +0000 (19:00 -0700)

"git-push $URL" without refspecs pushes only matching branches

When "git push" is run without any refspec (neither on the
command line nor in the config), we used to push "matching refs"
in the sense that anything under refs/ hierarchy that exist on
both ends were updated. This used to be a sane default for
publishing your repository to another back when we did not have
refs/remotes/ hierarchy, but it does not make much sense these
days.

This changes the semantics to push only "matching branches".

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

Correctly document the name of the global excludes... Michael Hendricks Mon, 2 Jul 2007 16:48:34 +0000 (10:48 -0600)

Correctly document the name of the global excludes file configuration

Signed-off-by: Michael Hendricks <michael@ndrix.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Mon, 2 Jul 2007 23:41:44 +0000 (16:41 -0700)

Merge branch 'maint'

* maint:
Make git-prune submodule aware (and fix a SEGFAULT in the process)

Make git-prune submodule aware (and fix a SEGFAULT... Andy Parkins Mon, 2 Jul 2007 12:56:58 +0000 (13:56 +0100)

Make git-prune submodule aware (and fix a SEGFAULT in the process)

I ran git-prune on a repository and got this:

$ git-prune
error: Object 228f8065b930120e35fc0c154c237487ab02d64a is a blob, not a commit
Segmentation fault (core dumped)

This repository was a strange one in that it was being used to provide
its own submodule. That is, the repository was cloned into a
subdirectory, an independent branch checked out in that subdirectory,
and then it was marked as a submodule. git-prune then failed in the
above manner.

The problem was that git-prune was not submodule aware in two areas.

Linus said:

> So what happens is that something traverses a tree object, looks at each
> entry, sees that it's not a tree, and tries to look it up as a blob. But
> subprojects are commits, not blobs, and then when you look at the object
> more closely, you get the above kind of object type confusion.

and included a patch to add an S_ISGITLINK() test to reachable.c's
process_tree() function. That fixed the first git-prune error, and
stopped it from trying to process the gitlink entries in trees as if
they were pointers to other trees (and of course failing, because
gitlinks _aren't_ trees). That part of this patch is his.

The second area is add_cache_refs(). This is called before starting the
reachability analysis, and was calling lookup_blob() on every object
hash found in the index. However, it is no longer true that every hash
in the index is a pointer to a blob, some of them are gitlinks, and are
not backed by any object at all, they are commits in another repository.
Normally this bug was not causing any problems, but in the case of the
self-referencing repository described above, it meant that the gitlink
hash was being marked as being of type OBJ_BLOB by add_cache_refs() call
to lookup_blob(). Then later, because that hash was also pointed to by
a ref, add_one_ref() would treat it as a commit; lookup_commit() would
return a NULL because that object was already noted as being an
OBJ_BLOB, not an OBJ_COMMIT; and parse_commit_buffer() would SEGFAULT on
that NULL pointer.

The fix made by this patch is to not blindly call lookup_blob() in
reachable.c's add_cache_refs(), and instead skip any index entries that
are S_ISGITLINK().

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ew/svn'Junio C Hamano Mon, 2 Jul 2007 08:46:22 +0000 (01:46 -0700)

Merge branch 'ew/svn'

* ew/svn:
git-svn: allow dcommit to retain local merge information

Merge branch 'ns/stash'Junio C Hamano Mon, 2 Jul 2007 08:45:57 +0000 (01:45 -0700)

Merge branch 'ns/stash'

* ns/stash:
Documentation: quote {non-attributes} for asciidoc
git-stash: don't complain when listing in a repo with no stash
git-stash: fix "can't shift that many" with no arguments
git-stash: fix "no arguments" case in documentation
git-stash: require "save" to be explicit and update documentation
Document git-stash
Add git-stash script

Merge branch 'js/rebase'Junio C Hamano Mon, 2 Jul 2007 08:45:47 +0000 (01:45 -0700)

Merge branch 'js/rebase'

* js/rebase:
Teach rebase -i about --preserve-merges
rebase -i: provide reasonable reflog for the rebased branch
rebase -i: several cleanups
ignore git-rebase--interactive
Teach rebase an interactive mode
Move the pick_author code to git-sh-setup

Merge branch 'jc/diffcore'Junio C Hamano Mon, 2 Jul 2007 08:45:12 +0000 (01:45 -0700)

Merge branch 'jc/diffcore'

* jc/diffcore:
diffcore-delta.c: Ignore CR in CRLF for text files
diffcore-delta.c: update the comment on the algorithm.
diffcore_filespec: add is_binary
diffcore_count_changes: pass diffcore_filespec

Documentation: minor cleanups to branch/checkout wordingJeff King Mon, 2 Jul 2007 05:28:20 +0000 (01:28 -0400)

Documentation: minor cleanups to branch/checkout wording

Change "to made" to "made to", which is a typo. Use "reflog"
instead of "ref log", which is used elsewhere throughout the
documentation.

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

Documentation: quote {non-attributes} for asciidocJeff King Mon, 2 Jul 2007 05:24:59 +0000 (01:24 -0400)

Documentation: quote {non-attributes} for asciidoc

Asciidoc treats {foo} as an attribute to be substituted; if
'foo' doesn't exist as an attribute, then the entire line
gets dropped. When the literal {foo} is desired, \{foo} is
required.

The exceptions to this rule are:
- inside literal blocks
- if the 'foo' contains non-alphanumeric characters (e.g.,
{foo|bar} is assumed not to be an attribute)

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

Make '!' aliases more usefulJohannes Schindelin Sun, 1 Jul 2007 21:51:58 +0000 (22:51 +0100)

Make '!' aliases more useful

When an alias starts with an exclamation mark, the rest is interpreted
as a shell command. However, all arguments passed to git used to be
ignored.

Now you can have an alias like

$ git config alias.e '!echo'

and

$ git e Hello World

does what you expect it to do.

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

getenv/setenv: use constants if availableMatthias Lederhofer Thu, 28 Jun 2007 14:15:25 +0000 (16:15 +0200)

getenv/setenv: use constants if available

There were places using "GIT_DIR" instead of GIT_DIR_ENVIRONMENT and
"GIT_CONFIG" instead of CONFIG_ENVIRONMENT. This makes it easier to
find all places touching an environment variable using git grep or
similar tools.

Signed-off-by: Matthias Lederhofer <matled@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-clone: fetch possibly detached HEAD over dumb httpSven Verdoolaege Fri, 29 Jun 2007 08:31:08 +0000 (10:31 +0200)

git-clone: fetch possibly detached HEAD over dumb http

git-clone supports cloning from a repo with detached HEAD,
but if this HEAD is not behind any branch tip then it
would not have been fetched over dumb http, resulting in a

fatal: Not a valid object name HEAD

Since 928c210a, this would also happen on a http repo
with a HEAD that is a symbolic link where someone has
forgotton to run update-server-info.

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

git-submodule: Instead of using only annotated tags... Emil Medve Tue, 26 Jun 2007 23:40:58 +0000 (18:40 -0500)

git-submodule: Instead of using only annotated tags, use any tags.

Some repositories might not use/have annotated tags (for example the
ones created with git-cvsimport) and git-submodule status might fail
because git-describe might fail to find a tag. This change allows the
status of a submodule to be described/displayed relative to lightweight
tags as well.

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-submodule: provide easy way of adding new submodulesSven Verdoolaege Sun, 24 Jun 2007 21:06:07 +0000 (23:06 +0200)

git-submodule: provide easy way of adding new submodules

To make a submodule effectively usable, the path and
a URL where the submodule can be cloned need to be stored
in .gitmodules. This subcommand takes care of setting
this information after cloning the new submodule.
Only the index is updated, so, if needed, the user may still
change the URL or switch to a different branch of the submodule
before committing.

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

Update public documentation links for 1.5.2.3Junio C Hamano Mon, 2 Jul 2007 08:14:00 +0000 (01:14 -0700)

Update public documentation links for 1.5.2.3

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

Merge 1.5.2.3 inJunio C Hamano Mon, 2 Jul 2007 08:12:57 +0000 (01:12 -0700)

Merge 1.5.2.3 in

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

GIT 1.5.2.3 v1.5.2.3Junio C Hamano Mon, 2 Jul 2007 07:35:58 +0000 (00:35 -0700)

GIT 1.5.2.3

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

Documentation: quote {non-attributes} for asciidocJeff King Mon, 2 Jul 2007 05:24:59 +0000 (01:24 -0400)

Documentation: quote {non-attributes} for asciidoc

Asciidoc treats {foo} as an attribute to be substituted; if
'foo' doesn't exist as an attribute, then the entire line
gets dropped. When the literal {foo} is desired, \{foo} is
required.

The exceptions to this rule are:
- inside literal blocks
- if the 'foo' contains non-alphanumeric characters (e.g.,
{foo|bar} is assumed not to be an attribute)

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

git-stash: don't complain when listing in a repo with... Jeff King Mon, 2 Jul 2007 04:21:24 +0000 (00:21 -0400)

git-stash: don't complain when listing in a repo with no stash

Previously, the git-log invocation would complain if a repo
had not had any stashes created in it yet:

$ git-init
$ git-stash
fatal: ambiguous argument 'refs/stash': unknown revision or
path not in the working tree.
Use '--' to separate paths from revisions

Instead, we only call git-log if we actually have a
refs/stash. We could alternatively create the ref when any
stash command is called, but it's better for the 'list'
command to not require write access to the repo.

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

git-stash: fix "can't shift that many" with no argumentsJeff King Mon, 2 Jul 2007 04:20:34 +0000 (00:20 -0400)

git-stash: fix "can't shift that many" with no arguments

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

git-stash: fix "no arguments" case in documentationJeff King Mon, 2 Jul 2007 04:20:06 +0000 (00:20 -0400)

git-stash: fix "no arguments" case in documentation

Commit 9488e875 changed this from 'save' to 'list', but
missed this spot in the documentation.

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

git-stash: require "save" to be explicit and update... Junio C Hamano Sun, 1 Jul 2007 22:29:01 +0000 (15:29 -0700)

git-stash: require "save" to be explicit and update documentation

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

Merge branch 'rs/diff'Junio C Hamano Sun, 1 Jul 2007 21:58:09 +0000 (14:58 -0700)

Merge branch 'rs/diff'

* rs/diff:
diff: round down similarity index
diffcore-rename: don't change similarity index based on basename equality

Merge branch 'jc/quote'Junio C Hamano Sun, 1 Jul 2007 21:57:51 +0000 (14:57 -0700)

Merge branch 'jc/quote'

* jc/quote:
Add core.quotepath configuration variable.

Fix t5516-fetch for systems where `wc -l` outputs white... Brian Gernhardt Sun, 1 Jul 2007 15:48:54 +0000 (11:48 -0400)

Fix t5516-fetch for systems where `wc -l` outputs whitespace.

When wc outputs whitespace, the test "$(command | wc -l)" = 1 is
broken because " 1" != "1". Let the shell eat the whitespace by
using test 1 = $(command | wc -l) instead.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git add: respect core.filemode with unmerged entriesJohannes Schindelin Fri, 29 Jun 2007 17:32:46 +0000 (18:32 +0100)

git add: respect core.filemode with unmerged entries

When a merge left unmerged entries, git add failed to pick up the
file mode from the index, when core.filemode == 0. If more than one
unmerged entry is there, the order of stage preference is 2, 1, 3.

Noticed by Johannes Sixt.

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

t7004: ship trustdb to avoid gpg warningsJohannes Schindelin Sun, 1 Jul 2007 03:14:01 +0000 (20:14 -0700)

t7004: ship trustdb to avoid gpg warnings

This avoids warning messages from gpg while verifying the tags; without it,
the program complains that the key is not certified with a trusted signature.

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

Merge branch 'ml/worktree'Junio C Hamano Sun, 1 Jul 2007 20:11:01 +0000 (13:11 -0700)

Merge branch 'ml/worktree'

* ml/worktree:
make git barf when an alias changes environment variables

Merge branch 'ei/worktree+filter'Junio C Hamano Sun, 1 Jul 2007 20:10:42 +0000 (13:10 -0700)

Merge branch 'ei/worktree+filter'

* ei/worktree+filter:
filter-branch: always export GIT_DIR if it is set
setup_git_directory: fix segfault if repository is found in cwd
test GIT_WORK_TREE
extend rev-parse test for --is-inside-work-tree
Use new semantics of is_bare/inside_git_dir/inside_work_tree
introduce GIT_WORK_TREE to specify the work tree
test git rev-parse
rev-parse: introduce --is-bare-repository
rev-parse: document --is-inside-git-dir

Merge branch 'fl/config'Junio C Hamano Sun, 1 Jul 2007 06:49:01 +0000 (23:49 -0700)

Merge branch 'fl/config'

* fl/config:
config: add support for --bool and --int while setting values

Merge branch 'mk/svn'Junio C Hamano Sun, 1 Jul 2007 06:48:54 +0000 (23:48 -0700)

Merge branch 'mk/svn'

* mk/svn:
git-svn: honor ~/.subversion/ client cert file settings.

Document git-stashしらいしななこ Sun, 1 Jul 2007 05:26:08 +0000 (14:26 +0900)

Document git-stash

This describes the git-stash command.

I borrowed a few paragraphs from Johannes's version, and added a few
examples.

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

git-svn: cache max revision in rev_db databasesSam Vilain Sat, 30 Jun 2007 08:56:14 +0000 (20:56 +1200)

git-svn: cache max revision in rev_db databases

Cache the maximum revision for each rev_db URL rather than looking it
up each time. This saves a lot of time when rebuilding indexes on a
freshly cloned repository.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: use git-log rather than rev-list | xargs cat... Sam Vilain Sat, 30 Jun 2007 08:56:13 +0000 (20:56 +1200)

git-svn: use git-log rather than rev-list | xargs cat-file

This saves a bit of time when rebuilding the git-svn index.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-svn: honor ~/.subversion/ client cert file settings.Michael Krelin Fri, 22 Jun 2007 09:15:03 +0000 (11:15 +0200)

git-svn: honor ~/.subversion/ client cert file settings.

Currently, whenever svn repository http server requests client
certificate, prompt provider is invoked, ignoring any
ssl-client-cert-file settings in ~/.subversion/servers.

Moreover, it happens more than once per session, which is quite
irritating.

Signed-off-by: Michael Krelin <hacker@klever.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diffcore-delta.c: Ignore CR in CRLF for text filesJunio C Hamano Fri, 29 Jun 2007 06:14:13 +0000 (23:14 -0700)

diffcore-delta.c: Ignore CR in CRLF for text files

This ignores CR byte in CRLF sequence in text file when
computing similarity of two blobs.

Usually this should not matter as nobody sane would be checking
in a file with CRLF line endings to the repository (they would
use autocrlf so that the repository copy would have LF line
endings).

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

diffcore-delta.c: update the comment on the algorithm.Junio C Hamano Fri, 29 Jun 2007 06:11:40 +0000 (23:11 -0700)

diffcore-delta.c: update the comment on the algorithm.

The comment at the top of the file described an old algorithm
that was neutral to text/binary differences (it hashed sliding
window of N-byte sequences and counted overlaps), but long time
ago we switched to a new heuristics that are more suitable for
line oriented (read: text) files that are much faster.

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

diffcore_filespec: add is_binaryJunio C Hamano Fri, 29 Jun 2007 05:56:07 +0000 (22:56 -0700)

diffcore_filespec: add is_binary

diffcore-break and diffcore-rename would want to behave slightly
differently depending on the binary-ness of the data, so add one
bit to the filespec, as the structure is now passed down to
diffcore_count_changes() function.

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

diffcore_count_changes: pass diffcore_filespecJunio C Hamano Fri, 29 Jun 2007 05:54:37 +0000 (22:54 -0700)

diffcore_count_changes: pass diffcore_filespec

We may want to use richer information on the data we are dealing
with in this function, so instead of passing a buffer address
and length, just pass the diffcore_filespec structure. Existing
callers always call this function with parameters taken from a
filespec anyway, so there is no functionality changes.

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

Add git-stash scriptしらいしななこ Sat, 30 Jun 2007 05:37:09 +0000 (14:37 +0900)

Add git-stash script

When my boss has something to show me and I have to update, for some
reason I am always in the middle of doing something else, and git pull
command refuses to work in such a case.

I wrote this little script to save the changes I made, perform the
update, and then come back to where I was, but on top of the updated
commit.

This is how you would use the script:

$ git stash
$ git pull
$ git stash apply

[jc: with a few fixlets from the list]

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

Don't fflush(stdout) when it's not helpfulTheodore Ts'o Fri, 29 Jun 2007 17:40:46 +0000 (13:40 -0400)

Don't fflush(stdout) when it's not helpful

This patch arose from a discussion started by Jim Meyering's patch
whose intention was to provide better diagnostics for failed writes.
Linus proposed a better way to do things, which also had the added
benefit that adding a fflush() to git-log-* operations and incremental
git-blame operations could improve interactive respose time feel, at
the cost of making things a bit slower when we aren't piping the
output to a downstream program.

This patch skips the fflush() calls when stdout is a regular file, or
if the environment variable GIT_FLUSH is set to "0". This latter can
speed up a command such as:

GIT_FLUSH=0 strace -c -f -e write time git-rev-list HEAD | wc -l

a tiny amount.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cr/tag'Junio C Hamano Sat, 30 Jun 2007 19:06:44 +0000 (12:06 -0700)

Merge branch 'cr/tag'

* cr/tag:
Add test-script for git-tag
Add test script for git-stripspace.
Fix git-stripspace to process correctly long lines and spaces.

git: Try a bit harder not to lose errno in stdioLinus Torvalds Sat, 30 Jun 2007 18:44:20 +0000 (11:44 -0700)

git: Try a bit harder not to lose errno in stdio

This switches the checks around upon the exit codepath of the
git wrapper, so that we may recover at least non-transient errors.

It's still not perfect. As I've been harping on, stdio simply isn't very
good for error reporting. For example, if an IO error happened, you'd want
to see EIO, wouldn't you? And yes, that's what the kernel would return.
However, with buffered stdio (and flushing outside of our control), what
would likely happen is that some intermediate error return _does_ return
EIO, but then the kernel might decide to re-mount the filesystem read-only
due to the error, and the actual *report* for us might be

"write failure on standard output: read-only filesystem"

which lost the EIO.

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

Merge branch 'lt/run'Junio C Hamano Sat, 30 Jun 2007 18:22:08 +0000 (11:22 -0700)

Merge branch 'lt/run'

* lt/run:
Check for IO errors after running a command
Clean up internal command handling

Merge branch 'maint'Junio C Hamano Sat, 30 Jun 2007 18:17:19 +0000 (11:17 -0700)

Merge branch 'maint'

* maint:
Correct the name of NO_R_TO_GCC_LINKER in the comment describing it.
git-remote: document -n
repack: improve documentation on -a option

Correct the name of NO_R_TO_GCC_LINKER in the comment... Matt Kraai Sat, 30 Jun 2007 17:05:03 +0000 (10:05 -0700)

Correct the name of NO_R_TO_GCC_LINKER in the comment describing it.

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

git-remote: document -nSam Vilain Sat, 30 Jun 2007 08:56:16 +0000 (20:56 +1200)

git-remote: document -n

The 'show' and 'prune' commands accept an option '-n'; document what
it does.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

repack: improve documentation on -a optionSam Vilain Sat, 30 Jun 2007 08:56:12 +0000 (20:56 +1200)

repack: improve documentation on -a option

Some minor enhancements to the git-repack manual page.

Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-tag: Fix "can't shift that many".Alexandre Vassalotti Thu, 28 Jun 2007 16:56:57 +0000 (12:56 -0400)

git-tag: Fix "can't shift that many".

This stop git-tag from emitting a "shift: can't shift that many"
error, when listing tags.

[jc: with further fixups from Sam Vilain merged in; it passes
the tests under dash now]

Signed-off-by: Alexandre Vassalotti <alexandre@peadrop.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Correct usages of sed in git-tag for Mac OS XShawn O. Pearce Sat, 30 Jun 2007 06:42:47 +0000 (02:42 -0400)

Correct usages of sed in git-tag for Mac OS X

Both `git-tag -l` and `git tag -v` fail on Mac OS X due to their
non-standard uses of sed. Actually `git tag -v` fails because the
underlying git-tag-verify uses a non-standard sed command.

We now stick to only standard sed, which does make our sed scripts
slightly more complicated, but we can actually list tags with more
than 0 lines of additional context and we can verify signed tags
with gpg. These major Git functions are much more important than
saving two or three lines of a simple sed script.

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

Update draft Release Notes for 1.5.3Junio C Hamano Fri, 29 Jun 2007 16:20:06 +0000 (09:20 -0700)

Update draft Release Notes for 1.5.3

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

Merge branch 'maint'Junio C Hamano Fri, 29 Jun 2007 05:05:30 +0000 (22:05 -0700)

Merge branch 'maint'

* maint:

Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano Fri, 29 Jun 2007 04:32:41 +0000 (21:32 -0700)

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

* 'master' of git://repo.or.cz/git-gui:
git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack
git-gui: Don't nice git blame on MSYS as nice is not supported
git-gui: Don't require $DISPLAY just to get --version
git-gui: Quiet our installation process
git-gui: Bind Tab/Shift-Tab to cycle between panes in blame
git-gui: Correctly install to /usr/bin on Cygwin

Merge branch 'maint' of git://repo.or.cz/git-gui into... Junio C Hamano Fri, 29 Jun 2007 04:28:36 +0000 (21:28 -0700)

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

* 'maint' of git://repo.or.cz/git-gui:
git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack
git-gui: Don't nice git blame on MSYS as nice is not supported
git-gui: Don't require $DISPLAY just to get --version
git-gui: Bind Tab/Shift-Tab to cycle between panes in blame
git-gui: Correctly install to /usr/bin on Cygwin

Avoid perl in t1300-repo-configAlex Riesen Wed, 27 Jun 2007 12:40:41 +0000 (14:40 +0200)

Avoid perl in t1300-repo-config

It fixes the test on system where ActiveState Perl is used.

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

git-cvsimport: force checkout of working tree after... Gerrit Pape Thu, 28 Jun 2007 11:12:07 +0000 (11:12 +0000)

git-cvsimport: force checkout of working tree after initial import

When creating a brand new git repository through git-cvsimport (not
incremental import), force a checkout of HEAD of master as working tree
after successful import using the -f switch to git checkout. Otherwise
the working tree is empty, and all files are reported as 'deleted' by
git status.

This was noticed and reported by Cameron Dale through
http://bugs.debian.org/430903

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

Add test-script for git-tagCarlos Rica Thu, 28 Jun 2007 20:09:12 +0000 (22:09 +0200)

Add test-script for git-tag

These tests are useful to develop the C version for git-tag.sh,
ensuring that the future builtin-tag.c will not break previous
behaviour.

The tests are focused on listing, verifying, deleting and creating
tags, checking always that the correct status value is returned
and everything remains as expected.

In order to verify and create signed tags, a PGP key was also
added, being created this way: gpg --homedir t/t7004 --gen-key
Type DSA and Elgamal, size 2048 bits, no expiration date.
Name and email: C O Mitter <committer@example.com>
No password given, to enable non-interactive operation.

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

Quiet the output from git-init when cloning, if requested.Jeffrey C. Ollie Thu, 7 Jun 2007 12:50:30 +0000 (07:50 -0500)

Quiet the output from git-init when cloning, if requested.

Now that git-init has an option to quiet itself, use it if the -q
option was specified on the clone command line.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add an option to quiet git-init.Jeffrey C. Ollie Thu, 7 Jun 2007 12:50:29 +0000 (07:50 -0500)

Add an option to quiet git-init.

git-init lacks an option to suppress non-error and non-warning output -
this patch adds one.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-log: detect dup and fdopen failureJim Meyering Wed, 27 Jun 2007 14:28:53 +0000 (16:28 +0200)

git-log: detect dup and fdopen failure

This defines xdup() and xfdopen() in git-compat-util.h to give
us error-catching variants of them without cluttering the code
too much.

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

git-send-email: make options easier to configure.Adam Roben Thu, 28 Jun 2007 03:59:37 +0000 (20:59 -0700)

git-send-email: make options easier to configure.

This change makes git-send-email's behavior easier to modify by adding config
equivalents for two more of git-send-email's flags.

The mapping of flag to config setting is:
--[no-]supress-from => sendemail.suppressfrom
--[no-]signed-off-cc => sendemail.signedoffcc

It renames the --threaded option to --thread/--no-thread; the
config variable is also called sendemail.thread.

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

Merge branch 'master' of git://git./gitk/gitkJunio C Hamano Thu, 28 Jun 2007 03:48:17 +0000 (20:48 -0700)

Merge branch 'master' of git://git./gitk/gitk

* 'master' of git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Update selection background colorbar in prefs dialog
gitk: Use a spinbox for setting tabstop settings

gitk: Update selection background colorbar in prefs... Mark Levedahl Wed, 27 Jun 2007 01:51:34 +0000 (21:51 -0400)

gitk: Update selection background colorbar in prefs dialog

The callback function was incorrectly set to update the background
colorbar when updated the selection background. This did not affect the
colors chosen or their use, just their presentation in the preferences
dialog box.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>

gitk: Use a spinbox for setting tabstop settingsMark Levedahl Wed, 27 Jun 2007 01:51:35 +0000 (21:51 -0400)

gitk: Use a spinbox for setting tabstop settings

The tabstop must be a smallish positive integer, and a spinbox is the
accepted UI control to accomplish this limiting rather than the text
entry box previously used.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>

Add test script for git-stripspace.Carlos Rica Mon, 25 Jun 2007 19:24:21 +0000 (21:24 +0200)

Add test script for git-stripspace.

These tests check some features that git-stripspace already has
and those that it should manage well: Removing trailing spaces
from lines, removing blank lines at the beginning and end,
unifying multiple lines between paragraphs, doing the correct
when there is no newline at the last line, etc.

It seems that the implementation needs to save the whole line
in memory to be able to manage correctly long lines with
text and spaces conveniently distribuited on them.

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

config: add support for --bool and --int while setting... Frank Lichtenheld Mon, 25 Jun 2007 14:00:24 +0000 (16:00 +0200)

config: add support for --bool and --int while setting values

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'master' of git://repo.or.cz/git/fastimportJunio C Hamano Wed, 27 Jun 2007 05:23:29 +0000 (22:23 -0700)

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

* 'master' of git://repo.or.cz/git/fastimport:
Teach bash how to complete +refspec on git-push

git-send-email: Add --threaded optionAdam Roben Tue, 26 Jun 2007 22:48:30 +0000 (15:48 -0700)

git-send-email: Add --threaded option

The --threaded option controls whether the In-Reply-To header will be set on
any emails sent. The current behavior is to always set this header, so this
option is most useful in its negated form, --no-threaded. This behavior can
also be controlled through the 'sendemail.threaded' config setting.

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

Fix git-stripspace to process correctly long lines... Carlos Rica Mon, 25 Jun 2007 19:28:01 +0000 (21:28 +0200)

Fix git-stripspace to process correctly long lines and spaces.

Now the implementation gets more memory to store completely
each line before removing trailing spaces, and does it right
when the last line of the file ends with spaces and no newline
at the end.

Function stripspace needs again to be non-static in order to call
it from "builtin-tag.c" and the upcoming "builtin-commit.c".
A new parameter skip_comments was also added to the stripspace
function to optionally strips every shell #comment from the input,
needed for doing this task on those programs.

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

Don't ignore a pack-refs write failureJim Meyering Sun, 24 Jun 2007 19:13:11 +0000 (21:13 +0200)

Don't ignore a pack-refs write failure

Without this, if the size of refs_file at that point is ever an exact
multiple of BUFSIZ, then an EIO or ENOSPC error on the final write would
not be diagnosed.

It's not worth worrying about EPIPE here.
Although theoretically possible that someone kill this process
with a manual SIGPIPE, it's not at all likely.

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

detect close failure on just-written file handlesJim Meyering Sun, 24 Jun 2007 19:20:41 +0000 (21:20 +0200)

detect close failure on just-written file handles

I audited git for potential undetected write failures.
In the cases fixed below, the diagnostics I add mimic the diagnostics
used in surrounding code, even when that means not reporting
the precise strerror(errno) cause of the error.

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