gitweb.git
git-mergetool documentaiton: show toolnames in typewrit... Charles Bailey Sat, 8 Mar 2008 20:46:34 +0000 (20:46 +0000)

git-mergetool documentaiton: show toolnames in typewriter font

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Really make the LF after reset in fast-import optionalAdeodato Simó Fri, 7 Mar 2008 20:22:17 +0000 (21:22 +0100)

Really make the LF after reset in fast-import optional

cmd_from() ends with a call to read_next_command(), which is needed
when using cmd_from() from commands where from is not the last element.

With reset, however, "from" is the last command, after which the flow
returns to the main loop, which calls read_next_command() again.

Because of this, always set unread_command_buf in cmd_reset_branch(),
even if cmd_from() was successful.

Add a test case for this in t9300-fast-import.sh.

Signed-off-by: Adeodato Simó <dato@net.com.org.es>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'aw/maint-shortlog-blank-lines'Junio C Hamano Sat, 8 Mar 2008 10:23:42 +0000 (02:23 -0800)

Merge branch 'aw/maint-shortlog-blank-lines'

* aw/maint-shortlog-blank-lines:
shortlog: take the first populated line of the description

Merge branch 'mh/maint-http-proxy-fix' into maintJunio C Hamano Sat, 8 Mar 2008 10:20:37 +0000 (02:20 -0800)

Merge branch 'mh/maint-http-proxy-fix' into maint

* mh/maint-http-proxy-fix:
Set proxy override with http_init()

Merge branch 'js/maint-daemon' into maintJunio C Hamano Sat, 8 Mar 2008 10:20:30 +0000 (02:20 -0800)

Merge branch 'js/maint-daemon' into maint

* js/maint-daemon:
daemon: ensure that base-path is an existing directory
daemon: send more error messages to the syslog

Merge branch 'js/maint-cvsexport' into maintJunio C Hamano Sat, 8 Mar 2008 10:13:52 +0000 (02:13 -0800)

Merge branch 'js/maint-cvsexport' into maint

* js/maint-cvsexport:
cvsexportcommit: be graceful when "cvs status" reorders the arguments

Conflicts:

t/t9200-git-cvsexportcommit.sh

Merge branch 'jc/maint-log-merge-left-right' into maintJunio C Hamano Sat, 8 Mar 2008 10:11:37 +0000 (02:11 -0800)

Merge branch 'jc/maint-log-merge-left-right' into maint

* jc/maint-log-merge-left-right:
Fix "git log --merge --left-right"

Merge branch 'ew/maint-svn-cert-fileprovider' into... Junio C Hamano Sat, 8 Mar 2008 10:11:32 +0000 (02:11 -0800)

Merge branch 'ew/maint-svn-cert-fileprovider' into maint

* ew/maint-svn-cert-fileprovider:
git-svn: Don't prompt for client cert password everytime.

Merge branch 'maint'Junio C Hamano Sat, 8 Mar 2008 06:43:46 +0000 (22:43 -0800)

Merge branch 'maint'

* maint:
unquote_c_style: fix off-by-one.
test-lib: fix TERM to dumb for test repeatability
config.txt: refer to --upload-pack and --receive-pack instead of --exec
git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

send-email: --no-signed-off-cc should suppress 'sob' ccJunio C Hamano Sat, 8 Mar 2008 06:12:13 +0000 (22:12 -0800)

send-email: --no-signed-off-cc should suppress 'sob' cc

The logic to countermand suppression of Cc to the signers with a more
explicit --signed-off-by option done in 6564828 (git-send-email:
Generalize auto-cc recipient mechanism) suffers from a double-negation
error.

A --signed-off-cc option, when false, should actively suppress CC: to be
generated out of S-o-b lines, and it should refrain from suppressing when
it is true.

It also fixes "(sob) Adding cc:" status output; earlier it included the
line terminator LF inside '%s', which was totally bogus.

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

Merge branch 'js/reflog-delete'Junio C Hamano Sat, 8 Mar 2008 06:34:26 +0000 (22:34 -0800)

Merge branch 'js/reflog-delete'

* js/reflog-delete:
t3903-stash.sh: Add tests for new stash commands drop and pop
git-reflog.txt: Document new commands --updateref and --rewrite
t3903-stash.sh: Add missing '&&' to body of testcase
git-stash: add new 'pop' subcommand
git-stash: add new 'drop' subcommand
git-reflog: add option --updateref to write the last reflog sha1 into the ref
refs.c: make close_ref() and commit_ref() non-static
git-reflog: add option --rewrite to update reflog entries while expiring
reflog-delete: parse standard reflog options
builtin-reflog.c: fix typo that accesses an unset variable
Teach "git reflog" a subcommand to delete single entries

Merge branch 'dc/format-pretty'Junio C Hamano Sat, 8 Mar 2008 06:33:26 +0000 (22:33 -0800)

Merge branch 'dc/format-pretty'

* dc/format-pretty:
log/show/whatchanged: introduce format.pretty configuration
specify explicit "--pretty=medium" with `git log/show/whatchanged`
whatchanged documentation: share description of --pretty with others

Merge branch 'cb/mergetool'Junio C Hamano Sat, 8 Mar 2008 06:30:07 +0000 (22:30 -0800)

Merge branch 'cb/mergetool'

* cb/mergetool:
Add a very basic test script for git mergetool
Teach git mergetool to use custom commands defined at config time
Changed an internal variable of mergetool to support custom commands
Tidy up git mergetool's backup file behaviour

git-clean: add tests for relative pathJunio C Hamano Sat, 8 Mar 2008 05:56:56 +0000 (21:56 -0800)

git-clean: add tests for relative path

This adds tests for recent change by Dmitry to fix the report "git
clean" gives on removed paths, and also makes sure the command detects
paths that is outside working tree.

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

git-clean: correct printing relative pathDmitry Potapov Fri, 7 Mar 2008 01:13:17 +0000 (04:13 +0300)

git-clean: correct printing relative path

When the given path contains '..' then git-clean incorrectly printed names
of files. This patch changes cmd_clean to use quote_path_relative().
Also, "failed to remove ..." message used absolutely path, but not it is
corrected to use relative path.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make private quote_path() in wt-status.c available... Dmitry Potapov Fri, 7 Mar 2008 02:30:58 +0000 (05:30 +0300)

Make private quote_path() in wt-status.c available as quote_path_relative()

Move quote_path() from wt-status.c to quote.c and rename it as
quote_path_relative(), because it is a better name for a public function.

Also, instead of handcrafted quoting, quote_c_style_counted() is now used,
to make its quoting more consistent with the rest of the system, also
honoring core.quotepath specified in configuration.

Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Add option for changing the width of the commi... Adam Piątyszek Thu, 6 Mar 2008 19:38:40 +0000 (20:38 +0100)

git-gui: Add option for changing the width of the commit message text box

The width of the commit message text area is currently hard-coded
to 75 characters. This value might be not optimal for some projects.
For instance users who would like to generate GNU-style ChangeLog
file from git commit message might prefer commit messages of width
no longer than 70 characters.

This patch adds a global and per repository option "Commit Message
Text Width", which could be used to change the width of the commit
message text area.

Signed-off-by: Adam Piątyszek <ediap@users.sourceforge.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

unquote_c_style: fix off-by-one.Pierre Habouzit Thu, 6 Mar 2008 21:28:19 +0000 (22:28 +0100)

unquote_c_style: fix off-by-one.

The optional endp parameter to unquote_c_style() was supposed to point at
a location past the closing double quote, but it was going one beyond it.

git-fast-import used this function heavily and the bug caused it to
misparse the input stream, especially when parsing a rename command:

R "filename that needs quoting" rename-target-name

Because the function erroneously ate the whitespace after the closing dq,
this triggered "Missing space after source" error when it shouldn't.

Thanks to Adeodato Simò for having caught this.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: fix TERM to dumb for test repeatabilityJunio C Hamano Fri, 7 Mar 2008 03:04:26 +0000 (19:04 -0800)

test-lib: fix TERM to dumb for test repeatability

Dscho noticed that Term::ReadLine (used by send-email) colorized its
output for his TERM settings, inside t9001 tests.

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

config.txt: refer to --upload-pack and --receive-pack... Uwe Kleine-König Thu, 6 Mar 2008 20:28:07 +0000 (21:28 +0100)

config.txt: refer to --upload-pack and --receive-pack instead of --exec

The options --upload-pack (of git-fetch-pack) and --receive-pack (of
git-push) do the same as --exec (for both commands). But the former options
have the more descriptive name.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ar/sgid-bsd'Junio C Hamano Fri, 7 Mar 2008 18:53:14 +0000 (10:53 -0800)

Merge branch 'ar/sgid-bsd'

* ar/sgid-bsd:
Do not use GUID on dir in git init --shared=all on FreeBSD

Merge branch 'cc/run-command'Junio C Hamano Fri, 7 Mar 2008 18:53:10 +0000 (10:53 -0800)

Merge branch 'cc/run-command'

* cc/run-command:
run-command: Redirect stderr to a pipe before redirecting stdout to stderr

Revert part of d089eba (setup: sanitize absolute and... Junio C Hamano Fri, 7 Mar 2008 07:50:51 +0000 (23:50 -0800)

Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec())

When get_pathspec() was originally made absolute-path capable,
we botched the interface to it, without dying inside the function
when given a path that is outside the work tree, and made it the
responsibility of callers to check the condition in a roundabout
way. This is made unnecessary with the previous patch.

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

Revert part of 1abf095 (git-add: adjust to the get_path... Junio C Hamano Fri, 7 Mar 2008 07:31:29 +0000 (23:31 -0800)

Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)

When get_pathspec() was originally made absolute-path capable,
we botched the interface to it, without dying inside the function
when given a path that is outside the work tree, and made it the
responsibility of callers to check the condition in a roundabout
way. This is made unnecessary with the previous patch.

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

Revert part of 744dacd (builtin-mv: minimum fix to... Junio C Hamano Fri, 7 Mar 2008 07:29:40 +0000 (23:29 -0800)

Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files)

When get_pathspec() was originally made absolute-path capable,
we botched the interface to it, without dying inside the function
when given a path that is outside the work tree, and made it the
responsibility of callers to check the condition in a roundabout
way. This is made unnecessary with the previous patch.

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

get_pathspec(): die when an out-of-tree path is givenJunio C Hamano Fri, 7 Mar 2008 07:18:08 +0000 (23:18 -0800)

get_pathspec(): die when an out-of-tree path is given

An earlier commit d089ebaa (setup: sanitize absolute and funny paths) made
get_pathspec() aware of absolute paths, but with a botched interface that
forced the callers to count the resulting pathspecs in order to detect
an error of giving a path that is outside the work tree.

This fixes it, by dying inside the function.

We had ls-tree test that relied on a misfeature in the original
implementation of its pathspec handling. Leading slashes were silently
removed from them. However we allow giving absolute pathnames (people
want to cut and paste from elsewhere) that are inside work tree these
days, so a pathspec that begin with slash _should_ be treated as a full
path. The test is adjusted to match the updated rule for get_pathspec().

Earlier I mistook three tests given by Robin that they should succeed, but
these are attempts to add path outside work tree, which should fail
loudly. These tests also have been fixed.

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

Merge branch 'maint' of git://repo.or.cz/git-gui into... Junio C Hamano Thu, 6 Mar 2008 08:18:23 +0000 (00:18 -0800)

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

* 'maint' of git://repo.or.cz/git-gui:
git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

git-gui: if a background colour is set, set foreground... Philipp A. Hartmann Wed, 5 Mar 2008 16:54:22 +0000 (17:54 +0100)

git-gui: if a background colour is set, set foreground colour as well

In several places, only the background colour is set to an explicit
value, sometimes even "white". This does not work well with dark
colour themes.

This patch tries to set the foreground colour to "black" in those
situations, where an explicit background colour is set without defining
any foreground colour.

Signed-off-by: Philipp A. Hartmann <ph@sorgh.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

git-gui: translate the remaining messages in zh_cn... eric miao Sun, 6 Jan 2008 09:47:05 +0000 (17:47 +0800)

git-gui: translate the remaining messages in zh_cn.po to chinese

'make' shows:
MSGFMT po/zh_cn.msg 368 translated, 2 fuzzy, 1 untranslated message.

1. update the zh_cn.po and translate the remaining messages in chinese

2. correct some of the previously mis-translated messages

3. add a list of word interpretation in the head as a guideline for
subsequent updatings and translations

Signed-off-by: eric miao <eric.miao@marvell.com>
Acked-by: Xudong Guan <xudong.guan@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

gitweb: Fix and simplify pickaxe searchJakub Narebski Wed, 5 Mar 2008 08:31:55 +0000 (09:31 +0100)

gitweb: Fix and simplify pickaxe search

Instead of using "git-rev-list | git-diff-tree" pipeline for pickaxe
search, use git-log with appropriate options. Besides reducing number
of forks by one, this allows to use list form of open, which in turn
allow to not worry about quoting arguments and to avoid forking shell.

The options to git-log were chosen to reduce required changes in
pickaxe git command output parsing; gitweb still parses returned
commits one by one.

Parsing "pickaxe" output is simplified: git_search now reuses
parse_difftree_raw_line and writes affected files as they arrive using
the fact that commit name goes always before [raw] diff.

While at it long bug of pickaxe search was fixed, namely that the last
commit found by pickaxe search was never shown.

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

git-submodule - Allow adding a submodule in-placeMark Levedahl Wed, 5 Mar 2008 01:15:02 +0000 (20:15 -0500)

git-submodule - Allow adding a submodule in-place

When working in the top-level project, it is useful to create a new
submodule as a git repo in a subdirectory, then add that submodule to
the top-level in place.

This patch allows "git submodule add <intended url> subdir" to add the
existing subdir to the current project. The presumption is the user will
later push / clone the subdir to the <intended url> so that future
submodule init / updates will work.

Absent this patch, "git submodule add" insists upon cloning the subdir
from a repository at the given url, which is fine for adding an existing
project in, but less useful when adding a new submodule from scratch to an
existing project. The former functionality remains, and the clone is
attempted if the subdir does not already exist as a valid git repo.

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

shortlog: take the first populated line of the descriptionAndy Whitcroft Wed, 5 Mar 2008 14:24:10 +0000 (14:24 +0000)

shortlog: take the first populated line of the description

Way back the perl version of shortlog would take the first populated line
of the commit body. The builtin version mearly takes the first line.
This leads to empty shortlog entries when there is some viable text in
the commit.

Reinstate this behaviour igoring all lines with nothing but whitespace.
This is often useful when dealing with commits imported from foreign SCMs
that do not tidy up the log message of useless blank lines at the beginning.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add compat/snprintf.c for systems that return bogusMichal Rokos Wed, 5 Mar 2008 15:46:13 +0000 (16:46 +0100)

Add compat/snprintf.c for systems that return bogus

Some systems (namely HPUX and Windows) return -1 when maxsize in snprintf()
and in vsnprintf() is reached. So replace snprintf() and vsnprintf()
functions with our own ones that return correct value upon overflow.

[jc: verified that review comments by J6t have been incorporated, and
tightened the check to verify the resulting buffer contents, suggested
by Wayne Davison]

Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Do not use GUID on dir in git init --shared=all on... Alex Riesen Tue, 4 Mar 2008 23:15:39 +0000 (00:15 +0100)

Do not use GUID on dir in git init --shared=all on FreeBSD

It does not allow changing the bit to a non-root user.
This fixes t1301-shared-repo.sh on the platform.

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

run-command: Redirect stderr to a pipe before redirecti... Christian Couder Wed, 5 Mar 2008 07:35:16 +0000 (08:35 +0100)

run-command: Redirect stderr to a pipe before redirecting stdout to stderr

With this patch, in the 'start_command' function after forking
we now take care of stderr in the child process before stdout.

This way if 'start_command' is called with a 'child_process'
argument like this:

.err = -1;
.stdout_to_stderr = 1;

then stderr will be redirected to a pipe before stdout is
redirected to stderr. So we can now get the process' stdout
from the pipe (as well as its stderr).

Earlier such a call would have redirected stdout to stderr
before stderr was itself redirected, and therefore stdout
would not have followed stderr, which would not have been
very useful anyway.

Update documentation in 'api-run-command.txt' accordingly.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Acked-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote: fix "update [group...]"Johannes Schindelin Tue, 4 Mar 2008 11:23:53 +0000 (11:23 +0000)

remote: fix "update [group...]"

The rewrite in C inadvertently broke updating with remote groups: when you
pass parameters to "git remote update", it used to look up "remotes.<group>"
for every parameter, and interpret the value as a list of remotes to update.

Also, no parameter, or a single parameter "default" should update all
remotes that have not been marked with "skipDefaultUpdate".

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

Make builtin-reset.c use parse_options.Carlos Rica Tue, 4 Mar 2008 22:11:34 +0000 (23:11 +0100)

Make builtin-reset.c use parse_options.

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

bash: git-branch -d and -m lists only local branchesSZEDER Gábor Tue, 4 Mar 2008 18:00:59 +0000 (19:00 +0100)

bash: git-branch -d and -m lists only local branches

But still all branches are listed, if -r is present

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bash: add git-branch optionsSZEDER Gábor Tue, 4 Mar 2008 18:00:58 +0000 (19:00 +0100)

bash: add git-branch options

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a very basic test script for git mergetoolCharles Bailey Thu, 21 Feb 2008 23:31:56 +0000 (23:31 +0000)

Add a very basic test script for git mergetool

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach git mergetool to use custom commands defined... Charles Bailey Thu, 21 Feb 2008 23:31:12 +0000 (23:31 +0000)

Teach git mergetool to use custom commands defined at config time

Currently git mergetool is restricted to a set of commands defined
in the script. You can subvert the mergetool.<tool>.path to force
git mergetool to use a different command, but if you have a command
whose invocation syntax does not match one of the current tools then
you would have to write a wrapper script for it.

This patch adds two git config variable patterns which allow a more
flexible choice of merge tool.

If you run git mergetool with -t/--tool or the merge.tool config
variable set to an unrecognized tool then git mergetool will query the
mergetool.<tool>.cmd config variable. If this variable exists, then git
mergetool will treat the specified tool as a custom command and will use
a shell eval to run the command with the documented shell variables set.

mergetool.<tool>.trustExitCode can be used to indicate that the exit
code of the custom command can be used to determine the success of the
merge.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Changed an internal variable of mergetool to support... Charles Bailey Thu, 21 Feb 2008 23:30:34 +0000 (23:30 +0000)

Changed an internal variable of mergetool to support custom commands

The variable $path changes to $MERGED so that it is more consistent
with $BASE, $LOCAL and $REMOTE for future custom command lines.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Tidy up git mergetool's backup file behaviourCharles Bailey Thu, 21 Feb 2008 23:30:02 +0000 (23:30 +0000)

Tidy up git mergetool's backup file behaviour

Currently a backup pre-merge file with conflict markers is sometimes
kept with a .orig extenstion and sometimes removed depending on the
particular merge tool used.

This patch makes the handling consistent across all merge tools and
configurable via a new mergetool.keepBackup config variable

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

log/show/whatchanged: introduce format.pretty configurationDenis Cheng Sun, 2 Mar 2008 09:05:53 +0000 (17:05 +0800)

log/show/whatchanged: introduce format.pretty configuration

When running log/show/whatchanged from the command line, the user may
want to use a preferred format without having to pass --pretty=<fmt>
option every time from the command line. This teaches these three
commands to honor a new configuration variable, format.pretty.

The --pretty option given from the command line will override the
configured format.

The earlier patch fixed the in-tree callers that run these commands
for purposes other than showing the output directly to the end user
(the only other in-tree caller is "git bisect visualize", whose output
directly goes to the end user and should be affected by this patch).

Similar fixes will be needed for end-user scripts that parse the
output from these commands and expect them to be in the default pretty
format.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

specify explicit "--pretty=medium" with `git log/show... Denis Cheng Sun, 2 Mar 2008 09:05:52 +0000 (17:05 +0800)

specify explicit "--pretty=medium" with `git log/show/whatchanged`

The following patch will introduce a new configuration variable,
"format.pretty", from then on the pretty format without specifying
"--pretty" might not be the default "--pretty=medium", it depends on
the user's config. So all kinds of Shell/Perl/Emacs scripts that needs
the default medium pretty format must specify it explicitly.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

whatchanged documentation: share description of --prett... Denis Cheng Sun, 2 Mar 2008 09:05:51 +0000 (17:05 +0800)

whatchanged documentation: share description of --pretty with others

The documentation had its own description for --pretty and did not
include pretty-options/formats as documentation for other commands in
the "log" family did.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: --rebasingJunio C Hamano Tue, 4 Mar 2008 08:25:06 +0000 (00:25 -0800)

am: --rebasing

The new option --rebasing is used internally for rebase to tell am that
it is being used for its purpose. This would leave .dotest/rebasing to
help "completion" scripts tell if the ongoing operation is am or rebase.

Also the option at the same time stands for --binary, -3 and -k which
are always given when rebase drives am as its backend.

Using the information "am" leaves, git-completion.bash tells ongoing
rebase and am apart.

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

am: remove support for -d .dotestJunio C Hamano Tue, 4 Mar 2008 08:25:05 +0000 (00:25 -0800)

am: remove support for -d .dotest

It has been supported for a long time, but I do not think this feature has
been in use in the real world at all. We would eventually move this out
of the toplevel of the work tree and to somewhere under $GIT_DIR, so let's
remove the command line option to specify the location now.

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

am: read from the right mailbox when started from a... Junio C Hamano Tue, 4 Mar 2008 08:25:04 +0000 (00:25 -0800)

am: read from the right mailbox when started from a subdirectory

An earlier commit c149184 (allow git-am to run in a subdirectory) taught
git-am to start from a subdirectory by going up to the root of the work
tree byitself, but it did not adjust the path to read the mbox from when
it did so.

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

fsck.c: fix bogus "empty tree" checkJunio C Hamano Tue, 4 Mar 2008 10:02:35 +0000 (02:02 -0800)

fsck.c: fix bogus "empty tree" check

ba002f3 (builtin-fsck: move common object checking code to fsck.c) did
more than what it claimed to. Most notably, it wrongly made an empty tree
object an error by pretending to only move code from fsck_tree() in
builtin-fsck.c to fsck_tree() in fsck.c, but in fact adding a bogus check
to barf on an empty tree.

An empty tree object is _unusual_. Recent porcelains try reasonably hard
not to let the user create a commit that contains such a tree. Perhaps
warning about them in git-fsck may have some merit.

HOWEVER.

Being unusual and being errorneous are two quite different things. This
is especially true now we seem to use the same fsck_$object() code in
places other than git-fsck itself. For example, receive-pack should not
reject unusual objects, even if it would be a good idea to tighten it to
reject incorrect ones.

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

Teach git-fetch to exploit server side automatic tag... Shawn O. Pearce Tue, 4 Mar 2008 03:27:40 +0000 (22:27 -0500)

Teach git-fetch to exploit server side automatic tag following

If the remote peer upload-pack process supports the include-tag
protocol extension then we can avoid running a second fetch cycle
on the client side by letting the server send us the annotated tags
along with the objects it is packing for us. In the following graph
we can now fetch both "tag1" and "tag2" on the same connection that
we fetched "master" from the remote when we only have L available
on the local side:

T - tag1 S - tag2
/ /
L - o ------ o ------ B
\ \
\ \
origin/master master

The objects for "tag1" are implicitly downloaded without our direct
knowledge. The existing "quickfetch" optimization within git-fetch
discovers that tag1 is complete after the first connection and does
not open a second connection.

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

Teach fetch-pack/upload-pack about --include-tagShawn O. Pearce Tue, 4 Mar 2008 03:27:33 +0000 (22:27 -0500)

Teach fetch-pack/upload-pack about --include-tag

The new protocol extension "include-tag" allows the client side
of the connection (fetch-pack) to request that the server side of the
native git protocol (upload-pack / pack-objects) use --include-tag
as it prepares the packfile, thus ensuring that an annotated tag object
will be included in the resulting packfile if the object it refers to
was also included into the packfile.

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

git-pack-objects: Automatically pack annotated tags... Shawn O. Pearce Tue, 4 Mar 2008 03:27:20 +0000 (22:27 -0500)

git-pack-objects: Automatically pack annotated tags if object was packed

The new option "--include-tag" allows the caller to request that
any annotated tag be included into the packfile if the object the tag
references was also included as part of the packfile.

This option can be useful on the server side of a native git transport,
where the server knows what commits it is including into a packfile to
update the client. If new annotated tags have been introduced then we
can also include them in the packfile, saving the client from needing
to request them through a second connection.

This change only introduces the backend option and provides a test.
Protocol extensions to make this useful in fetch-pack/upload-pack
are still necessary to activate the logic during transport.

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

Merge branch 'maint'Shawn O. Pearce Wed, 5 Mar 2008 07:13:37 +0000 (02:13 -0500)

Merge branch 'maint'

* maint:
git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

git-gui: Gracefully fall back to po2msg.sh if msgfmt... Shawn O. Pearce Thu, 28 Feb 2008 00:29:34 +0000 (19:29 -0500)

git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails

Mac OS X Tiger may have a msgfmt available but it doesn't understand
how to implement --tcl. Falling back to po2msg.sh on such systems
is a reasonable behavior.

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

Revert "unpack-objects: prevent writing of inconsistent... Junio C Hamano Tue, 4 Mar 2008 11:11:30 +0000 (03:11 -0800)

Revert "unpack-objects: prevent writing of inconsistent objects"

This reverts commit d5ef408b9afb5b4417f4e7e1593a96302d666650.

Revert "receive-pack: use strict mode for unpacking... Junio C Hamano Tue, 4 Mar 2008 11:11:06 +0000 (03:11 -0800)

Revert "receive-pack: use strict mode for unpacking objects"

This reverts commit 28f72a0f232dfc71b3be726e7e71d0a6d5f9ebba.

Merge branch 'maint'Junio C Hamano Tue, 4 Mar 2008 08:34:39 +0000 (00:34 -0800)

Merge branch 'maint'

* maint:
Fix 'git remote show' regression on empty repository in 1.5.4
Fix incorrect wording in git-merge.txt.
git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options
Fix random crashes in http_cleanup()

Fix 'git remote show' regression on empty repository... Shawn O. Pearce Tue, 4 Mar 2008 06:00:36 +0000 (01:00 -0500)

Fix 'git remote show' regression on empty repository in 1.5.4

Back in 18f7c51c we switched git-ls-remote/git-peek-remote to
use the transport backend, rather than do everything itself.

As part of that switch we started to produce a non-zero exit
status if no refs were received from the remote peer, which
happens when the remote peer has no commits pushed to it yet.
(E.g. "git --git-dir=foo.git init; git ls-remote foo.git")

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

t3407-rebase-abort.sh: Enhance existing tests, and... Mike Hommey Sat, 1 Mar 2008 11:12:13 +0000 (12:12 +0100)

t3407-rebase-abort.sh: Enhance existing tests, and add test for rebase --merge

Removing .dotest should actually not be needed, so just test the directory
don't exist after --abort, but exists after starting the rebase.

Also, execute the same tests with rebase --merge, which uses a different code
path.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-p4: Fix import of changesets with file deletionsSimon Hausmann Mon, 3 Mar 2008 10:55:48 +0000 (11:55 +0100)

git-p4: Fix import of changesets with file deletions

Commit 3a70cdfa42199e16d2d047c286431c4274d65b1a made readP4Files abort quickly
when the changeset only contains files that are marked for deletion with an empty return
value, which caused the commit to not do anything.

This commit changes readP4Files to distinguish between files that need to be passed to p4
print and files that have no content ("deleted") and merge them in the returned
list.

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

Fix test for cleanup failure in t7300 on WindowsAlex Riesen Mon, 3 Mar 2008 23:48:56 +0000 (00:48 +0100)

Fix test for cleanup failure in t7300 on Windows

Keep the file open to: the OS does not allow removal of open files.
The saner systems just have a saner permission model and chmod 0
is enough for the test.

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

t6120 (describe): check --long properlyJunio C Hamano Tue, 4 Mar 2008 02:29:51 +0000 (18:29 -0800)

t6120 (describe): check --long properly

Existing test checked --long only for exactly tagged commit. We should
make sure it works sensibly for commits that are not tagged.

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

Add git-describe test for "verify annotated tag names... Shawn O. Pearce Tue, 4 Mar 2008 01:09:38 +0000 (20:09 -0500)

Add git-describe test for "verify annotated tag names on output"

Back in 212945d4 ("Teach git-describe to verify annotated tag names
before output") I taught git-describe to output the name shown in the
"tag" header of an annotated tag, rather than the name it is actually
stored under in this repository's ref namespace.

This test case verifies this is working correctly by renaming the ref
for an annotated tag to a different name that what is recorded in the
tag body, and verifying that tag is returned. We also verify there is
a message shown on stderr to inform the user that the tag is possibly
stored under the wrong name locally.

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

Test for packed tags in git-describe outputShawn O. Pearce Tue, 4 Mar 2008 01:09:35 +0000 (20:09 -0500)

Test for packed tags in git-describe output

In c374b91c ("git-describe: use tags found in packed-refs correctly")
Junio fixed an issue where git-describe did not parse a tag object it
obtained from a packed-refs file, as the peel information was read in
from packed-refs and not the tag object itself.

This new test case verifies the fix listed above is functioning, and
does not have a regression in the future.

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

Don't allow git-describe failures to go unnoticed in... Shawn O. Pearce Tue, 4 Mar 2008 01:09:31 +0000 (20:09 -0500)

Don't allow git-describe failures to go unnoticed in t6120

If git-describe fails we never execute the test_expect_success,
so we never actually test for failure. This is horribly wrong.
We need to always run the test case, but the test case is only
supposed to succeed if the prior git-describe returned 0.

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

describe: re-fix display_name()Junio C Hamano Mon, 3 Mar 2008 23:54:23 +0000 (15:54 -0800)

describe: re-fix display_name()

It is implausible for lookup_tag() to return NULL in this particular
codepath but we should protect ourselves against a broken repository
better.

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

Fix incorrect wording in git-merge.txt.Matthieu Moy Mon, 3 Mar 2008 17:52:49 +0000 (18:52 +0100)

Fix incorrect wording in git-merge.txt.

A merge is not necessarily with a remote branch, it can be with any
commit.

Thanks to Paolo Ciarrocchi for pointing out the problem, and to
Nicolas Pitre for pointing out the fact that a merge is not
necessarily with a branch head.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-merge.sh: better handling of combined --squash... Gerrit Pape Mon, 3 Mar 2008 09:22:03 +0000 (09:22 +0000)

git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options

git-merge used to use either the --squash,--no-squash, --no-ff,--ff,
--no-commit,--commit option, whichever came last in the command line.
This lead to some un-intuitive behavior, having

git merge --no-commit --no-ff <branch>

actually commit the merge. Now git-merge respects --no-commit together
with --no-ff, as well as other combinations of the options. However,
this broke a selftest in t/t7600-merge.sh which expected to have --no-ff
completely override the --squash option, so that

git merge --squash --no-ff <branch>

fast-forwards, and makes a merge commit; combining --squash with --no-ff
doesn't really make sense though, and is now refused by git-merge. The
test is adapted to test --no-ff without the preceding --squash, and
another test is added to make sure the --squash --no-ff combination is
refused.

The unexpected behavior was reported by John Goerzen through
http://bing.sdebian.org/468568

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

Fix random crashes in http_cleanup()Mike Hommey Mon, 3 Mar 2008 19:30:16 +0000 (20:30 +0100)

Fix random crashes in http_cleanup()

For some reason, http_cleanup was running all active slots, which could
lead in situations where a freed slot would be accessed in
fill_active_slots. OTOH, we are cleaning up, which means the caller
doesn't care about pending requests. Just forget about them instead
or running them.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

describe: fix --long outputJunio C Hamano Mon, 3 Mar 2008 21:08:26 +0000 (13:08 -0800)

describe: fix --long output

An error while hand-merging broke the new "--long" option.

This should fix it.

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

git-describe: use tags found in packed-refs correctlyJunio C Hamano Mon, 3 Mar 2008 17:24:17 +0000 (09:24 -0800)

git-describe: use tags found in packed-refs correctly

When your refs are packed, "git-describe" can find the tag that is the
best match without ever parsing the tag itself. But lookup_tag() in
display_name() says "I've never seen it", creates an empty shell, and
returns it. We need to make sure that we actually have parsed the tag
data into it.

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

t3903-stash.sh: Add tests for new stash commands drop... Brandon Casey Sun, 2 Mar 2008 20:58:51 +0000 (14:58 -0600)

t3903-stash.sh: Add tests for new stash commands drop and pop

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

git-reflog.txt: Document new commands --updateref and... Brandon Casey Sun, 2 Mar 2008 20:58:50 +0000 (14:58 -0600)

git-reflog.txt: Document new commands --updateref and --rewrite

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

t3903-stash.sh: Add missing '&&' to body of testcaseBrandon Casey Sun, 2 Mar 2008 20:58:48 +0000 (14:58 -0600)

t3903-stash.sh: Add missing '&&' to body of testcase

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

Merge commit '74359821' into js/reflog-deleteJunio C Hamano Mon, 3 Mar 2008 09:20:19 +0000 (01:20 -0800)

Merge commit '74359821' into js/reflog-delete

* commit '74359821': (128 commits)
tests: introduce test_must_fail
Fix builtin checkout crashing when given an invalid path
templates/Makefile: don't depend on local umask setting
Correct name of diff_flush() in API documentation
Start preparing for 1.5.4.4
format-patch: remove a leftover debugging message
completion: support format-patch's --cover-letter option
Eliminate confusing "won't bisect on seeked tree" failure
builtin-reflog.c: don't install new reflog on write failure
send-email: fix In-Reply-To regression
git-svn: Don't prompt for client cert password everytime.
git.el: Do not display empty directories.
Fix 'git cvsexportcommit -w $cvsdir ...' when used with relative $GIT_DIR
Add testcase for 'git cvsexportcommit -w $cvsdir ...' with relative $GIT_DIR
Prompt to continue when editing during rebase --interactive
Documentation/git svn log: add a note about timezones.
git-p4: Support usage of perforce client spec
git-p4: git-p4 submit cleanups.
git-p4: Removed git-p4 submit --direct.
git-p4: Clean up git-p4 submit's log message handling.
...

fetch-pack: check parse_commit/object resultsMartin Koegler Mon, 3 Mar 2008 06:31:23 +0000 (07:31 +0100)

fetch-pack: check parse_commit/object results

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

describe --always: fall back to showing an abbreviated... Junio C Hamano Sun, 2 Mar 2008 16:51:57 +0000 (08:51 -0800)

describe --always: fall back to showing an abbreviated object name

Some callers may find it useful if "git describe" always gave back a
string that can be used as a shorter name for a commit object, rather than
checking its exit status (while squelching its error message, which could
potentially talk about more grave errors that should not be squelched) and
implementing a fallback themselves.

This teaches describe/name-rev a new option, --always, to use an
abbreviated object name when no tags or refs to use is found.

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

Teach git-fetch to grab a tag at the same time as a... Shawn O. Pearce Mon, 3 Mar 2008 02:35:33 +0000 (21:35 -0500)

Teach git-fetch to grab a tag at the same time as a commit

If the situation is the following on the remote and L is the common
base between both sides:

T - tag1 S - tag2
/ /
L - A - O - O - B
\ \
origin/master master

and we have decided to fetch "master" to acquire the range L..B we
can also nab tag S at the same time during the first connection,
as we can clearly see from the refs advertised by upload-pack that
S^{} = B and master = B.

Unfortunately we still cannot nab T at the same time as we are not
able to see that T^{} will also be in the range implied by L..B.
Such computations must be performed on the remote side (not yet
supported) or on the client side as post-processing (the current
behavior).

This optimization is an extension of the previous one in that it
helps on projects which tend to publish both a new commit and a
new tag, then lay idle for a while before publishing anything else.
Most followers are able to download both the new commit and the new
tag in one connection, rather than two. git.git tends to follow
such patterns with its roughly once-daily updates from Junio.

A protocol extension and additional server side logic would be
necessary to also ensure T is grabbed on the first connection.

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

Make git-fetch follow tags we already have objects... Shawn O. Pearce Mon, 3 Mar 2008 02:35:25 +0000 (21:35 -0500)

Make git-fetch follow tags we already have objects for sooner

If autofollowing of tags is enabled, we see a new tag on the remote
that we don't have, and we already have the SHA-1 object that the
tag is peeled to, then we can fetch the tag while we are fetching
the other objects on the first connection.

This is a slight optimization for projects that have a habit of
tagging a release commit after most users have already seen and
downloaded that commit object through a prior fetch session. In
such cases the users may still find new objects in branch heads,
but the new tag will now also be part of the first pack transfer
and the subsequent connection to autofollow tags is not required.

Currently git.git does not benefit from this optimization as any
release usually gets a new commit at the same time that it gets a
new release tag, however git-gui.git and many other projects are
in the habit of tagging fairly old commits.

Users who did not already have the tagged commit still require
opening a second connection to autofollow the tag, as we are unable
to determine on the client side if $tag^{} will be sent to the
client during the first transfer or not. Such computation must be
performed on the remote side of the connection and is deferred to
another series of changes.

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

Teach upload-pack to log the received need lines to... Shawn O. Pearce Mon, 3 Mar 2008 02:35:18 +0000 (21:35 -0500)

Teach upload-pack to log the received need lines to an fd

To facilitate testing and verification of the requests sent by
git-fetch to the remote side we permit logging the received packet
lines to the file descriptor specified in GIT_DEBUG_SEND_PACK has
been set. Special start and end lines are included to indicate
the start and end of each connection.

$ GIT_DEBUG_SEND_PACK=3 git fetch 3>UPLOAD_LOG
$ cat UPLOAD_LOG
#S
want 8e10cf4e007ad7e003463c30c34b1050b039db78 multi_ack side-band-64k thin-pack ofs-delta
want ddfa4a33562179aca1ace2bcc662244a17d0b503
#E
#S
want 3253df4d1cf6fb138b52b1938473bcfec1483223 multi_ack side-band-64k thin-pack ofs-delta
#E

>From the above trace the first connection opened by git-fetch was to
download two refs (with values 8e and dd) and the second connection
was opened to automatically follow an annotated tag (32).

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

Free the path_lists used to find non-local tags in... Shawn O. Pearce Mon, 3 Mar 2008 02:35:10 +0000 (21:35 -0500)

Free the path_lists used to find non-local tags in git-fetch

To support calling find_non_local_tags() more than once in a single
git-fetch process we need the existing_refs to be stack-allocated
so it resets on the second call. We also should free the path
lists to avoid unnecessary memory leaking.

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

Allow builtin-fetch's find_non_local_tags to append... Shawn O. Pearce Mon, 3 Mar 2008 02:35:00 +0000 (21:35 -0500)

Allow builtin-fetch's find_non_local_tags to append onto a list

By allowing the function to append onto the end of an existing list
we can do more interesting things, like join the list of tags we
want to fetch into the first fetch, rather than the second.

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

Ensure tail pointer gets setup correctly when we fetch... Shawn O. Pearce Mon, 3 Mar 2008 02:34:51 +0000 (21:34 -0500)

Ensure tail pointer gets setup correctly when we fetch HEAD only

If we ever decided to append onto the end of this list the tail
pointer must be looking at the right memory cell at the end of
the HEAD ref_map.

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

Remove unnecessary delaying of free_refs(ref_map) in... Shawn O. Pearce Mon, 3 Mar 2008 02:34:43 +0000 (21:34 -0500)

Remove unnecessary delaying of free_refs(ref_map) in builtin-fetch

We can free this ref_map as soon as the fetch is complete. It is not
used for the automatic tag following, nor is it used to disconnect the
transport. This avoids some confusion about why we are holding onto
these refs while following tags.

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

Remove unused variable in builtin-fetch find_non_local_tagsShawn O. Pearce Mon, 3 Mar 2008 02:34:36 +0000 (21:34 -0500)

Remove unused variable in builtin-fetch find_non_local_tags

Apparently fetch_map is passed through, but is not actually used.

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

Update draft release notes for 1.5.5Junio C Hamano Mon, 3 Mar 2008 06:04:59 +0000 (22:04 -0800)

Update draft release notes for 1.5.5

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

Merge branch 'maint'Junio C Hamano Mon, 3 Mar 2008 07:59:50 +0000 (23:59 -0800)

Merge branch 'maint'

* maint:
Update draft release notes for 1.5.4.4
revert: actually check for a dirty index
tests: introduce test_must_fail
git-submodule: Fix typo 'url' which should be '$url'
receive-pack: Initialize PATH to include exec-dir.

Conflicts:

builtin-revert.c

Update draft release notes for 1.5.4.4Junio C Hamano Mon, 3 Mar 2008 05:49:28 +0000 (21:49 -0800)

Update draft release notes for 1.5.4.4

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

revert: actually check for a dirty indexJeff King Mon, 3 Mar 2008 06:30:56 +0000 (01:30 -0500)

revert: actually check for a dirty index

The previous code mistakenly used wt_status_prepare to check whether the
index had anything commitable in it; however, that function is just an
init function, and will never report a dirty index.

The correct way with wt_status_* would be to call wt_status_print with the
output pointing to /dev/null or similar. However, that does extra work by
both examining the working tree and spewing status information to nowhere.

Instead, let's just implement the useful subset of wt_status_print as an
"is_index_dirty" function.

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

tests: introduce test_must_failJunio C Hamano Thu, 28 Feb 2008 21:09:30 +0000 (13:09 -0800)

tests: introduce test_must_fail

When we expect a git command to notice and signal errors, we
carelessly wrote in our tests:

test_expect_success 'reject bogus request' '
do something &&
do something else &&
! git command
'

but a non-zero exit could come from the "git command" segfaulting.

A new helper function "tset_must_fail" is introduced and it is
meant to be used to make sure the command gracefully fails (iow,
dying and exiting with non zero status is counted as a failure
to "gracefully fail"). The above example should be written as:

test_expect_success 'reject bogus request' '
do something &&
do something else &&
test_must_fail git command
'

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

git-submodule: Fix typo 'url' which should be '$url'Ping Yin Mon, 3 Mar 2008 02:03:18 +0000 (10:03 +0800)

git-submodule: Fix typo 'url' which should be '$url'

Fix typo in 'test -z "url"' when checking whether a submodule url is
empty. "url" should be "$url".

Signed-off-by: Ping Yin <pkufranky@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

receive-pack: Initialize PATH to include exec-dir.Björn Steinbrink Mon, 3 Mar 2008 04:08:43 +0000 (05:08 +0100)

receive-pack: Initialize PATH to include exec-dir.

511707d (use only the $PATH for exec'ing git commands) made it a
requirement to call setup_path() to include the git exec-dir in PATH
before spawning any other git commands. git-receive-pack was not yet
adapted to do this and therefore fails to spawn git-unpack-objects if that
is not in the standard PATH.

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

Fix doc typos.Ralf Wildenhues Sun, 2 Mar 2008 23:07:47 +0000 (00:07 +0100)

Fix doc typos.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: exit with proper message if not a git dirJean-Luc Herren Thu, 28 Feb 2008 22:29:54 +0000 (23:29 +0100)

fast-import: exit with proper message if not a git dir

git fast-import expects to be run from an existing (possibly
empty) repository. It was dying with a suboptimal message if that
wasn't the case.

Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>

Merge branch 'np/verify-pack'Junio C Hamano Mon, 3 Mar 2008 00:07:30 +0000 (16:07 -0800)

Merge branch 'np/verify-pack'

* np/verify-pack:
add storage size output to 'git verify-pack -v'
fix unimplemented packed_object_info_detail() features
make verify_one_pack() a bit less wrong wrt packed_git structure
factorize revindex code out of builtin-pack-objects.c

Conflicts:

Makefile

remote show: Clean up connection correctly if object... Johannes Schindelin Sun, 2 Mar 2008 05:31:59 +0000 (05:31 +0000)

remote show: Clean up connection correctly if object fetch wasn't done

Like in ls-remote, we have to disconnect the transport after getting
the remote refs.

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

format-patch: wrap cover-letter's shortlog sensiblyJohannes Schindelin Sun, 2 Mar 2008 15:53:39 +0000 (15:53 +0000)

format-patch: wrap cover-letter's shortlog sensibly

Earlier, overly-long onelines would not be wrapped at all, and indented
with 6 spaces.

Instead, we now wrap around at 72 characters, with a first-line indent
of 2 spaces, and the rest with 4 spaces.

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

format-patch: use the diff options for the cover letter... Johannes Schindelin Sun, 2 Mar 2008 15:53:04 +0000 (15:53 +0000)

format-patch: use the diff options for the cover letter, too

Earlier, when you called "git format-patch --cover-letter -M", the
diffstat in the cover letter would not inherit the "-M". Now it does.

While at it, add a few "|| break" statements in the test's loops;
otherwise, breakages inside the loops would not be caught.

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

gitweb: Mark first match when searching commit messagesJakub Narebski Sun, 2 Mar 2008 15:57:14 +0000 (16:57 +0100)

gitweb: Mark first match when searching commit messages

Due to greediness of a pattern, gitweb used to mark (show) last match
in line, if there are more than one match in line. Now it shows first.
Showing all matches in a line would require further work.

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