gitweb.git
builtin-merge: avoid run_command_v_opt() for recursive... Miklos Vajna Thu, 28 Aug 2008 13:43:00 +0000 (15:43 +0200)

builtin-merge: avoid run_command_v_opt() for recursive and subtree

The try_merge_strategy() function always ran the strategy in a separate
process, though this is not always necessary. The recursive and subtree
strategy can be called without a fork(). This patch adds a check, and
calls recursive in the same process without wasting resources.

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

merge-recursive: introduce merge_optionsMiklos Vajna Mon, 25 Aug 2008 14:25:57 +0000 (16:25 +0200)

merge-recursive: introduce merge_options

This makes it possible to avoid passing the labels of branches as
arguments to merge_recursive(), merge_trees() and
merge_recursive_generic().

It also takes care of subtree merge, output buffering, verbosity, and
rename limits - these were global variables till now in
merge-recursive.c.

A new function, named init_merge_options(), is introduced as well, it
clears the struct merge_info, then initializes with default values,
finally updates the default values based on the config and environment
variables.

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

merge-recursive.c: Add more generic merge_recursive_gen... Stephan Beyer Tue, 12 Aug 2008 20:13:59 +0000 (22:13 +0200)

merge-recursive.c: Add more generic merge_recursive_generic()

merge_recursive_generic() takes, in comparison to to merge_recursive(),
no commit ("struct commit *") arguments but SHA ids ("unsigned char *"),
and no commit list of bases but an array of refs ("const char **").

This makes it more generic in the case that it can also take the SHA
of a tree to merge trees without commits, for the bases, the head
and the remote.

merge_recursive_generic() also handles locking and updating of the
index, which is a common use case of merge_recursive().

This patch also rewrites builtin-merge-recursive.c to make use of
merge_recursive_generic(). By doing this, I stumbled over the
limitation of 20 bases and I've added a warning if this limitation
is exceeded.

This patch qualifies make_virtual_commit() as static again because
this function is not needed anymore outside merge-recursive.c.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Split out merge_recursive() to merge-recursive.cMiklos Vajna Tue, 12 Aug 2008 16:45:14 +0000 (18:45 +0200)

Split out merge_recursive() to merge-recursive.c

Move most of the of code from builtin-merge-recursive.c to a new file
merge-recursive.c and introduce merge_recursive_setup() in there so that
builtin-merge-recursive and other builtins call it.

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

diff: Help "less" hide ^M from the outputJunio C Hamano Thu, 28 Aug 2008 02:48:01 +0000 (19:48 -0700)

diff: Help "less" hide ^M from the output

When the tracked contents have CRLF line endings, colored diff output
shows "^M" at the end of output lines, which is distracting, even though
the pager we use by default ("less") knows to hide them.

The problem is that "less" hides a carriage-return only at the end of the
line, immediately before a line feed. The colored diff output does not
take this into account, and emits four element sequence for each line:

- force this color;
- the line up to but not including the terminating line feed;
- reset color
- line feed.

By including the carriage return at the end of the line in the second
item, we are breaking the smart our pager has in order not to show "^M".
This can be fixed by changing the sequence to:

- force this color;
- the line up to but not including the terminating end-of-line;
- reset color
- end-of-line.

where end-of-line is either a single linefeed or a CRLF pair. When the
output is not colored, "force this color" and "reset color" sequences are
both empty, so we won't have this problem with or without this patch.

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

Merge branch 'maint'Junio C Hamano Sun, 31 Aug 2008 03:31:39 +0000 (20:31 -0700)

Merge branch 'maint'

* maint:
gitattributes: -crlf is not binary
git-apply: Loosen "match_beginning" logic
Fix example in git-name-rev documentation
shell: do not play duplicated definition games to shrink the executable
Fix use of hardlinks in "make install"
pack-objects: Allow missing base objects when creating thin packs

gitattributes: -crlf is not binaryJunio C Hamano Sat, 30 Aug 2008 21:35:15 +0000 (14:35 -0700)

gitattributes: -crlf is not binary

The description of crlf attribute incorrectly said that "-crlf" means
binary. It is true that for binary files you would want "-crlf", but
that is not the same thing.

We also have supported attribute macros and via that mechanism a handy
"binary" to specify "-crlf -diff" at the same time. It was not documented
anywhere as far as I can tell, even though the support was there from
the very beginning.

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

checkout -m: recreate merge when checking out of unmerg... Junio C Hamano Sat, 30 Aug 2008 14:52:24 +0000 (07:52 -0700)

checkout -m: recreate merge when checking out of unmerged index

This teaches git-checkout to recreate a merge out of unmerged
index entries while resolving conflicts.

With this patch, checking out an unmerged path from the index
now have the following possibilities:

* Without any option, an attempt to checkout an unmerged path
will atomically fail (i.e. no other cleanly-merged paths are
checked out either);

* With "-f", other cleanly-merged paths are checked out, and
unmerged paths are ignored;

* With "--ours" or "--theirs, the contents from the specified
stage is checked out;

* With "-m" (we should add "--merge" as synonym), the 3-way merge
is recreated from the staged object names and checked out.

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

Merge branch 'jc/maint-checkout-fix' into 'jc/better... Junio C Hamano Sun, 31 Aug 2008 02:44:17 +0000 (19:44 -0700)

Merge branch 'jc/maint-checkout-fix' into 'jc/better-conflict-resolution'

* jc/maint-checkout-fix:
checkout --ours/--theirs: allow checking out one side of a conflicting merge
checkout -f: allow ignoring unmerged paths when checking out of the index
checkout: do not check out unmerged higher stages randomly

git-merge-recursive: learn to honor merge.conflictstyleJunio C Hamano Fri, 29 Aug 2008 17:59:16 +0000 (10:59 -0700)

git-merge-recursive: learn to honor merge.conflictstyle

This teaches the low-level ll_xdl_merge() routine to honor
merge.conflictstyle configuration variable, so that merge-recursive
strategy can show the conflicts in the style of user's choice.

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

merge.conflictstyle: choose between "merge" and "diff3... Junio C Hamano Fri, 29 Aug 2008 17:49:56 +0000 (10:49 -0700)

merge.conflictstyle: choose between "merge" and "diff3 -m" styles

This teaches "git merge-file" to honor merge.conflictstyle configuration
variable, whose value can be "merge" (default) or "diff3".

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

rerere: understand "diff3 -m" style conflicts with... Junio C Hamano Fri, 29 Aug 2008 17:24:45 +0000 (10:24 -0700)

rerere: understand "diff3 -m" style conflicts with the original

This teaches rerere to grok conflicts expressed in "diff3 -m" style
output, where the version from the common ancestor is output after the
first side, preceded by a "|||||||" line.

The rerere database needs to keep only the versions from two sides, so the
code parses the original copy and discards it.

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

rerere.c: use symbolic constants to keep track of parsi... Junio C Hamano Fri, 29 Aug 2008 17:12:23 +0000 (10:12 -0700)

rerere.c: use symbolic constants to keep track of parsing states

These hardcoded integers make the code harder to follow than necessary;
replace them with enums to make it easier to read, before adding support
for optionally parsing "diff3 -m" style conflict markers.

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

xmerge.c: "diff3 -m" style clips merge reduction level... Junio C Hamano Fri, 29 Aug 2008 15:22:55 +0000 (08:22 -0700)

xmerge.c: "diff3 -m" style clips merge reduction level to EAGER or less

When showing a conflicting merge result, and "--diff3 -m" style is asked
for, this patch makes sure that the merge reduction level does not exceed
XDL_MERGE_EAGER. This is because "diff3 -m" style output would not make
sense for anything more aggressive than XDL_MERGE_EAGER, because of the
way how the merge reduction works.

"git merge-file" no longer has to force MERGE_EAGER when "--diff3" is
asked for because of this change.

Suppose a common ancestor (shared preimage) is modified to postimage #1
and #2 (each letter represents one line):

#####
postimage#1: 1234ABCDE789
| /
| /
preimage: 123456789
| \
postimage#2: 1234AXYE789
####

XDL_MERGE_MINIMAL and XDL_MERGE_EAGER would:

(1) find the s/56/ABCDE/ done on one side and s/56/AXYE/ done on the
other side,

(2) notice that they touch an overlapping area, and

(3) mark it as a conflict, "ABCDE vs AXYE".

The difference between the two algorithms is that EAGER drops the hunk
altogether if the postimages match (i.e. both sides modified the same
way), while MINIMAL keeps it. There is no other operation performed to
the hunk. As the result, lines marked with "#" in the above picure will
be in the RCS merge style output like this (letters <, = and > represent
conflict marker lines):

output: 1234<ABCDE=AXYE>789 ; with MINIMAL/EAGER

The part from the preimage that corresponds to these conflicting changes
is "56", which is what "diff3 -m" style output adds to it:

output: 1234<ABCDE|56=AXYE>789 ; in "diff3 -m" style

Now, XDL_MERGE_ZEALOUS looks at the differences between the changes two
postimages made in order to reduce the number of lines in the conflicting
regions. It notices that both sides start their new contents with "A",
and excludes it from the output (it also excludes "E" for the same
reason). The conflict that used to be "ABCDE vs AXYE" is now "BCD vs XY":

output: 1234A<BCD=XY>E789 ; with ZEALOUS

There could even be matching parts between two postimages in the middle.
Instead of one side rewriting the shared "56" to "ABCDE" and the other
side to "AXYE", imagine the case where the postimages are "ABCDE" and
"AXCYE", in which case instead of having one conflicted hunk "BCD vs XY",
you would have two conflicting hunks "B vs X" and "D vs Y".

In either case, once you reduce "ABCDE vs AXYE" to "BCD vs XY" (or "ABCDE
vs AXCYE" to "B vs X" and "D vs Y"), there is no part from the preimage
that corresponds to the conflicting change made in both postimages
anymore. In other words, conflict reduced by ZEALOUS algorithm cannot be
expressed in "diff3 -m" style. Representing the last illustration like
this is misleading to say the least:

output: 1234A<BCD|56=XY>E789 ; broken "diff3 -m" style

because the preimage was not ...4A56E... to begin with. "A" and "E" are
common only between the postimages.

Even worse, once a single conflicting hunk is split into multiple ones
(recall the example of breaking "ABCDE vs AXCYE" to "B vs X" and "D vs
Y"), there is no sane way to distribute the preimage text across split
conflicting hunks.

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

xmerge.c: minimum readability fixupsJunio C Hamano Fri, 29 Aug 2008 15:16:30 +0000 (08:16 -0700)

xmerge.c: minimum readability fixups

This replaces hardcoded magic constants with symbolic ones for
readability, and swaps one if/else blocks to better match the
order in which 0/1/2 variables are handled to nearby codepath.

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

xdiff-merge: optionally show conflicts in "diff3 -m... Junio C Hamano Thu, 28 Aug 2008 08:10:04 +0000 (01:10 -0700)

xdiff-merge: optionally show conflicts in "diff3 -m" style

When showing conflicting merges, we traditionally followed RCS's merge
output format. The output shows:

<<<<<<<
postimage from one side;
=======
postimage of the other side; and
>>>>>>>

Some poeple find it easier to be able to understand what is going on when
they can view the common ancestor's version, which is used by "diff3 -m",
which shows:

<<<<<<<
postimage from one side;
|||||||
shared preimage;
=======
postimage of the other side; and
>>>>>>>

This is an initial step to bring that as an optional feature to git.
Only "git merge-file" has been converted, with "--diff3" option.

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

xdl_fill_merge_buffer(): separate out a too deeply... Junio C Hamano Thu, 28 Aug 2008 08:04:00 +0000 (01:04 -0700)

xdl_fill_merge_buffer(): separate out a too deeply nested function

This simply moves code around to make a separate function that prepares
a single conflicted hunk with markers into the buffer.

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

checkout --ours/--theirs: allow checking out one side... Junio C Hamano Sat, 30 Aug 2008 14:48:18 +0000 (07:48 -0700)

checkout --ours/--theirs: allow checking out one side of a conflicting merge

This lets you to check out 'our' (or 'their') version of an
unmerged path out of the index while resolving conflicts.

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

checkout -f: allow ignoring unmerged paths when checkin... Junio C Hamano Sat, 30 Aug 2008 14:46:55 +0000 (07:46 -0700)

checkout -f: allow ignoring unmerged paths when checking out of the index

Earlier we made "git checkout $pathspec" to atomically refuse
the operation of $pathspec matched any path with unmerged
stages. This patch allows:

$ git checkout -f a b c

to ignore, instead of error out on, such unmerged paths. The
fix to prevent checkout of an unmerged path from random stages
is still there.

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

checkout: do not check out unmerged higher stages randomlyJunio C Hamano Fri, 29 Aug 2008 20:40:36 +0000 (13:40 -0700)

checkout: do not check out unmerged higher stages randomly

During a conflicted merge when you have unmerged stages for a
path F in the index, if you said:

$ git checkout F

we rewrote F as many times as we have stages for it, and the
last one (typically "theirs") was left in the work tree, without
resolving the conflict.

This fixes it by noticing that a specified pathspec pattern
matches an unmerged path, and by erroring out.

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

Merge branch 'jc/post-simplify' (early part) into tr... Junio C Hamano Sat, 30 Aug 2008 23:03:40 +0000 (16:03 -0700)

Merge branch 'jc/post-simplify' (early part) into tr/filter-branch

* 'jc/post-simplify' (early part):
revision --simplify-merges: make it a no-op without pathspec
revision --simplify-merges: do not leave commits unprocessed
revision --simplify-merges: use decoration instead of commit->util field

Start conforming code to "git subcmd" styleHeikki Orsila Sat, 30 Aug 2008 11:12:53 +0000 (14:12 +0300)

Start conforming code to "git subcmd" style

User notifications are presented as 'git cmd', and code comments
are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.

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

git-apply: Loosen "match_beginning" logicJunio C Hamano Sat, 30 Aug 2008 20:20:31 +0000 (13:20 -0700)

git-apply: Loosen "match_beginning" logic

Even after a handfle attempts, match_beginning logic still has corner
cases:

1bf1a85 (apply: treat EOF as proper context., 2006-05-23)
65aadb9 (apply: force matching at the beginning., 2006-05-24)
4be6096 (apply --unidiff-zero: loosen sanity checks ..., 2006-09-17)
ee5a317 (Fix "git apply" to correctly enforce "match ..., 2008-04-06)

This is a tricky piece of code.

We still incorrectly enforce "match_beginning" for -U0 matches.
I noticed this while trying out an example sequence from Clemens Buchacher:

$ echo a >victim
$ git add victim
$ echo b >>victim
$ git diff -U0 >patch
$ cat patch
diff --git i/victim w/victim
index 7898192..422c2b7 100644
--- i/victim
+++ w/victim
@@ -1,0 +2 @@ a
+b
$ git apply --cached --unidiff-zero <patch
$ git show :victim
b
a

The change inserts a new line before the second line, but we insist it to
be applied at the beginning. As the result, the code refuses to apply it
at the original offset, and we end up adding the line at the beginning.

Updates to the test script are by Clemens Buchacher.

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

Fix example in git-name-rev documentationJunio C Hamano Sat, 30 Aug 2008 20:08:50 +0000 (13:08 -0700)

Fix example in git-name-rev documentation

Since 59d3f54 (name-rev: avoid "^0" when unneeded, 2007-02-20), name-rev
stopped showing an unnecessary "^0" to dereference a tag down to a commit.
The patch should have made a matching update to the documentation, but we
forgot.

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

Merge branch 'sp/missing-thin-base' into maintJunio C Hamano Sat, 30 Aug 2008 15:38:19 +0000 (08:38 -0700)

Merge branch 'sp/missing-thin-base' into maint

* sp/missing-thin-base:
pack-objects: Allow missing base objects when creating thin packs

Merge branch 'sb/daemon'Junio C Hamano Sat, 30 Aug 2008 15:17:15 +0000 (08:17 -0700)

Merge branch 'sb/daemon'

* sb/daemon:
daemon.c: minor style fixup
git-daemon: rewrite kindergarden, new option --max-connections
git-daemon: Simplify dead-children reaping logic
git-daemon: use LOG_PID, simplify logging code
git-daemon: call logerror() instead of error()

Merge branch 'af/maint-install-no-handlink' into maintJunio C Hamano Sat, 30 Aug 2008 05:39:25 +0000 (22:39 -0700)

Merge branch 'af/maint-install-no-handlink' into maint

* af/maint-install-no-handlink:
Fix use of hardlinks in "make install"
Makefile: always provide a fallback when hardlinks fail

shell: do not play duplicated definition games to shrin... Junio C Hamano Wed, 20 Aug 2008 01:05:39 +0000 (18:05 -0700)

shell: do not play duplicated definition games to shrink the executable

Playing with linker games to shrink git-shell did not go well with various
other platforms and compilers.

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

Fix use of hardlinks in "make install"Alex Riesen Thu, 28 Aug 2008 13:57:32 +0000 (15:57 +0200)

Fix use of hardlinks in "make install"

The code failed to filter-out git-add properly on platforms were $X is
not empty (ATM there is only one such a platform).

Than it tried to create a hardlink to the file ($execdir/git-add) it just
removed (because git-add is first in the BUILT_INS), so ln failed (but
because stderr was redirected into /dev/null the error was never seen), and
the whole install ended up using "ln -s" instead.

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

rev-list: fix --reverse interaction with --parentsThomas Rast Fri, 29 Aug 2008 19:18:38 +0000 (21:18 +0200)

rev-list: fix --reverse interaction with --parents

--reverse did not interact well with --parents, as the included test
case shows: in a history like

A--B.
\ \
`C--M--D

the command

git rev-list --reverse --parents --full-history HEAD

erroneously lists D as having no parents at all. (Without --reverse,
it correctly lists M.)

This is caused by the machinery driving --reverse: it first grabs all
commits through the normal routines, then runs them through the same
routines again, effectively simplifying them twice.

Fix this by moving the --reverse one level up, into get_revision().
This way we can cleanly grab all commits via the normal calls, then
just pop them off the list one by one without interfering with
get_revision_internal().

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

fixup_pack_header_footer(): use nicely aligned buffer... Nicolas Pitre Fri, 29 Aug 2008 20:08:02 +0000 (16:08 -0400)

fixup_pack_header_footer(): use nicely aligned buffer sizes

It should be more efficient to use nicely aligned buffer sizes, either
for filesystem operations or SHA1 checksums. Also, using a relatively
small nominal size might allow for the data to remain in L1 cache
between both SHA1_Update() calls.

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

index-pack: use fixup_pack_header_footer()'s validation... Nicolas Pitre Fri, 29 Aug 2008 20:08:01 +0000 (16:08 -0400)

index-pack: use fixup_pack_header_footer()'s validation mode

When completing a thin pack, a new header has to be written to
the pack and a new SHA1 computed. Make sure that the SHA1 of what
is being read back matches the SHA1 of what was written for both:
the original pack and the appended objects.

To do so, a couple write_or_die() calls were converted to sha1write()
which has the advantage of doing some buffering as well as handling
SHA1 and CRC32 checksum already.

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

pack-objects: use fixup_pack_header_footer()'s validati... Nicolas Pitre Fri, 29 Aug 2008 20:08:00 +0000 (16:08 -0400)

pack-objects: use fixup_pack_header_footer()'s validation mode

When limiting the pack size, a new header has to be written to the
pack and a new SHA1 computed. Make sure that the SHA1 of what is being
read back matches the SHA1 of what was written.

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

improve reliability of fixup_pack_header_footer()Nicolas Pitre Fri, 29 Aug 2008 20:07:59 +0000 (16:07 -0400)

improve reliability of fixup_pack_header_footer()

Currently, this function has the potential to read corrupted pack data
from disk and give it a valid SHA1 checksum. Let's add the ability to
validate SHA1 checksum of existing data along the way, including before
and after any arbitrary point in the pack.

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

pack-objects: improve returned information from write_one()Nicolas Pitre Fri, 29 Aug 2008 20:07:58 +0000 (16:07 -0400)

pack-objects: improve returned information from write_one()

This function returns 0 when the current object couldn't be written
due to the pack size limit, otherwise the current offset in the pack.
There is a problem with this approach however, since current object
could be a delta and its delta base might just have been written in
the same write_one() call, but those successfully written objects are
not accounted in the offset variable tracked by the caller. Currently
this is not an issue but a subsequent patch will need this.

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

Merge branch 'np/verify-pack' into maintJunio C Hamano Sat, 30 Aug 2008 04:48:02 +0000 (21:48 -0700)

Merge branch 'np/verify-pack' into maint

* np/verify-pack:
discard revindex data when pack list changes

builtin-help: fallback to GIT_MAN_VIEWER before manRomain Francoise Fri, 29 Aug 2008 15:00:43 +0000 (17:00 +0200)

builtin-help: fallback to GIT_MAN_VIEWER before man

In some situations it is useful to be able to switch viewers via the
environment, e.g. in Emacs shell buffers. So check the GIT_MAN_VIEWER
environment variable and try it before falling back to "man".

Signed-off-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 29 Aug 2008 07:16:39 +0000 (00:16 -0700)

Merge branch 'maint'

* maint:
tutorial: gentler illustration of Alice/Bob workflow using gitk
pretty=format: respect date format options
make git-shell paranoid about closed stdin/stdout/stderr
Document gitk --argscmd flag.
Fix '--dirstat' with cross-directory renaming
for-each-ref: Allow a trailing slash in the patterns

git-p4: Fix checkout bug when using --import-local.Tor Arvid Lund Wed, 27 Aug 2008 22:36:12 +0000 (00:36 +0200)

git-p4: Fix checkout bug when using --import-local.

When this option is passed to git p4 clone, the checkout at the end would
previously fail. This patch fixes it by optionally creating the master branch
from refs/heads/p4/master, which is the correct one for this option.

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Acked-By: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tutorial: gentler illustration of Alice/Bob workflow... Paolo Ciarrocchi Thu, 28 Aug 2008 12:23:52 +0000 (14:23 +0200)

tutorial: gentler illustration of Alice/Bob workflow using gitk

Update to gitutorial as discussedin the git mailing list:

http://marc.info/?t=121969390900002&r=1&w=2

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pretty=format: respect date format optionsJeff King Fri, 29 Aug 2008 00:54:59 +0000 (20:54 -0400)

pretty=format: respect date format options

When running a command like:

git log --pretty=format:%ad --date=short

the date option was ignored. This patch causes it to use whatever
format was specified by --date (or by --relative-date, etc), just
as the non-user formats would do.

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

make git-shell paranoid about closed stdin/stdout/stderrPaolo Bonzini Wed, 27 Aug 2008 15:20:35 +0000 (17:20 +0200)

make git-shell paranoid about closed stdin/stdout/stderr

It is in general unsafe to start a program with one or more of file
descriptors 0/1/2 closed. Karl Chen for example noticed that stat_command
does this in order to rename a pipe file descriptor to 0:

dup2(from, 0);
close(from);

... but if stdin was closed (for example) from == 0, so that

dup2(0, 0);
close(0);

just ends up closing the pipe. Another extremely rare but nasty problem
would occur if an "important" file ends up in file descriptor 2, and is
corrupted by a call to die().

Fixing this in git was considered to be overkill, so this patch works
around it only for git-shell. The fix is simply to open all the "low"
descriptors to /dev/null in main.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Acked-by: Stephen R. van den Berg <srb@cuci.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document gitk --argscmd flag.Yann Dirson Thu, 28 Aug 2008 22:00:28 +0000 (00:00 +0200)

Document gitk --argscmd flag.

This was part of my original patch, but appears to have been lost.

Signed-off-by: Yann Dirson <ydirson@altern.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix '--dirstat' with cross-directory renamingLinus Torvalds Thu, 28 Aug 2008 23:19:08 +0000 (16:19 -0700)

Fix '--dirstat' with cross-directory renaming

The dirstat code depends on the fact that we always generate diffs with
the names sorted, since it then just does a single-pass walk-over of the
sorted list of names and how many changes there were. The sorting means
that all files are nicely grouped by directory.

That all works fine.

Except when we have rename detection, and suddenly the nicely sorted list
of pathnames isn't all that sorted at all. And now the single-pass dirstat
walk gets all confused, and you can get results like this:

[torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5
3.0% arch/powerpc/configs/
6.8% arch/arm/configs/
2.7% arch/powerpc/configs/
4.2% arch/arm/configs/
5.6% arch/powerpc/configs/
8.4% arch/arm/configs/
5.5% arch/powerpc/configs/
23.3% arch/arm/configs/
8.6% arch/powerpc/configs/
4.0% arch/
4.4% drivers/usb/musb/
4.0% drivers/watchdog/
7.6% drivers/
3.5% fs/

The trivial fix is to add a sorting pass, fixing it to:

[torvalds@nehalem linux]$ git diff --dirstat=2 -M v2.6.27-rc4..v2.6.27-rc5
43.0% arch/arm/configs/
25.5% arch/powerpc/configs/
5.3% arch/
4.4% drivers/usb/musb/
4.0% drivers/watchdog/
7.6% drivers/
3.5% fs/

Spot the difference. In case anybody wonders: it's because of a ton of
renames from {include/asm-blackfin => arch/blackfin/include/asm} that just
totally messed up the file ordering in between arch/arm and arch/powerpc.

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

for-each-ref: Allow a trailing slash in the patternsBjörn Steinbrink Thu, 28 Aug 2008 02:14:02 +0000 (04:14 +0200)

for-each-ref: Allow a trailing slash in the patterns

More often than not, I end up using something like refs/remotes/ as the
pattern for for-each-ref, but that doesn't work, because it expects to see
the slash in the ref name right after the matched pattern. So teach it to
accept the slash as the final character in the pattern as well.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

read-tree: setup worktree if merge is requiredNguyễn Thái Ngọc Duy Thu, 28 Aug 2008 13:03:22 +0000 (20:03 +0700)

read-tree: setup worktree if merge is required

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

grep: fix worktree setupNguyễn Thái Ngọc Duy Thu, 28 Aug 2008 13:04:30 +0000 (20:04 +0700)

grep: fix worktree setup

Unless used with --cached or grepping on a tree, "git grep" will
search on working directory, so set up worktree properly

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

list_commands: only call git_exec_path if it is neededAlex Riesen Thu, 28 Aug 2008 17:19:42 +0000 (19:19 +0200)

list_commands: only call git_exec_path if it is needed

Even if it always needed

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

Allow git help work without PATH setAlex Riesen Thu, 28 Aug 2008 17:19:07 +0000 (19:19 +0200)

Allow git help work without PATH set

Just because we can

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

Make main_cmds and other_cmds local to builtin-help.cAlex Riesen Thu, 28 Aug 2008 17:17:46 +0000 (19:17 +0200)

Make main_cmds and other_cmds local to builtin-help.c

These are not used anywhere else.

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

Remove useless memset of static command name lists... Alex Riesen Thu, 28 Aug 2008 17:17:13 +0000 (19:17 +0200)

Remove useless memset of static command name lists in builtin-merge.c

The statics are always initialized with 0

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

Remove calculation of the longest command name from... Alex Riesen Thu, 28 Aug 2008 17:15:33 +0000 (19:15 +0200)

Remove calculation of the longest command name from where it is not used

Just calculate it where it is needed - it is cheap and trivial,
as all the lengths are already there (stored when creating the
command lists).

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

dir.c: Avoid c99 array initializationBrandon Casey Thu, 28 Aug 2008 22:47:22 +0000 (17:47 -0500)

dir.c: Avoid c99 array initialization

The following syntax:

char foo[] = {
[0] = 1,
[7] = 2,
[15] = 3
};

is a c99 construct which some compilers do not support even though they
support other c99 constructs. This construct can be avoided by folding
these 'special' test cases into the sane_ctype array and making use of
the related infrastructure.

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

diff*: fix worktree setupNguyễn Thái Ngọc Duy Thu, 28 Aug 2008 13:02:12 +0000 (20:02 +0700)

diff*: fix worktree setup

This fixes "git diff", "git diff-files" and "git diff-index" to work
correctly under worktree setup. Because diff* family works in many modes
and not all of them require worktree, Junio made a nice summary
(with a little modification from me):

* diff-files is about comparing with work tree, so it obviously needs a
work tree;

* diff-index also does, except "diff-index --cached" or "diff --cached TREE"

* no-index is about random files outside git context, so it obviously
doesn't need any work tree;

* comparing two (or more) trees doesn't;

* comparing two blobs doesn't;

* comparing a blob with a random file doesn't;

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

bash-completion: Add all submodule subcommands to the... Matthias Kestenholz Thu, 28 Aug 2008 08:57:55 +0000 (10:57 +0200)

bash-completion: Add all submodule subcommands to the completion list

Signed-off-by: Matthias Kestenholz <mk@spinlock.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: only check merge bases when neededChristian Couder Fri, 22 Aug 2008 03:52:29 +0000 (05:52 +0200)

bisect: only check merge bases when needed

When one good revision is not an ancestor of the bad revision, the
merge bases between the good and the bad revision should be checked
to make sure that they are also good revisions.

A previous patch takes care of that, but it may check the merge bases
more often than really needed. In fact the previous patch did not try
to optimize this as much as possible because it is not so simple. So
this is the purpose of this patch.

One may think that when all the merge bases have been checked then
we can save a flag, so that we don't need to check the merge bases
again during the bisect process.

The problem is that the user may choose to checkout and test
something completely different from what the bisect process
suggested. In this case we have to check the merge bases again,
because there may be new merge bases relevant to the bisect
process.

That's why, in this patch, when we detect that the user tested
something else than what the bisect process suggested, we remove
the flag that says that we don't need to check the merge bases
again.

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

bisect: test merge base if good rev is not an ancestor... Christian Couder Fri, 22 Aug 2008 03:52:22 +0000 (05:52 +0200)

bisect: test merge base if good rev is not an ancestor of bad rev

Before this patch, "git bisect", when it was given some good revs that
are not ancestor of the bad rev, didn't check if the merge bases were
good. "git bisect" just supposed that the user knew what he was doing,
and that, when he said the revs were good, he knew that it meant that
all the revs in the history leading to the good revs were also
considered good.

But in pratice, the user may not know that a good rev is not an
ancestor of the bad rev, or he may not know/remember that all revs
leading to the good rev will be considered good. So he may give a good
rev that is a sibling, instead of an ancestor, of the bad rev, when in
fact there can be one rev becoming good in the branch of the good rev
(because the bug was already fixed there, for example) instead of one
rev becoming bad in the branch of the bad rev.

For example, if there is the following history:

A--B--C--D
\
E--F

and we launch "git bisect start D F" then only C and D would have been
considered as possible first bad commit before this patch. This could
invite user errors; F could be the commit that fixes the bug that exists
everywhere else.

The purpose of this patch is to detect when "git bisect" is passed
some good revs that are not ancestors of the bad rev, and then to first
ask the user to test the merge bases between the good and bad revs.

If the merge bases are good then all is fine, we can continue
bisecting. Otherwise, if one merge base is bad, it means that the
assumption that all revs leading to the good one are good too is
wrong and we error out. In the case where one merge base is skipped we
issue a warning and then continue bisecting anyway.

These checks will also catch the case where good and bad have been
mistaken. This means that we can remove the check that was done latter
on the output of "git rev-list --bisect-vars".

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

Merge branch 'mv/merge-custom'Junio C Hamano Thu, 28 Aug 2008 00:28:31 +0000 (17:28 -0700)

Merge branch 'mv/merge-custom'

* mv/merge-custom:
t7606: fix custom merge test
Fix "git-merge -s bogo" help text
Update .gitignore to ignore git-help
Builtin git-help.
builtin-help: always load_command_list() in cmd_help()
Add a second testcase for handling invalid strategies in git-merge
Add a new test for using a custom merge strategy
builtin-merge: allow using a custom strategy
builtin-help: make some internal functions available to other builtins

Conflicts:
help.c

Merge branch 'ml/submodule'Junio C Hamano Thu, 28 Aug 2008 00:16:30 +0000 (17:16 -0700)

Merge branch 'ml/submodule'

* ml/submodule:
git-submodule.sh - Remove trailing / from URL if found
git-submodule.sh - Remove trailing / from URL if found

Merge branch 'am/cherry-pick-rerere'Junio C Hamano Wed, 27 Aug 2008 23:40:09 +0000 (16:40 -0700)

Merge branch 'am/cherry-pick-rerere'

* am/cherry-pick-rerere:
Make cherry-pick use rerere for conflict resolution.

Merge branch 'jc/add-addremove'Junio C Hamano Wed, 27 Aug 2008 23:39:57 +0000 (16:39 -0700)

Merge branch 'jc/add-addremove'

* jc/add-addremove:
builtin-add.c: optimize -A option and "git add ."
builtin-add.c: restructure the code for maintainability

Merge branch 'np/verify-pack'Junio C Hamano Wed, 27 Aug 2008 23:39:46 +0000 (16:39 -0700)

Merge branch 'np/verify-pack'

* np/verify-pack:
discard revindex data when pack list changes

Merge branch 'da/submodule-sync'Junio C Hamano Wed, 27 Aug 2008 23:39:19 +0000 (16:39 -0700)

Merge branch 'da/submodule-sync'

* da/submodule-sync:
git-submodule: add "sync" command

Merge branch 'maint'Junio C Hamano Wed, 27 Aug 2008 23:23:54 +0000 (16:23 -0700)

Merge branch 'maint'

* maint:
ctype.c: protect tiny C preprocessor constants
index-pack: be careful after fixing up the header/footer

ctype.c: protect tiny C preprocessor constantsJunio C Hamano Wed, 27 Aug 2008 23:14:22 +0000 (16:14 -0700)

ctype.c: protect tiny C preprocessor constants

Some platforms contaminate the preprocessor token namespace with their own
definition of SS without being asked. Avoid getting hit by redefinition
warning messages by explicitly undef SS, AA and DD shorthand we use in this
table definition.

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

index-pack: be careful after fixing up the header/footerLinus Torvalds Wed, 27 Aug 2008 19:48:00 +0000 (12:48 -0700)

index-pack: be careful after fixing up the header/footer

The index-pack command, when processing a thin pack, fixed up the pack
after-the-fact. It forgets to fsync the result, because it only did that
in one path rather in all cases of fixup.

This moves the fsync_or_die() to the fix-up routine itself, rather than
doing it in one of the callers, so that all cases are covered.

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

Make it possible to abort the submission of a change... Simon Hausmann Wed, 27 Aug 2008 07:30:29 +0000 (09:30 +0200)

Make it possible to abort the submission of a change to Perforce

Currently it is not possible to skip the submission of a change to Perforce
when running git-p4 submit. This patch compares the modification time before
and after the submit editor invokation and offers a prompt for skipping if
the submit template file was not saved.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'af/maint-install-no-handlink'Junio C Hamano Wed, 27 Aug 2008 00:08:25 +0000 (17:08 -0700)

Merge branch 'af/maint-install-no-handlink'

* af/maint-install-no-handlink:
Makefile: always provide a fallback when hardlinks fail

Merge branch 'jc/no-slim-shell'Junio C Hamano Wed, 27 Aug 2008 00:08:22 +0000 (17:08 -0700)

Merge branch 'jc/no-slim-shell'

* jc/no-slim-shell:
Revert "Build-in "git-shell""

Merge branch 'maint'Junio C Hamano Wed, 27 Aug 2008 00:08:19 +0000 (17:08 -0700)

Merge branch 'maint'

* maint:
index-pack: setup git repository
Suppress some bash redirection error messages
Fix a warning (on cygwin) to allow -Werror
Fix "git log -i --grep"

format-patch: use default diff format even with patch... Jeff King Mon, 25 Aug 2008 02:10:29 +0000 (22:10 -0400)

format-patch: use default diff format even with patch options

Previously, running "git format-patch -U5" would cause the
low-level diff machinery to change the diff output format
from "not specified" to "patch". This meant that
format-patch thought we explicitly specified a diff output
format, and would not use the default format. The resulting
message lacked both the diffstat and the summary, as well as
the separating "---".

Now format-patch explicitly checks for this condition and
uses the default. That means that "git format-patch -p" will
now have the "-p" ignored.

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

index-pack: setup git repositoryNguyễn Thái Ngọc Duy Tue, 26 Aug 2008 14:32:42 +0000 (21:32 +0700)

index-pack: setup git repository

"git index-pack" is an independent command and does not setup git
repository while still need pack.indexversion. It may miss the
info if it is in a subdirectory of the repository.

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

Suppress some bash redirection error messagesRamsay Jones Tue, 26 Aug 2008 17:52:57 +0000 (18:52 +0100)

Suppress some bash redirection error messages

In particular, when testing if the filesystem allows tabs in
filenames, bash issues an error something like:

./t4016-diff-quote.sh: pathname with HT: No such file or directory

which is caused by the failure of the (stdout) redirection,
since the file cannot be created. In order to suppress the
error message, you must redirect stderr to /dev/null, *before*
the stdout redirection on the command-line.

Also, remove a redundant filesystem check from the begining of
the t3902-quoted.sh test and standardise the "test skipped"
message to 'say' on exit.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix a warning (on cygwin) to allow -WerrorRamsay Jones Tue, 26 Aug 2008 17:50:37 +0000 (18:50 +0100)

Fix a warning (on cygwin) to allow -Werror

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Add menu item for calling git gui blameAlexander Gavrilov Sat, 23 Aug 2008 08:29:08 +0000 (12:29 +0400)

gitk: Add menu item for calling git gui blame

This adds a new item to the file list popup menu, that calls git gui
blame for the selected file, starting with the first parent of the
current commit.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add option to specify the default commit on comma... Alexander Gavrilov Sat, 23 Aug 2008 08:27:44 +0000 (12:27 +0400)

gitk: Add option to specify the default commit on command line

Other GUI tools may need to start gitk and make it automatically
select a certain commit. This adds a new command-line option
--select-commit=id to make that possible.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Makefile: always provide a fallback when hardlinks... Andreas Färber Mon, 25 Aug 2008 15:33:03 +0000 (17:33 +0200)

Makefile: always provide a fallback when hardlinks fail

We make hardlinks from "git" to "git-<cmd>" built-ins and have been
careful to avoid cross-device links when linking "git-<cmd>" to
gitexecdir.

However, we were not prepared to deal with a build directory that is
incapable of making hard links within itself. This patch corrects it.

Instead of temporarily linking "git" to gitexecdir, directly link "git-
add", falling back to "cp". Try hardlinking that as "git-<cmd>", falling
back to symlinks or "cp" on error.

While at it, avoid 100+ error messages from hardlink failures when we are
going to fall back to symlinks or "cp" by redirecting the standard error
to /dev/null.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon.c: minor style fixupJunio C Hamano Sun, 24 Aug 2008 20:27:10 +0000 (13:27 -0700)

daemon.c: minor style fixup

* "else" on the same line as "}" that closes corresponding "if (...) {";

* multi-line comments begin with "/*\n";

* sizeof, even it is not a function, is written as "sizeof(...)";

* no need to check x?alloc() return value -- it would have died;

* "if (...) { ... }" that covers the whole function body can be dedented
by returning from the function early with "if (!...) return;";

* SP on each side of an operator, i.e. "a > 0", not "a>0";

Also removes stale comment describing how remove_child() used to do its
thing.

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

git-submodule: add "sync" commandDavid Aguilar Sun, 24 Aug 2008 19:43:37 +0000 (12:43 -0700)

git-submodule: add "sync" command

When a submodule's URL changes upstream, existing submodules
will be out of sync since their remote."$origin".url will still
be set to the old value.

This adds a "git submodule sync" command that reads submodules'
URLs from .gitmodules and updates them accordingly.

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

Revert "Build-in "git-shell""Junio C Hamano Tue, 26 Aug 2008 05:39:17 +0000 (22:39 -0700)

Revert "Build-in "git-shell""

This reverts commit daa0cc9a92c9c2c714aa5f7da6d0ff65b93e0698.
It was a stupid idea to do this; when run as a log-in shell,
it is spawned with argv[0] set to "-git-shell", so the usual
name-based dispatch would not work to begin with.

Fix "git log -i --grep"Jeff King Mon, 25 Aug 2008 06:15:05 +0000 (02:15 -0400)

Fix "git log -i --grep"

This has been broken in v1.6.0 due to the reorganization of
the revision option parsing code. The "-i" is completely
ignored, but works fine in "git log --grep -i".

What happens is that the code for "-i" looks for
revs->grep_filter; if it is NULL, we do nothing, since there
are no grep filters. But that is obviously not correct,
since we want it to influence the later --grep option. Doing
it the other way around works, since "-i" just impacts the
existing grep_filter option.

Instead, we now always initialize the grep_filter member and
just fill in options and patterns as we get them. This means
that we can no longer check grep_filter for NULL, but
instead must check the pattern list to see if we have any
actual patterns.

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

git-gui: Allow specifying an initial line for git gui... Alexander Gavrilov Sat, 23 Aug 2008 08:32:20 +0000 (12:32 +0400)

git-gui: Allow specifying an initial line for git gui blame.

Add a command-line option to make git gui blame automatically
scroll to a specific line in the file. Useful for integration
with other tools.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Better positioning in Blame Parent CommitAlexander Gavrilov Sat, 23 Aug 2008 08:31:35 +0000 (12:31 +0400)

git-gui: Better positioning in Blame Parent Commit

Invoke diff-tree between the commit and its parent,
and use the hunks to fix the target line number,
accounting for addition and removal of lines.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Support passing blame to a parent commit.Alexander Gavrilov Sat, 23 Aug 2008 08:30:51 +0000 (12:30 +0400)

git-gui: Support passing blame to a parent commit.

Add a context menu item that switches the view to the
parent of the commit under cursor. It is useful to see
how the file looked before the change, and find older
changes in the same lines.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Support starting gitk from Gui BlameAlexander Gavrilov Sat, 23 Aug 2008 08:30:00 +0000 (12:30 +0400)

git-gui: Support starting gitk from Gui Blame

Add a context menu command to load commits
that are within a certain time range from the
selected commit into gitk.

It can be useful for understanding of the code,
especially if the repository is imported from
a VCS that does not support atomic commits.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: Teach git gui about file type changesGustaf Hendeby Fri, 22 Aug 2008 20:10:27 +0000 (22:10 +0200)

git-gui: Teach git gui about file type changes

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Install git-shell in bindir, tooTommi Virtanen Sun, 24 Aug 2008 20:23:25 +0000 (23:23 +0300)

Install git-shell in bindir, too

/etc/passwd shell field must be something execable, you can't enter
"/usr/bin/git shell" there. git-shell must be present as a separate
executable, or it is useless.

Signed-off-by: Tommi Virtanen <tv@eagain.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jc/no-slim-shell'Junio C Hamano Sun, 24 Aug 2008 23:14:22 +0000 (16:14 -0700)

Merge branch 'jc/no-slim-shell'

* jc/no-slim-shell:
Build-in "git-shell"
shell: do not play duplicated definition games to shrink the executable

Merge branch 'maint' to sync with 1.6.0.1Junio C Hamano Sun, 24 Aug 2008 21:48:36 +0000 (14:48 -0700)

Merge branch 'maint' to sync with 1.6.0.1

GIT 1.6.0.1 v1.6.0.1Junio C Hamano Sun, 24 Aug 2008 21:47:24 +0000 (14:47 -0700)

GIT 1.6.0.1

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

Merge branch 'ag/maint-combine-diff-fix' into maintJunio C Hamano Sun, 24 Aug 2008 21:32:18 +0000 (14:32 -0700)

Merge branch 'ag/maint-combine-diff-fix' into maint

* ag/maint-combine-diff-fix:
Respect core.autocrlf in combined diff

Merge branch 'mv/maint-merge-fix' into maintJunio C Hamano Sun, 24 Aug 2008 21:29:37 +0000 (14:29 -0700)

Merge branch 'mv/maint-merge-fix' into maint

* mv/maint-merge-fix:
merge: fix numerus bugs around "trivial merge" area

git-submodule - Use "get_default_remote" from git-parse... Mark Levedahl Sun, 24 Aug 2008 18:46:10 +0000 (14:46 -0400)

git-submodule - Use "get_default_remote" from git-parse-remote

Resolve_relative_url was using its own code for this function, but
this is duplication with the best result that this continues to work.
Replace with the common function provided by git-parse-remote.

Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: clarify pager configurationJonathan Nieder Sun, 24 Aug 2008 05:28:32 +0000 (00:28 -0500)

Documentation: clarify pager configuration

The unwary user may not know how to disable the -FRSX options.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: clarify pager.<cmd> configurationJonathan Nieder Sun, 24 Aug 2008 05:38:06 +0000 (00:38 -0500)

Documentation: clarify pager.<cmd> configuration

It was not obvious from the text that pager.<cmd> is a boolean
setting.

While we're changing the description, make some other
improvements: lest we forget and fret, clarify that -p and
pager.<cmd> do not kick in when stdout is not a tty; point to
related core.pager and GIT_PAGER settings; use renamed --paginate
option.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Clean up the git-p4 documentationSimon Hausmann Sun, 24 Aug 2008 14:12:23 +0000 (16:12 +0200)

Clean up the git-p4 documentation

This patch massages the documentation a bit for improved readability and cleans
it up from outdated options/commands.

Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Respect core.autocrlf in combined diffAlexander Gavrilov Sat, 23 Aug 2008 19:21:21 +0000 (23:21 +0400)

Respect core.autocrlf in combined diff

Fix git-diff to make it produce useful 3-way diffs for merge conflicts in
repositories with autocrlf enabled. Otherwise it always reports that the
whole file was changed, because it uses the contents from the working tree
without necessary conversion.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: enable SNPRINTF_RETURNS_BOGUS for HP-UXMiklos Vajna Sat, 23 Aug 2008 22:07:55 +0000 (00:07 +0200)

Makefile: enable SNPRINTF_RETURNS_BOGUS for HP-UX

In 81cc66a, customization has been added to Makefile for supporting
HP-UX, but git commit is still problematic. This should fix the issue.

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

t7606: fix custom merge testJunio C Hamano Sun, 24 Aug 2008 02:23:22 +0000 (19:23 -0700)

t7606: fix custom merge test

Custom merge strategy does not even kick in when the merge is truly
trivial. The test depended on the behaviour in the git-merge rewritten in
C that broke the trivial merge completely.

Make the test to work on a non-trivial merge to make sure the strategy
kicks in.

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

Merge branch 'maint'Junio C Hamano Sun, 24 Aug 2008 01:28:37 +0000 (18:28 -0700)

Merge branch 'maint'

* maint:
unpack_trees(): protect the handcrafted in-core index from read_cache()
git-p4: Fix one-liner in p4_write_pipe function.
Completion: add missing '=' for 'diff --diff-filter'
Fix 'git help help'