gitweb.git
Documentation: update graph api example.Allan Caffee Mon, 30 Mar 2009 14:13:45 +0000 (10:13 -0400)

Documentation: update graph api example.

As of commit 03300c0 the graph API uses '*' for all nodes including merges.
This updates the example in the documentation to match.

Signed-off-by: Allan Caffee <allan.caffee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.1' into maintJunio C Hamano Mon, 30 Mar 2009 06:11:13 +0000 (23:11 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
import-zips: fix thinko

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Mon, 30 Mar 2009 06:11:03 +0000 (23:11 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
import-zips: fix thinko

git-svn: fix ls-tree usage with dash-prefixed pathsEric Wong Sun, 29 Mar 2009 06:10:45 +0000 (23:10 -0700)

git-svn: fix ls-tree usage with dash-prefixed paths

To find the blob object name given a tree and pathname, we were
incorrectly calling "git ls-tree" with a "--" argument followed
by the pathname of the file we wanted to get.

git ls-tree <TREE> -- --dashed/path/name.c

Unlike many command-line interfaces, the "--" alone does not
symbolize the end of non-option arguments on the command-line.

ls-tree interprets the "--" as a prefix to match against, thus
the entire contents of the --dashed/* hierarchy would be
returned because the "--" matches "--dashed" and every path
under it.

Thanks to Anton Gyllenberg for pointing me toward the
Twisted repository as a real-world example of this case.

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

import-zips: fix thinkoJohannes Schindelin Sun, 29 Mar 2009 20:42:27 +0000 (22:42 +0200)

import-zips: fix thinko

Embarrassingly, the common prefix calculation did not work properly, due
to a mistake in the assignment: instead of assigning the dirname of the
current file name, the dirname of the current common prefix needs to
be assigned to common prefix, when the current prefix does not match the
current file name.

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

set_shared_perm(): sometimes we know what the final... Junio C Hamano Sat, 28 Mar 2009 06:21:00 +0000 (23:21 -0700)

set_shared_perm(): sometimes we know what the final mode bits should look like

adjust_shared_perm() first obtains the mode bits from lstat(2), expecting
to find what the result of applying user's umask is, and then tweaks it
as necessary. When the file to be adjusted is created with mkstemp(3),
however, the mode thusly obtained does not have anything to do with user's
umask, and we would need to start from 0444 in such a case and there is no
point running lstat(2) for such a path.

This introduces a new API set_shared_perm() to bypass the lstat(2) and
instead force setting the mode bits to the desired value directly.
adjust_shared_perm() becomes a thin wrapper to the function.

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

move_temp_to_file(): do not forget to chmod() in "Coda... Junio C Hamano Sat, 28 Mar 2009 06:14:39 +0000 (23:14 -0700)

move_temp_to_file(): do not forget to chmod() in "Coda hack" codepath

Now move_temp_to_file() is responsible for doing everything that is
necessary to turn a tempfile in $GIT_DIR into its final form, it must make
sure "Coda hack" codepath correctly makes the file read-only.

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Sat, 28 Mar 2009 07:41:50 +0000 (00:41 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
test-lib: Clean up comments and Makefile.
diff --no-index: Do not generate patch output if other output is requested

test-lib: Clean up comments and Makefile.Emil Sit Sat, 28 Mar 2009 01:57:18 +0000 (21:57 -0400)

test-lib: Clean up comments and Makefile.

Bring documentation in test-lib and clean target
in Makefile in-line with abc5d372.

Signed-off-by: Emil Sit <sit@emilsit.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Move chmod(foo, 0444) into move_temp_to_file()Johan Herland Thu, 26 Mar 2009 15:16:47 +0000 (16:16 +0100)

Move chmod(foo, 0444) into move_temp_to_file()

When writing out a loose object or a pack (index), move_temp_to_file() is
called to finalize the resulting file. These files (loose files and packs)
should all have permission mode 0444 (modulo adjust_shared_perm()).
Therefore, instead of doing chmod(foo, 0444) explicitly from each callsite
(or even forgetting to chmod() at all), do the chmod() call from within
move_temp_to_file().

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

"core.sharedrepository = 0mode" should set, not loosenJunio C Hamano Wed, 25 Mar 2009 23:19:36 +0000 (16:19 -0700)

"core.sharedrepository = 0mode" should set, not loosen

This fixes the behaviour of octal notation to how it is defined in the
documentation, while keeping the traditional "loosen only" semantics
intact for "group" and "everybody".

Three main points of this patch are:

- For an explicit octal notation, the internal shared_repository variable
is set to a negative value, so that we can tell "group" (which is to
"OR" in 0660) and 0660 (which is to "SET" to 0660);

- git-init did not set shared_repository variable early enough to affect
the initial creation of many files, notably copied templates and the
configuration. We set it very early when a command-line option
specifies a custom value.

- Many codepaths create files inside $GIT_DIR by various ways that all
involve mkstemp(), and then call move_temp_to_file() to rename it to
its final destination. We can add adjust_shared_perm() call here; for
the traditional "loosen-only", this would be a no-op for many codepaths
because the mode is already loose enough, but with the new behaviour it
makes a difference.

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

Documentation: format-patch --root clarificationsThomas Rast Thu, 26 Mar 2009 17:29:25 +0000 (18:29 +0100)

Documentation: format-patch --root clarifications

Users were confused about the meaning and use of the --root option.
Notably, since 68c2ec7 (format-patch: show patch text for the root
commit, 2009-01-10), --root has nothing to do with showing the patch
text for the root commit any more.

Shorten and clarify the corresponding paragraph in the DESCRIPTION
section, document --root under OPTIONS, and add an explicit note that
root commits are formatted regardless.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

documentation: update cvsimport description of "-r... Carlo Marcelo Arenas Belon Thu, 26 Mar 2009 07:08:09 +0000 (00:08 -0700)

documentation: update cvsimport description of "-r" for recent clone

the "--use-separate-remote" option no longer exists, having since
become the default for a clone.

Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Remove spurious uses of "you" in git... David J. Mellor Thu, 26 Mar 2009 03:44:44 +0000 (20:44 -0700)

Documentation: Remove spurious uses of "you" in git-bisect.txt.

These were added by accident in a42dea3.

This patch also rewords the description of how ranges of commits can be
skipped.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff --no-index: Do not generate patch output if other... Johannes Sixt Wed, 25 Mar 2009 17:19:46 +0000 (18:19 +0100)

diff --no-index: Do not generate patch output if other output is requested

Previously, 'git diff --no-index --stat a b' generated patch output in
addition to the --stat output (or whatever other output format was
requested). Now only the requested output is generated, and patch
output remains the default.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Increase the size of the die/warning buffer to avoid... Shawn O. Pearce Tue, 24 Mar 2009 23:10:35 +0000 (16:10 -0700)

Increase the size of the die/warning buffer to avoid truncation

Long messages like those from lockfile.c when a lock can't be
obtained truncate with only 256 bytes in the message buffer.
Bump it to 1024 to give more space for these longer cases.

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Tue, 24 Mar 2009 22:31:21 +0000 (15:31 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
close_sha1_file(): make it easier to diagnose errors
avoid possible overflow in delta size filtering computation

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Tue, 24 Mar 2009 22:31:15 +0000 (15:31 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
close_sha1_file(): make it easier to diagnose errors
avoid possible overflow in delta size filtering computation

close_sha1_file(): make it easier to diagnose errorsLinus Torvalds Tue, 24 Mar 2009 19:31:36 +0000 (12:31 -0700)

close_sha1_file(): make it easier to diagnose errors

A bug report with "unable to write sha1 file" made us realize that we do
not have enough information to guess why close() is failing.

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

avoid possible overflow in delta size filtering computationNicolas Pitre Tue, 24 Mar 2009 19:56:12 +0000 (15:56 -0400)

avoid possible overflow in delta size filtering computation

On a 32-bit system, the maximum possible size for an object is less than
4GB, while 64-bit systems may cope with larger objects. Due to this
limitation, variables holding object sizes are using an unsigned long
type (32 bits on 32-bit systems, or 64 bits on 64-bit systems).

When large objects are encountered, and/or people play with large delta
depth values, it is possible for the maximum allowed delta size
computation to overflow, especially on a 32-bit system. When this
occurs, surviving result bits may represent a value much smaller than
what it is supposed to be, or even zero. This prevents some objects
from being deltified although they do get deltified when a smaller depth
limit is used. Fix this by always performing a 64-bit multiplication.

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

Documentation: minor grammatical fix in git-check-ref... David J. Mellor Mon, 23 Mar 2009 01:00:17 +0000 (18:00 -0700)

Documentation: minor grammatical fix in git-check-ref-format.txt

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes in git-check... David J. Mellor Mon, 23 Mar 2009 01:00:16 +0000 (18:00 -0700)

Documentation: minor grammatical fixes in git-check-attr.txt

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes in git-cat-file.txtDavid J. Mellor Mon, 23 Mar 2009 01:00:15 +0000 (18:00 -0700)

Documentation: minor grammatical fixes in git-cat-file.txt

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes and rewording... David J. Mellor Mon, 23 Mar 2009 01:00:14 +0000 (18:00 -0700)

Documentation: minor grammatical fixes and rewording in git-bundle.txt

This commit also converts all reference specifications to a monospaced font,
as the embedded ~ character used in some of the references sometimes causes
the text up to the next ~ to be displayed incorrectly as a subscript when the
HTML pages are generated. This was tested with asciidoc 8.2.5.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: remove some uses of the passive voice... David J. Mellor Mon, 23 Mar 2009 03:11:10 +0000 (20:11 -0700)

Documentation: remove some uses of the passive voice in git-bisect.txt

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.1' into maintJunio C Hamano Sun, 22 Mar 2009 22:41:00 +0000 (15:41 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
everyday: use the dashless form of git-init

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 22 Mar 2009 22:40:55 +0000 (15:40 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
everyday: use the dashless form of git-init

diff --cached: do not borrow from a work tree when... Junio C Hamano Sun, 22 Mar 2009 22:26:07 +0000 (15:26 -0700)

diff --cached: do not borrow from a work tree when a path is marked as assume-unchanged

When the index says that the file in the work tree that corresponds to the
blob object that is used for comparison is known to be unchanged, "diff"
reads from the file and applies convert_to_git(), instead of inflating the
object, to feed the internal diff engine with, because an earlier
benchnark found that it tends to be faster to use this optimization.

However, the index can lie when the path is marked as assume-unchanged.
Disable the optimization for such paths.

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

Smudge the files fed to external diff and textconvJohannes Schindelin Sat, 21 Mar 2009 11:42:52 +0000 (12:42 +0100)

Smudge the files fed to external diff and textconv

When preparing temporary files for an external diff or textconv, it is
easier on the external tools, especially when they are implemented using
platform tools, if they are fed the input after convert_to_working_tree().

This fixes msysGit issue 177.

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

everyday: use the dashless form of git-initDavid Aguilar Sun, 22 Mar 2009 09:15:13 +0000 (02:15 -0700)

everyday: use the dashless form of git-init

The 'Everyday GIT' guide was using the old dashed form
of git-init.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.6.2.2Junio C Hamano Sun, 22 Mar 2009 06:21:15 +0000 (23:21 -0700)

Update draft release notes to 1.6.2.2

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

ls-files: require worktree when --deleted is givenJeff King Tue, 17 Mar 2009 09:03:19 +0000 (05:03 -0400)

ls-files: require worktree when --deleted is given

The code will end up calling lstat() to check whether the
file still exists; obviously this doesn't work if we're not
in the worktree.

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

pickaxe: count regex matches only onceRené Scharfe Mon, 16 Mar 2009 18:38:42 +0000 (19:38 +0100)

pickaxe: count regex matches only once

When --pickaxe-regex is used, forward past the end of matches instead of
advancing to the byte after their start. This way matches count only
once, even if the regular expression matches their tail -- like in the
fixed-string fork of the code.

E.g.: /.*/ used to count the number of bytes instead of the number of
lines. /aa/ resulted in a count of two in "aaa" instead of one.

Also document the fact that regexec() needs a NUL-terminated string as
its second argument by adding an assert().

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Sun, 22 Mar 2009 06:10:42 +0000 (23:10 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:

Merge branch 'tr/maint-1.6.0-send-email-irt' into maintJunio C Hamano Sun, 22 Mar 2009 06:09:21 +0000 (23:09 -0700)

Merge branch 'tr/maint-1.6.0-send-email-irt' into maint

* tr/maint-1.6.0-send-email-irt:
send-email: test --no-thread --in-reply-to combination
send-email: respect in-reply-to regardless of threading

Conflicts:
t/t9001-send-email.sh

Merge branch 'mg/maint-submodule-normalize-path' into... Junio C Hamano Sun, 22 Mar 2009 06:08:27 +0000 (23:08 -0700)

Merge branch 'mg/maint-submodule-normalize-path' into maint

* mg/maint-submodule-normalize-path:
git submodule: Fix adding of submodules at paths with ./, .. and //
git submodule: Add test cases for git submodule add

Merge branch 'rs/memmem' into maintJunio C Hamano Sun, 22 Mar 2009 06:08:21 +0000 (23:08 -0700)

Merge branch 'rs/memmem' into maint

* rs/memmem:
optimize compat/ memmem()
diffcore-pickaxe: use memmem()

Merge branch 'js/rsync-local' into maintJunio C Hamano Sun, 22 Mar 2009 06:03:17 +0000 (23:03 -0700)

Merge branch 'js/rsync-local' into maint

* js/rsync-local:
rsync transport: allow local paths, and fix tests

Merge branch 'db/maint-missing-origin' into maintJunio C Hamano Sun, 22 Mar 2009 06:02:55 +0000 (23:02 -0700)

Merge branch 'db/maint-missing-origin' into maint

* db/maint-missing-origin:
Remove total confusion from git-fetch and git-push
Give error when no remote is configured

Merge branch 'jc/maint-1.6.0-read-tree-overlay' into... Junio C Hamano Sun, 22 Mar 2009 06:02:47 +0000 (23:02 -0700)

Merge branch 'jc/maint-1.6.0-read-tree-overlay' into maint

* jc/maint-1.6.0-read-tree-overlay:
read-tree A B C: do not create a bogus index and do not segfault

Merge branch 'js/maint-1.6.0-path-normalize' into maint... Junio C Hamano Sun, 22 Mar 2009 05:59:19 +0000 (22:59 -0700)

Merge branch 'js/maint-1.6.0-path-normalize' into maint-1.6.1

* js/maint-1.6.0-path-normalize:
Remove unused normalize_absolute_path()
Test and fix normalize_path_copy()
Fix GIT_CEILING_DIRECTORIES on Windows
Move sanitary_path_copy() to path.c and rename it to normalize_path_copy()
Make test-path-utils more robust against incorrect use

Merge branch 'jc/maint-1.6.0-pack-directory' into maint... Junio C Hamano Sun, 22 Mar 2009 05:53:36 +0000 (22:53 -0700)

Merge branch 'jc/maint-1.6.0-pack-directory' into maint-1.6.1

* jc/maint-1.6.0-pack-directory:
Fix odb_mkstemp() on AIX
Make sure objects/pack exists before creating a new pack

Conflicts:
wrapper.c

format-patch: --numbered-files and --stdout aren't... Stephen Boyd Sun, 22 Mar 2009 04:32:43 +0000 (21:32 -0700)

format-patch: --numbered-files and --stdout aren't mutually exclusive

For example:

git format-patch --numbered-files --stdout --attach HEAD~~

will create two messages with files 1 and 2 attached respectively.
Without --attach/--inline but with --stdout, --numbered-files option
can be simply ignored, because we are not creating any file ourselves.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-objects: don't loosen objects available in alterna... Brandon Casey Sat, 21 Mar 2009 22:26:11 +0000 (17:26 -0500)

pack-objects: don't loosen objects available in alternate or kept packs

If pack-objects is called with the --unpack-unreachable option then it
will unpack (i.e. loosen) all unreferenced objects from local not-kept
packs, including those that also exist in packs residing in an alternate
object database or a locally kept pack. The only user of this option is
git-repack.

In this case, repack will follow the call to pack-objects with a call to
prune-packed, which will delete these newly loosened objects, making the
act of loosening a waste of time. The unnecessary loosening can be
avoided by checking whether an object exists in a non-local pack or a
locally kept pack before loosening it.

This fixes the 'local packed unreachable obs that exist in alternate ODB
are not loosened' test in t7700.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Propagate --exec-path setting to external commands... Johannes Sixt Sat, 21 Mar 2009 22:21:18 +0000 (23:21 +0100)

Propagate --exec-path setting to external commands via GIT_EXEC_PATH

Let PATH0=$PATH that was set before the invocation.
Let /foo be a build directory.
Let /pfx be the installation prefix.
Let pfxexecpath=/pfx/libexec/git-core.

The following is going on when 'git --exec-path=/foo gc' is invoked:

1. git sets PATH=/foo:$PATH0 using the path from --exec-path

2. gc execs 'git repack' (note: no dash).

3. Since there is a git in /foo (it's a build directory), /foo/git is
taken.

4. No explicit exec-path is set this time, hence, this secondary git sets
PATH=$pfxexecpath:/foo:$PATH

5. Since 'repack' is not a built-in, execv_dashed_external execs
'git-repack' (note: dash).

6. There is a $pfxexecpath/git-repack, and it is taken.

7. This git-repack runs 'git pack-objects' (note: no dash).

8. There is no git in $pfxexecpath, but there is one in /foo. Hence,
/foo/git is run.

9. pack-objects is a builtin, hence, in effect /foo/git-pack-objects
is run.

As you can see, the way in which we previously set the PATH allowed to
mix gits of different vintage. By setting GIT_EXEC_PATH when --exec-path
was given on the command line, we reduce the confusion.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7700: demonstrate repack flaw which may loosen objects... Brandon Casey Sat, 21 Mar 2009 22:25:30 +0000 (17:25 -0500)

t7700: demonstrate repack flaw which may loosen objects unnecessarily

If an unreferenced object exists in both a local pack and in either a pack
residing in an alternate object database or a local kept pack, then the
pack-objects call made by repack will loosen that object only to have it
immediately pruned by repack's call to prune-packed.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-branch: display "was sha1" on branch deletion rathe... Brandon Casey Sun, 22 Mar 2009 00:09:17 +0000 (19:09 -0500)

git-branch: display "was sha1" on branch deletion rather than just "sha1"

Make it more pleasant to read about a branch deletion by adding "was".
Jeff King suggested this, and I ignored it. He was right.

Update t3200 test again to match the change in output.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove --kept-pack-only option and associated infrastru... Brandon Casey Fri, 20 Mar 2009 03:47:54 +0000 (22:47 -0500)

Remove --kept-pack-only option and associated infrastructure

This option to pack-objects/rev-list was created to improve the -A and -a
options of repack. It was found to be lacking in that it did not provide
the ability to differentiate between local and non-local kept packs, and
found to be unnecessary since objects residing in local kept packs can be
filtered out by the --honor-pack-keep option.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-objects: only repack or loosen objects residing... Brandon Casey Fri, 20 Mar 2009 03:47:52 +0000 (22:47 -0500)

pack-objects: only repack or loosen objects residing in "local" packs

These two features were invented for use by repack when repack will delete
the local packs that have been made redundant. The packs accessible
through alternates are not deleted by repack, so the objects contained in
them are still accessible after the local packs are deleted. They do not
need to be repacked into the new pack or loosened. For the case of
loosening they would immediately be deleted by the subsequent prune-packed
that is called by repack anyway.

This fixes the test
'packed unreachable obs in alternate ODB are not loosened' in t7700.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-repack.sh: don't use --kept-pack-only option to... Brandon Casey Fri, 20 Mar 2009 03:47:51 +0000 (22:47 -0500)

git-repack.sh: don't use --kept-pack-only option to pack-objects

The --kept-pack-only option to pack-objects treats all kept packs as equal.
This results in objects that reside in an alternate pack that has a .keep
file, not being packed into a newly created pack when the user specifies the
-a option to repack. Since the user may not have any control over the
alternate database, git should not refrain from repacking those objects
even though they are in a pack with a .keep file.

This fixes the 'packed obs in alternate ODB kept pack are repacked' test in
t7700.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t7700-repack: add two new tests demonstrating repacking... Brandon Casey Fri, 20 Mar 2009 03:47:50 +0000 (22:47 -0500)

t7700-repack: add two new tests demonstrating repacking flaws

1) The new --kept-pack-only mechansim of rev-list/pack-objects has
replaced --unpacked=. This new mechansim does not operate solely on
"local" packs now. The result is that objects residing in an alternate
pack which has a .keep file will not be repacked with repack -a.

This flaw is only apparent when a commit object is the one residing in
an alternate kept pack.

2) The 'repack unpacked objects' and 'loosen unpacked objects' mechanisms
of pack-objects, i.e. --keep-unreachable and --unpack-unreachable,
now do not operate solely on local packs. The --keep-unreachable
option no longer has any callers, but --unpack-unreachable is used when
repack is called with '-A -d' and the local repo has existing packs.
In this case, objects residing in alternate, not-kept packs will be
loosened, and then immediately deleted by repack's call to
prune-packed.

The test must manually call pack-objects to avoid the call to
prune-packed that is made by repack when -d is used.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: reword example text in git-bisect.txt.David J. Mellor Fri, 20 Mar 2009 03:35:34 +0000 (20:35 -0700)

Documentation: reword example text in git-bisect.txt.

Avoid splitting sentences across examples of command usage.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: clarify how -S worksJeff King Tue, 3 Mar 2009 15:40:41 +0000 (10:40 -0500)

doc: clarify how -S works

The existing text was very vague about what exactly it means
for difference to "contain" a change. This seems to cause
confusion on the mailing list every month or two.

To fix it we:

1. use "introduce or remove an instance of" instead of
"contain"

2. point the user to gitdiffcore(7), which contains a more
complete explanation

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

Documentation: reworded the "Description" section of... David J. Mellor Thu, 19 Mar 2009 07:00:12 +0000 (00:00 -0700)

Documentation: reworded the "Description" section of git-bisect.txt.

Added fixes missing from 2364259.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

blame: read custom grafts given by -S before calling... Junio C Hamano Wed, 18 Mar 2009 07:13:03 +0000 (00:13 -0700)

blame: read custom grafts given by -S before calling setup_revisions()

setup_revisions() while getting the command line arguments parses the
given commits from the command line, which means their direct parents will
not be rewritten by the custom graft file.

Call read_ancestry() early to work around this issue.

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

Documentation: minor grammatical fixes in git-branch... David J. Mellor Tue, 17 Mar 2009 06:16:17 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-branch.txt.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes in git-blame... David J. Mellor Tue, 17 Mar 2009 06:16:16 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-blame.txt.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: reword the "Description" section of... David J. Mellor Tue, 17 Mar 2009 06:16:15 +0000 (23:16 -0700)

Documentation: reword the "Description" section of git-bisect.txt.

Reword this section to make it less chatty. Also make minor grammatical
fixes.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: minor grammatical fixes in git-archive... David J. Mellor Tue, 17 Mar 2009 06:16:14 +0000 (23:16 -0700)

Documentation: minor grammatical fixes in git-archive.txt.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove total confusion from git-fetch and git-pushJunio C Hamano Mon, 16 Mar 2009 07:35:09 +0000 (00:35 -0700)

Remove total confusion from git-fetch and git-push

The config file is not the only place remotes are defined, and without
consulting .git/remotes and .git/branches, you won't know if "origin" is
configured by the user. Don't give up too early and insult the user with
a wisecrack "Where do you want to fetch from today?"

The only thing the previous patch seems to want to prevent from happening
is a lazy "git fetch/push" that does not say where-from/to to produce an
error message 'origin not found', and we can do that by not letting
add_url_alias() to turn a nickname "origin" literally into a pathname
"origin" without changing the rest of the logic.

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

GIT 1.6.2.1 v1.6.2.1Junio C Hamano Sun, 15 Mar 2009 20:03:19 +0000 (13:03 -0700)

GIT 1.6.2.1

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Fri, 13 Mar 2009 06:37:16 +0000 (23:37 -0700)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Fri, 13 Mar 2009 06:36:57 +0000 (23:36 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
bisect: fix another instance of eval'ed string
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped
Support "\" in non-wildcard exclusion entries

Conflicts:
git-bisect.sh

Merge branch 'en/maint-1.6.1-hash-object' into maint... Junio C Hamano Fri, 13 Mar 2009 06:11:23 +0000 (23:11 -0700)

Merge branch 'en/maint-1.6.1-hash-object' into maint-1.6.1

* en/maint-1.6.1-hash-object:
Ensure proper setup of git_dir for git-hash-object

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into... Junio C Hamano Fri, 13 Mar 2009 04:48:43 +0000 (21:48 -0700)

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.0

* ks/maint-1.6.0-mailinfo-folded:
mailinfo: tests for RFC2047 examples
mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
mailinfo: 'From:' header should be unfold as well
mailinfo: correctly handle multiline 'Subject:' header

Merge branch 'cc/maint-1.6.0-bisect-fix' into maint... Junio C Hamano Fri, 13 Mar 2009 04:48:26 +0000 (21:48 -0700)

Merge branch 'cc/maint-1.6.0-bisect-fix' into maint-1.6.0

* cc/maint-1.6.0-bisect-fix:
bisect: fix another instance of eval'ed string
bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

Merge branch 'fg/maint-1.6.0-exclude-bq' into maint... Junio C Hamano Fri, 13 Mar 2009 04:48:07 +0000 (21:48 -0700)

Merge branch 'fg/maint-1.6.0-exclude-bq' into maint-1.6.0

* fg/maint-1.6.0-exclude-bq:
Support "\" in non-wildcard exclusion entries

Merge branch 'js/maint-1.6.1-filter-branch-submodule... Junio C Hamano Fri, 13 Mar 2009 04:46:50 +0000 (21:46 -0700)

Merge branch 'js/maint-1.6.1-filter-branch-submodule' into maint-1.6.1

* js/maint-1.6.1-filter-branch-submodule:
filter-branch: do not consider diverging submodules a 'dirty worktree'

Merge branch 'gt/maint-1.6.1-utf8-width' into maint... Junio C Hamano Fri, 13 Mar 2009 04:46:35 +0000 (21:46 -0700)

Merge branch 'gt/maint-1.6.1-utf8-width' into maint-1.6.1

* gt/maint-1.6.1-utf8-width:
builtin-blame.c: Use utf8_strwidth for author's names
utf8: add utf8_strwidth()

Merge branch 'js/maint-1.6.1-remote-remove-mirror'... Junio C Hamano Fri, 13 Mar 2009 04:45:56 +0000 (21:45 -0700)

Merge branch 'js/maint-1.6.1-remote-remove-mirror' into maint-1.6.1

* js/maint-1.6.1-remote-remove-mirror:
builtin-remote: make rm operation safer in mirrored repository
builtin-remote: make rm() use properly named variable to hold return value

Merge branch 'ek/maint-1.6.1-filter-branch-bare' into... Junio C Hamano Fri, 13 Mar 2009 04:45:21 +0000 (21:45 -0700)

Merge branch 'ek/maint-1.6.1-filter-branch-bare' into maint-1.6.1

* ek/maint-1.6.1-filter-branch-bare:
filter-branch: Fix fatal error on bare repositories

Merge branch 'jc/maint-1.6.1-add-u-remove-conflicted... Junio C Hamano Fri, 13 Mar 2009 04:45:14 +0000 (21:45 -0700)

Merge branch 'jc/maint-1.6.1-add-u-remove-conflicted' into maint-1.6.1

* jc/maint-1.6.1-add-u-remove-conflicted:
add -u: do not fail to resolve a path as deleted

Merge branch 'js/maint-1.6.1-rebase-i-submodule' into... Junio C Hamano Fri, 13 Mar 2009 04:45:02 +0000 (21:45 -0700)

Merge branch 'js/maint-1.6.1-rebase-i-submodule' into maint-1.6.1

* js/maint-1.6.1-rebase-i-submodule:
Fix submodule squashing into unrelated commit
rebase -i squashes submodule changes into unrelated commit

Merge branch 'jc/maint-1.6.1-allow-uninteresting-missin... Junio C Hamano Fri, 13 Mar 2009 04:44:48 +0000 (21:44 -0700)

Merge branch 'jc/maint-1.6.1-allow-uninteresting-missing' into maint-1.6.1

* jc/maint-1.6.1-allow-uninteresting-missing:
revision traversal: allow UNINTERESTING objects to be missing

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into... Junio C Hamano Fri, 13 Mar 2009 04:44:00 +0000 (21:44 -0700)

Merge branch 'ks/maint-1.6.0-mailinfo-folded' into maint-1.6.1

* ks/maint-1.6.0-mailinfo-folded:
mailinfo: tests for RFC2047 examples
mailinfo: add explicit test for mails like '<a.u.thor@example.com> (A U Thor)'
mailinfo: 'From:' header should be unfold as well
mailinfo: correctly handle multiline 'Subject:' header

Merge branch 'jk/maint-1.6.1-cleanup-after-exec-failure... Junio C Hamano Fri, 13 Mar 2009 04:43:38 +0000 (21:43 -0700)

Merge branch 'jk/maint-1.6.1-cleanup-after-exec-failure' into maint-1.6.1

* jk/maint-1.6.1-cleanup-after-exec-failure:
git: use run_command() to execute dashed externals
run_command(): help callers distinguish errors
run_command(): handle missing command errors more gracefully
git: s/run_command/run_builtin/

Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into... Junio C Hamano Fri, 13 Mar 2009 03:01:28 +0000 (20:01 -0700)

Merge branch 'jc/maint-1.6.0-split-diff-metainfo' into maint-1.6.0

* jc/maint-1.6.0-split-diff-metainfo:
diff.c: output correct index lines for a split diff

read-tree A B C: do not create a bogus index and do... Junio C Hamano Thu, 12 Mar 2009 07:02:12 +0000 (00:02 -0700)

read-tree A B C: do not create a bogus index and do not segfault

"git read-tree A B C..." without the "-m" (merge) option is a way to read
these trees on top of each other to get an overlay of them.

An ancient commit ee6566e (Rewrite read-tree, 2005-09-05) passed the
ADD_CACHE_SKIP_DFCHECK flag when calling add_index_entry() to add the
paths obtained from these trees to the index, but it is an incorrect use
of the flag. The flag is meant to be used by callers who know the
addition of the entry does not introduce a D/F conflict to the index in
order to avoid the overhead of checking.

This bug resulted in a bogus index that records both "x" and "x/z" as a
blob after reading three trees that have paths ("x"), ("x", "y"), and
("x/z", "y") respectively. 34110cd (Make 'unpack_trees()' have a separate
source and destination index, 2008-03-06) refactored the callsites of
add_index_entry() incorrectly and added more codepaths that use this flag
when it shouldn't be used.

Also, 0190457 (Move 'unpack_trees()' over to 'traverse_trees()' interface,
2008-03-05) introduced a bug to call add_index_entry() for the tree that
does not have the path in it, passing NULL as a cache entry. This caused
reading multiple trees, one of which has path "x" but another doesn't, to
segfault.

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

send-email: test --no-thread --in-reply-to combinationThomas Rast Wed, 11 Mar 2009 22:40:13 +0000 (23:40 +0100)

send-email: test --no-thread --in-reply-to combination

3e0c4ff (send-email: respect in-reply-to regardless of threading,
2009-03-01) fixed the handling of the In-Reply-To header when both
--no-thread and --in-reply-to are in effect. Add a test for it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes for 1.6.2.1Junio C Hamano Wed, 11 Mar 2009 21:37:15 +0000 (14:37 -0700)

Update draft release notes for 1.6.2.1

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

Merge branch 'js/maint-send-email' into maintJunio C Hamano Wed, 11 Mar 2009 21:01:24 +0000 (14:01 -0700)

Merge branch 'js/maint-send-email' into maint

* js/maint-send-email:
send-email: don't create temporary compose file until it is needed
send-email: --suppress-cc improvements
send-email: handle multiple Cc addresses when reading mbox message
send-email: allow send-email to run outside a repo

Merge branch 'jk/sane-relative-time' into maintJunio C Hamano Wed, 11 Mar 2009 20:59:38 +0000 (13:59 -0700)

Merge branch 'jk/sane-relative-time' into maint

* jk/sane-relative-time:
never fallback relative times to absolute

Merge branch 'jc/maint-add-p-unquote' into maintJunio C Hamano Wed, 11 Mar 2009 20:55:49 +0000 (13:55 -0700)

Merge branch 'jc/maint-add-p-unquote' into maint

* jc/maint-add-p-unquote:
git-add -i/-p: learn to unwrap C-quoted paths

Merge branch 'fg/maint-exclude-bq' into maintJunio C Hamano Wed, 11 Mar 2009 20:53:53 +0000 (13:53 -0700)

Merge branch 'fg/maint-exclude-bq' into maint

* fg/maint-exclude-bq:
Support "\" in non-wildcard exclusion entries

Merge branch 'en/maint-hash-object' into maintJunio C Hamano Wed, 11 Mar 2009 20:51:59 +0000 (13:51 -0700)

Merge branch 'en/maint-hash-object' into maint

* en/maint-hash-object:
Ensure proper setup of git_dir for git-hash-object

Conflicts:
hash-object.c

rsync transport: allow local paths, and fix testsJohannes Schindelin Mon, 9 Mar 2009 18:44:55 +0000 (19:44 +0100)

rsync transport: allow local paths, and fix tests

Earlier, the rsync tests were disabled by default, as they needed a
running rsyncd daemon. This was only due to the limitation that our
rsync transport only allowed full URLs of the form

rsync://<host>/<path>

Relaxing the URLs to allow

rsync:<path>

permitted the change in the tests to run whenever rsync is available,
without requiring a fully configured and running rsyncd.

While at it, the tests were fixed so that they run in directories with a
space in their name.

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

Give error when no remote is configuredDaniel Barkalow Wed, 11 Mar 2009 05:47:20 +0000 (01:47 -0400)

Give error when no remote is configured

When there's no explicitly-named remote, we use the remote specified
for the current branch, which in turn defaults to "origin". But it
this case should require the remote to actually be configured, and not
fall back to the path "origin".

Possibly, the config file's "remote = something" should require the
something to be a configured remote instead of a bare repository URL,
but we actually test with a bare repository URL.

In fetch, we were giving the sensible error message when coming up
with a URL failed, but this wasn't actually reachable, so move that
error up and use it when appropriate.

In push, we need a new error message, because the old one (formerly
unreachable without a lot of help) used the repo name, which was NULL.

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

Merge branch 'maint-1.6.1' into maintJunio C Hamano Sun, 8 Mar 2009 05:00:27 +0000 (21:00 -0800)

Merge branch 'maint-1.6.1' into maint

* maint-1.6.1:
builtin-revert.c: release index lock when cherry-picking an empty commit

builtin-revert.c: release index lock when cherry-pickin... Chris Johnsen Sat, 7 Mar 2009 09:30:51 +0000 (03:30 -0600)

builtin-revert.c: release index lock when cherry-picking an empty commit

When a cherry-pick of an empty commit is done, release the lock
held on the index.

The fix is the same as was applied to similar code in 4271666046.

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

document config --bool-or-intJeff King Sat, 7 Mar 2009 17:14:06 +0000 (12:14 -0500)

document config --bool-or-int

The documentation is just a pointer to the --bool and --int
options, but it makes sense to at least mention that it
exists.

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

t1300: use test_must_fail as appropriateJeff King Sat, 7 Mar 2009 17:14:04 +0000 (12:14 -0500)

t1300: use test_must_fail as appropriate

Some of the tests checked the exit code manually, even going
so far as to run git outside of the test_expect harness.

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

cleanup: add isascii()René Scharfe Sat, 7 Mar 2009 13:06:49 +0000 (14:06 +0100)

cleanup: add isascii()

Add a standard definition of isascii() and use it to replace an open
coded high-bit test in pretty.c. While we're there, write the ESC
char as the more commonly used '\033' instead of as 0x1b to enhance
its grepability.

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

Documentation: fix badly indented paragraphs in "-... Christian Couder Sat, 7 Mar 2009 12:37:24 +0000 (13:37 +0100)

Documentation: fix badly indented paragraphs in "--bisect-all" description

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

Make the 'lock file' exists error more informativeJohn Tapsell Wed, 4 Mar 2009 15:00:44 +0000 (15:00 +0000)

Make the 'lock file' exists error more informative

It looks like someone did 90% of the work, then forgot to actually use
the function in one place.

Also the helper function did not use the correct variable.

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

Beginning of 1.6.2 maintenance trackJunio C Hamano Wed, 4 Mar 2009 08:37:50 +0000 (00:37 -0800)

Beginning of 1.6.2 maintenance track

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

GIT 1.6.2 v1.6.2Junio C Hamano Wed, 4 Mar 2009 07:02:16 +0000 (23:02 -0800)

GIT 1.6.2

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

git submodule: Fix adding of submodules at paths with... Michael J Gruber Tue, 3 Mar 2009 15:08:21 +0000 (16:08 +0100)

git submodule: Fix adding of submodules at paths with ./, .. and //

Make 'git submodule add' normalize the submodule path in the
same way as 'git ls-files' does, so that 'git submodule init' looks up
the information in .gitmodules with the same key under which 'git
submodule add' stores it.

This fixes 4 known breakages.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git submodule: Add test cases for git submodule addMichael J Gruber Tue, 3 Mar 2009 15:08:20 +0000 (16:08 +0100)

git submodule: Add test cases for git submodule add

Add simple test cases for adding and initialising submodules. The
init step is necessary in order to verify the added information.

The second test exposes a known breakage due to './' in the path: git
ls-files simplifies the path but git add does not, which leads to git
init looking for different lines in .gitmodules than git add adds.

The other tests add test cases for '//' and '..' in the path which
currently fail for the same reason.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Typo / spelling / formatting fixesMike Ralphson Tue, 3 Mar 2009 19:29:22 +0000 (19:29 +0000)

Documentation: Typo / spelling / formatting fixes

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: Expand a couple of abbreviationsMike Ralphson Tue, 3 Mar 2009 19:29:21 +0000 (19:29 +0000)

Documentation: Expand a couple of abbreviations

These may not be obvious to non-native English speakers

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>