gitweb.git
git-push: plumb in --mirror modeAndy Whitcroft Fri, 9 Nov 2007 23:32:25 +0000 (23:32 +0000)

git-push: plumb in --mirror mode

Plumb in the --mirror mode for git-push.

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

Teach send-pack a mirror modeAndy Whitcroft Fri, 9 Nov 2007 23:32:10 +0000 (23:32 +0000)

Teach send-pack a mirror mode

Existing "git push --all" is almost perfect for backing up to
another repository, except that "--all" only means "all
branches" in modern git, and it does not delete old branches and
tags that exist at the back-up repository that you have removed
from your local repository.

This teaches "git-send-pack" a new "--mirror" option. The
difference from the "--all" option are that (1) it sends all
refs, not just branches, and (2) it deletes old refs you no
longer have on the local side from the remote side.

Original patch by Junio C Hamano.

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

Merge master into aw/mirror-pushJunio C Hamano Sat, 10 Nov 2007 05:13:46 +0000 (21:13 -0800)

Merge master into aw/mirror-push

Documentation: remove documentation for removed tools.Junio C Hamano Fri, 9 Nov 2007 01:22:44 +0000 (17:22 -0800)

Documentation: remove documentation for removed tools.

Old commit walkers other than http/curl transport have been removed
for some time now. Remove their documents.

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

Make check-docs target detect removed commandsJunio C Hamano Fri, 9 Nov 2007 02:38:27 +0000 (18:38 -0800)

Make check-docs target detect removed commands

The maintainer should remember running "make check-docs" from
time to time.

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

Documentation: lost-found is now deprecated.Junio C Hamano Fri, 9 Nov 2007 01:21:48 +0000 (17:21 -0800)

Documentation: lost-found is now deprecated.

This makes it possible to mark commands that are deprecated in the
command list of the primary manual page git(7), and uses it to
mark "git lost-found" and "git tar-tree" as deprecated.

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

rebase: operate on a detached HEADJohannes Schindelin Thu, 8 Nov 2007 18:19:08 +0000 (18:19 +0000)

rebase: operate on a detached HEAD

The interactive version of rebase does all the operations on a detached
HEAD, so that after a successful rebase, <branch>@{1} is the pre-rebase
state. The reflogs of "HEAD" still show all the actions in detail.

This teaches the non-interactive version to do the same.

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

--pretty=format: on-demand format expansionRené Scharfe Fri, 9 Nov 2007 00:49:42 +0000 (01:49 +0100)

--pretty=format: on-demand format expansion

Some of the --pretty=format placeholders expansions are expensive to
calculate. This is made worse by the current code's use of
interpolate(), which requires _all_ placeholders are to be prepared
up front.

One way to speed this up is to check which placeholders are present
in the format string and to prepare only the expansions that are
needed. That still leaves the allocation overhead of interpolate().

Another way is to use a callback based approach together with the
strbuf library to keep allocations to a minimum and avoid string
copies. That's what this patch does. It introduces a new strbuf
function, strbuf_expand().

The function takes a format string, list of placeholder strings,
a user supplied function 'fn', and an opaque pointer 'context'
to tell 'fn' what thingy to operate on.

The function 'fn' is expected to accept a strbuf, a parsed
placeholder string and the 'context' pointer, and append the
interpolated value for the 'context' thingy, according to the
format specified by the placeholder.

Thanks to Pierre Habouzit for his suggestion to use strchrnul() and
the code surrounding its callsite. And thanks to Junio for most of
this commit message. :)

Here my measurements of most of Paul Mackerras' test cases that
highlighted the performance problem (best of three runs):

(master)
$ time git log --pretty=oneline >/dev/null

real 0m0.390s
user 0m0.340s
sys 0m0.040s

(master)
$ time git log --pretty=raw >/dev/null

real 0m0.434s
user 0m0.408s
sys 0m0.016s

(master)
$ time git log --pretty="format:%H {%P} %ct" >/dev/null

real 0m1.347s
user 0m0.080s
sys 0m1.256s

(interp_find_active -- Dscho)
$ time ./git log --pretty="format:%H {%P} %ct" >/dev/null

real 0m0.694s
user 0m0.020s
sys 0m0.672s

(strbuf_expand -- this patch)
$ time ./git log --pretty="format:%H {%P} %ct" >/dev/null

real 0m0.395s
user 0m0.352s
sys 0m0.028s

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

Add strchrnul()René Scharfe Fri, 9 Nov 2007 00:49:36 +0000 (01:49 +0100)

Add strchrnul()

As suggested by Pierre Habouzit, add strchrnul(). It's a useful GNU
extension and can simplify string parser code. There are several
places in git that can be converted to strchrnul(); as a trivial
example, this patch introduces its usage to builtin-fetch--tool.c.

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

git-cvsimport: fix handling of user name when it is... Gordon Hopper Thu, 8 Nov 2007 20:15:20 +0000 (13:15 -0700)

git-cvsimport: fix handling of user name when it is not set in CVSROOT

The cvs programs do not default to "anonymous" as the user name, but use the
currently logged in user. This patch more closely matches the cvs behavior.

Signed-off-by: Gordon Hopper <g.hopper@computer.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/terse-push' into aw/mirror-pushJunio C Hamano Fri, 9 Nov 2007 09:10:10 +0000 (01:10 -0800)

Merge branch 'jk/terse-push' into aw/mirror-push

* jk/terse-push:
send-pack: segfault fix on forced push
send-pack: require --verbose to show update of tracking refs
receive-pack: don't mention successful updates
more terse push output

Update draft release notes for 1.5.4Junio C Hamano Fri, 9 Nov 2007 08:32:38 +0000 (00:32 -0800)

Update draft release notes for 1.5.4

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

Merge branch 'maint'Junio C Hamano Fri, 9 Nov 2007 08:21:44 +0000 (00:21 -0800)

Merge branch 'maint'

* maint:
Start preparing for 1.5.3.6
git-send-email: Change the prompt for the subject of the initial message.
SubmittingPatches: improve the 'Patch:' section of the checklist
instaweb: Minor cleanups and fixes for potential problems
stop t1400 hiding errors in tests
Makefile: add missing dependency on wt-status.h
refresh_index_quietly(): express "optional" nature of index writing better
Fix sed string regex escaping in module_name.
Avoid a few unportable, needlessly nested "...`...".
git-mailsplit: with maildirs not only process cur/, but also new/

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

git-bisect.sh: Fix sed script to work with AIX and... Ralf Wildenhues Thu, 8 Nov 2007 21:48:24 +0000 (22:48 +0100)

git-bisect.sh: Fix sed script to work with AIX and BSD sed.

\n is not portable in a s/// replacement string, only
in the regex part. backslash-newline helps.

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

Start preparing for 1.5.3.6Junio C Hamano Fri, 9 Nov 2007 08:17:26 +0000 (00:17 -0800)

Start preparing for 1.5.3.6

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

git-send-email: Change the prompt for the subject of... Benoit Sigoure Thu, 8 Nov 2007 18:56:28 +0000 (19:56 +0100)

git-send-email: Change the prompt for the subject of the initial message.

I never understood what this prompt was asking for until I read the actual
source code. I think this wording is much more understandable.

Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

SubmittingPatches: improve the 'Patch:' section of... Sergei Organov Thu, 8 Nov 2007 16:40:25 +0000 (19:40 +0300)

SubmittingPatches: improve the 'Patch:' section of the checklist

There were 2 items "send patch to..." but having different set of
addresses to send patch to. Merge them together and move the resulting
item to the end of checklist.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

instaweb: Minor cleanups and fixes for potential problemsJonas Fonseca Thu, 8 Nov 2007 23:21:42 +0000 (00:21 +0100)

instaweb: Minor cleanups and fixes for potential problems

Fix path quoting and test of empty values that some shells do not like.
Remove duplicate check and setting of $browser.

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

stop t1400 hiding errors in testsAlex Riesen Thu, 8 Nov 2007 23:41:39 +0000 (00:41 +0100)

stop t1400 hiding errors in tests

The last rm in the test was lacking an "&&" before it,
which caused the errors in the commands be silently hidden.

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

git-am: -i does not take a string parameter.Junio C Hamano Fri, 9 Nov 2007 07:04:31 +0000 (23:04 -0800)

git-am: -i does not take a string parameter.

$ git am -3 -s -i file

spewed the usage strings back at the user while

$ git am -3 -i -s file

didn't. This fixes it.

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

Makefile: add missing dependency on wt-status.hJunio C Hamano Fri, 9 Nov 2007 00:41:56 +0000 (16:41 -0800)

Makefile: add missing dependency on wt-status.h

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

refresh_index_quietly(): express "optional" nature... Junio C Hamano Fri, 9 Nov 2007 00:24:00 +0000 (16:24 -0800)

refresh_index_quietly(): express "optional" nature of index writing better

The point of the part of the code this patch touches is that if
we modified the active_cache, we try to write it out and make it
the index file for later users to use by calling
"commit_locked_index", but we do not really care about the
failure from this sequence because it is done purely as an
optimization.

The original code called three functions primarily for their
side effects but as condition of an if statement, which is
admittedly a bad style.

Incidentally, it squelches an "empty if body" warning from gcc.

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

Fix sed string regex escaping in module_name.Ralf Wildenhues Thu, 8 Nov 2007 21:48:49 +0000 (22:48 +0100)

Fix sed string regex escaping in module_name.

When escaping a string to be used as a sed regex, it is important
to only escape active characters. Escaping other characters is
undefined according to POSIX, and in practice leads to issues with
extensions such as GNU sed's \+.

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

Avoid a few unportable, needlessly nested "...`...".Ralf Wildenhues Thu, 8 Nov 2007 21:47:36 +0000 (22:47 +0100)

Avoid a few unportable, needlessly nested "...`...".

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

nicer display of thin pack completionNicolas Pitre Thu, 8 Nov 2007 20:45:41 +0000 (15:45 -0500)

nicer display of thin pack completion

In the same spirit of prettifying Git's output display for mere mortals,
here's a simple extension to the progress API allowing for a final
message to be provided when terminating a progress line, and use it for
the display of the number of objects needed to complete a thin pack,
saving yet one more line of screen display.

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

Style: place opening brace of a function definition... Junio C Hamano Thu, 8 Nov 2007 23:35:32 +0000 (15:35 -0800)

Style: place opening brace of a function definition at column 1

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

contrib/hooks/post-receive-email: remove cruft, $commit... Gerrit Pape Thu, 8 Nov 2007 12:11:57 +0000 (12:11 +0000)

contrib/hooks/post-receive-email: remove cruft, $committer is not used

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

hooks--update: decline deleting tags or branches by... Gerrit Pape Thu, 8 Nov 2007 09:47:39 +0000 (09:47 +0000)

hooks--update: decline deleting tags or branches by default, add config options

Decline deleting tags or branches through git push <remote> :<ref> by
default, support config options hooks.allowdeletetag, hooks.allowdeletebranch
to override this per repository.

Before this patch the update hook interpreted deleting a tag, no matter if
annotated or not, through git push <remote> :<tag> as unannotated tag, and
declined it by default, but with an unappropriate error message:

$ git push origin :atag
deleting 'refs/tags/atag'
*** The un-annotated tag, atag, is not allowed in this repository
*** Use 'git tag [ -a | -s ]' for tags you want to propagate.
ng refs/tags/atag hook declined
error: hooks/update exited with error code 1
error: hook declined to update refs/tags/atag
error: failed to push to 'monolith:/git/qm/test-repo'

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

hooks--update: fix test for properly set up project... Gerrit Pape Thu, 8 Nov 2007 14:02:00 +0000 (14:02 +0000)

hooks--update: fix test for properly set up project description file

The update hook template intends to abort if the project description file
hasn't been adjusted or is empty. This patch fixes the check for 'being
adjusted'.

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

sh-setup: don't let eval output to be shell-expanded.Pierre Habouzit Thu, 8 Nov 2007 09:32:11 +0000 (10:32 +0100)

sh-setup: don't let eval output to be shell-expanded.

The previous patch missed the same construct in git-clone.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>

send-pack: segfault fix on forced pushJunio C Hamano Thu, 8 Nov 2007 09:38:12 +0000 (01:38 -0800)

send-pack: segfault fix on forced push

When pushing to overwrite a ref that points at a commit we do
not even have, the recent "terse push" patch tried to get a
unique abbreviation for the non-existent (from our point of
view) object, which resulted in strcpy(buf, NULL) and
segfaulted.

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

git-mailsplit: with maildirs not only process cur/... Gerrit Pape Tue, 6 Nov 2007 08:54:18 +0000 (08:54 +0000)

git-mailsplit: with maildirs not only process cur/, but also new/

When saving patches to a maildir with e.g. mutt, the files are put into
the new/ subdirectory of the maildir, not cur/. This makes git-am state
"Nothing to do.". This patch lets git-mailsplit additional check new/
after reading cur/.

This was reported by Joey Hess through
http://bugs.debian.org/447396

Signed-off-by: Gerrit Pape <pape@smarden.org>
Acked-by: Jeff King <peff@peff.net>
Acked-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Fernando J. Pereda <ferdy@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-gui: Bind Meta-T for "Stage To Commit" menu actionShawn O. Pearce Thu, 8 Nov 2007 07:22:21 +0000 (02:22 -0500)

git-gui: Bind Meta-T for "Stage To Commit" menu action

Aaron Digulla suggested we bind Ctrl-T or Cmd-T to "Stage To Commit"
menu action so it can be easily accessed from the keyboard.

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

git-sh-setup: fix parseopt `eval` string underquotingJunio C Hamano Thu, 8 Nov 2007 07:04:38 +0000 (23:04 -0800)

git-sh-setup: fix parseopt `eval` string underquoting

The 'automagic parseopt' support corrupted non option parameters
that had IFS characters in them. The worst case is when it had
a non option parameter like this:

$1=" * some string"

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

test format-patch -s: make sure MIME content type is... Junio C Hamano Sat, 3 Nov 2007 00:55:31 +0000 (17:55 -0700)

test format-patch -s: make sure MIME content type is shown as needed

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

format-patch -s: add MIME encoding header if signer... Junio C Hamano Wed, 31 Oct 2007 21:55:17 +0000 (14:55 -0700)

format-patch -s: add MIME encoding header if signer's name requires so

When the body of the commit log message contains a non-ASCII character,
format-patch correctly emitted the encoding header to mark the resulting
message as such. However, if the original message was fully ASCII, the
command line switch "-s" was given to add a new sign-off, and
the signer's name was not ASCII only, the resulting message would have
contained non-ASCII character but was not marked as such.

This was cherry-picked from the fix in 'master'

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

Merge branch 'jc/clean-config'Junio C Hamano Thu, 8 Nov 2007 02:19:38 +0000 (18:19 -0800)

Merge branch 'jc/clean-config'

* jc/clean-config:
clean: require -f to do damage by default

Merge branch 'gp/reset-q'Junio C Hamano Thu, 8 Nov 2007 02:18:55 +0000 (18:18 -0800)

Merge branch 'gp/reset-q'

* gp/reset-q:
git-reset: add -q option to operate quietly

Merge branch 'ds/maint-deflatebound'Junio C Hamano Thu, 8 Nov 2007 02:17:20 +0000 (18:17 -0800)

Merge branch 'ds/maint-deflatebound'

* ds/maint-deflatebound:
Improve accuracy of check for presence of deflateBound.

Merge branch 'cp/p4'Junio C Hamano Thu, 8 Nov 2007 02:16:18 +0000 (18:16 -0800)

Merge branch 'cp/p4'

* cp/p4:
git-p4: Detect changes to executable bit and include them in p4 submit.
git-p4: Add a helper function to parse the full git diff-tree output.

Merge branch 'maint'Junio C Hamano Thu, 8 Nov 2007 02:07:07 +0000 (18:07 -0800)

Merge branch 'maint'

* maint:
Add Documentation/CodingGuidelines
When exec() fails include the failing command in the error message
RelNotes-1.5.3.5: fix another typo

Merge branch 'mh/work-tree'Junio C Hamano Thu, 8 Nov 2007 01:37:00 +0000 (17:37 -0800)

Merge branch 'mh/work-tree'

* mh/work-tree:
Make git-blame fail when working tree is needed and we're not in one
Don't always require working tree for git-rm
Use setup_work_tree() in builtin-ls-files.c
Refactor working tree setup

Small code readability improvement in show_reference... Mike Hommey Sat, 3 Nov 2007 13:08:05 +0000 (14:08 +0100)

Small code readability improvement in show_reference() in builtin-tag.c

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

send-email: apply --suppress-from to S-o-b and cc-cmdUwe Kleine-König Wed, 7 Nov 2007 07:34:12 +0000 (08:34 +0100)

send-email: apply --suppress-from to S-o-b and cc-cmd

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

Fix minor nits in configure.acRalf Wildenhues Tue, 6 Nov 2007 20:12:45 +0000 (21:12 +0100)

Fix minor nits in configure.ac

Avoid "test -o" as it is only XSI not POSIX, and not portable.
Avoid exit(3) in test programs in favor of return, to accommodate
for newer Autoconf not providing a declaration for exit.

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

Deprecate git-lost-foundJohannes Schindelin Thu, 8 Nov 2007 00:41:22 +0000 (00:41 +0000)

Deprecate git-lost-found

"git fsck" learnt the option "--lost-found" in v1.5.3-rc0~5, to make
"git lost-found" obsolete. It is time to deprecate "git lost-found".

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

Improve accuracy of check for presence of deflateBound.David Symonds Wed, 7 Nov 2007 03:24:28 +0000 (14:24 +1100)

Improve accuracy of check for presence of deflateBound.

ZLIB_VERNUM isn't defined in some zlib versions, so this patch does a proper
linking test in autoconf to see whether deflateBound exists in zlib. Also,
setting NO_DEFLATE_BOUND will also work for folk not using autoconf.

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

Add Documentation/CodingGuidelinesJohannes Schindelin Thu, 8 Nov 2007 00:33:19 +0000 (00:33 +0000)

Add Documentation/CodingGuidelines

Even if our code is quite a good documentation for our coding style,
some people seem to prefer a document describing it.

The part about the shell scripts is clearly just copied from one of
Junio's helpful mails, and some parts were added from comments by
Junio, Andreas Ericsson and Robin Rosenberg.

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

make display of total transferred fully accurateNicolas Pitre Tue, 6 Nov 2007 21:30:28 +0000 (16:30 -0500)

make display of total transferred fully accurate

The minimum delay of 1/2 sec between successive throughput updates might
not have been elapsed when display_throughput() is called for the last
time, potentially making the display of total transferred bytes not
right when progress is said to be done.

Let's force an update of the throughput display as well when the
progress is complete. As a side effect, the total transferred will
always be displayed even if the actual transfer rate doesn't have time
to kickin.

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

contrib/hooks/post-receive-email: make subject prefix... Gerrit Pape Tue, 6 Nov 2007 13:49:30 +0000 (13:49 +0000)

contrib/hooks/post-receive-email: make subject prefix configurable

Email subjects are prefixed with "[SCM] " by default, make this optionally
configurable through the hooks.emailprefix config option.

Suggested by martin f krafft through
http://bugs.debian.org/428418

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

contrib/hooks/post-receive-email: reformat to wrap... Gerrit Pape Tue, 6 Nov 2007 13:48:34 +0000 (13:48 +0000)

contrib/hooks/post-receive-email: reformat to wrap comments at 76 chars

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

contrib/hooks/post-receive-email: fix typoGerrit Pape Tue, 6 Nov 2007 13:48:07 +0000 (13:48 +0000)

contrib/hooks/post-receive-email: fix typo

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

restore fetching with thin-pack capabilityNicolas Pitre Wed, 7 Nov 2007 22:20:22 +0000 (17:20 -0500)

restore fetching with thin-pack capability

Broken since commit fa74052922cf39e5a39ad7178d1b13c2da9b4519.

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

git-stash: Fix listing stashesEmil Medve Wed, 7 Nov 2007 21:10:27 +0000 (15:10 -0600)

git-stash: Fix listing stashes

Commit bc9e7399af3790918140c30a5b2c85bf9a8f1ad3 "reverted" commit
f12e925ac23ad6169e046cfe05b8438a1611ad58

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

When exec() fails include the failing command in the... Ask Bjørn Hansen Tue, 6 Nov 2007 10:54:01 +0000 (02:54 -0800)

When exec() fails include the failing command in the error message

git-svn occasionally fails with no details as to what went wrong - this should help debug those situations.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes-1.5.3.5: fix another typoDavid D Kilzer Sun, 4 Nov 2007 12:45:22 +0000 (04:45 -0800)

RelNotes-1.5.3.5: fix another typo

Signed-off-by: David D Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Reteach builtin-ls-remote to understand remotesShawn O. Pearce Wed, 7 Nov 2007 01:29:20 +0000 (20:29 -0500)

Reteach builtin-ls-remote to understand remotes

Prior to being made a builtin git-ls-remote understood that when
it was given a remote name we wanted it to resolve that to the
pre-configured URL and connect to that location. That changed when
it was converted to a builtin and many of my automation tools broke.

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

Give git-am back the ability to add Signed-off-by lines.Johannes Sixt Tue, 6 Nov 2007 20:33:58 +0000 (21:33 +0100)

Give git-am back the ability to add Signed-off-by lines.

This was lost in the migration to git-rev-parse --parseopt by commit
78443d90491c1b82afdffc3d5d2ab8c1a58928b5.

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

git-rev-parse --parseoptJunio C Hamano Tue, 6 Nov 2007 20:23:14 +0000 (12:23 -0800)

git-rev-parse --parseopt

The "parseopt mode" of git-rev-parse does not need to be run
inside a git repository, although the normal mode does.

Most notabily, lack of this fix breaks git-clone script, as
noticed by Nico.

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

scripts: Add placeholders for OPTIONS_SPECJunio C Hamano Tue, 6 Nov 2007 09:50:02 +0000 (01:50 -0800)

scripts: Add placeholders for OPTIONS_SPEC

--text follows this line--
These commands currently lack OPTIONS_SPEC; allow people to
easily list with "git grep 'OPTIONS_SPEC=$'" what they can help
improving.

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

git-reset: add -q option to operate quietlyGerrit Pape Sun, 4 Nov 2007 09:37:20 +0000 (09:37 +0000)

git-reset: add -q option to operate quietly

Many git commands have a -q option to suppress output to stdout, let's
have it for git-reset too.

This was asked for by Joey Hess through
http://bugs.debian.org/444933

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

Migrate git-repack.sh to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:31:02 +0000 (11:31 +0100)

Migrate git-repack.sh to use git-rev-parse --parseopt

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

Migrate git-quiltimport.sh to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:31:01 +0000 (11:31 +0100)

Migrate git-quiltimport.sh to use git-rev-parse --parseopt

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

Migrate git-checkout.sh to use git-rev-parse --parseopt... Pierre Habouzit Sun, 4 Nov 2007 10:31:00 +0000 (11:31 +0100)

Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdash

Also fix some space versus tabs issues.

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

Migrate git-instaweb.sh to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:30:59 +0000 (11:30 +0100)

Migrate git-instaweb.sh to use git-rev-parse --parseopt

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

Migrate git-merge.sh to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:30:58 +0000 (11:30 +0100)

Migrate git-merge.sh to use git-rev-parse --parseopt

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

Migrate git-am.sh to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:30:57 +0000 (11:30 +0100)

Migrate git-am.sh to use git-rev-parse --parseopt

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

Migrate git-clone to use git-rev-parse --parseoptPierre Habouzit Sun, 4 Nov 2007 10:30:56 +0000 (11:30 +0100)

Migrate git-clone to use git-rev-parse --parseopt

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

Migrate git-clean.sh to use git-rev-parse --parseopt.Pierre Habouzit Sun, 4 Nov 2007 10:30:55 +0000 (11:30 +0100)

Migrate git-clean.sh to use git-rev-parse --parseopt.

Also minor consistency tweaks in how errors are caught.

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

Update git-sh-setup(1) to allow transparent use of... Pierre Habouzit Sun, 4 Nov 2007 10:30:54 +0000 (11:30 +0100)

Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseopt

If you set OPTIONS_SPEC, git-sh-setups uses git-rev-parse --parseopt
automatically.

It also diverts usage to re-exec $0 with the -h option as parse-options.c
will catch that.

If you need git-rev-parse --parseopt to keep the `--` the user may have
passed to your command, set OPTIONS_KEEPDASHDASH to a non empty value
in your script.

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

Add a parseopt mode to git-rev-parse to bring parse... Pierre Habouzit Sun, 4 Nov 2007 10:30:53 +0000 (11:30 +0100)

Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.

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

Make git-blame fail when working tree is needed and... Mike Hommey Sat, 3 Nov 2007 12:22:55 +0000 (13:22 +0100)

Make git-blame fail when working tree is needed and we're not in one

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

Don't always require working tree for git-rmMike Hommey Sat, 3 Nov 2007 11:23:13 +0000 (12:23 +0100)

Don't always require working tree for git-rm

This allows to do git rm --cached -r directory, instead of
git ls-files -z directory | git update-index --remove -z --stdin.
This can be particularly useful for git-filter-branch users.

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

Use setup_work_tree() in builtin-ls-files.cMike Hommey Sat, 3 Nov 2007 11:23:12 +0000 (12:23 +0100)

Use setup_work_tree() in builtin-ls-files.c

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

Refactor working tree setupMike Hommey Sat, 3 Nov 2007 11:23:11 +0000 (12:23 +0100)

Refactor working tree setup

Create a setup_work_tree() that can be used from any command requiring
a working tree conditionally.

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

Add tests for git tagMike Hommey Sun, 4 Nov 2007 00:11:15 +0000 (01:11 +0100)

Add tests for git tag

These tests check whether git-tag properly sends a comment into the
editor, and whether it reuses previous annotation when overwriting
an existing tag.

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

Reuse previous annotation when overwriting a tagMike Hommey Sun, 4 Nov 2007 00:11:14 +0000 (01:11 +0100)

Reuse previous annotation when overwriting a tag

When forcing to overwrite an annotated tag, there are good chances one
wants to keep the old annotation, or modify it, not start from scratch.

This is obviously only triggered for annotated tagging (-a or -s).

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

upload-pack: Use finish_{command,async}() instead of... Johannes Sixt Sun, 4 Nov 2007 19:46:48 +0000 (20:46 +0100)

upload-pack: Use finish_{command,async}() instead of waitpid().

upload-pack spawns two processes, rev-list and pack-objects, and carefully
monitors their status so that it can report failure to the remote end.
This change removes the complicated procedures on the grounds of the
following observations:

- If everything is OK, rev-list closes its output pipe end, upon which
pack-objects (which reads from the pipe) sees EOF and terminates itself,
closing its output (and error) pipes. upload-pack reads from both until
it sees EOF in both. It collects the exit codes of the child processes
(which indicate success) and terminates successfully.

- If rev-list sees an error, it closes its output and terminates with
failure. pack-objects sees EOF in its input and terminates successfully.
Again upload-pack reads its inputs until EOF. When it now collects
the exit codes of its child processes, it notices the failure of rev-list
and signals failure to the remote end.

- If pack-objects sees an error, it terminates with failure. Since this
breaks the pipe to rev-list, rev-list is killed with SIGPIPE.
upload-pack reads its input until EOF, then collects the exit codes of
the child processes, notices their failures, and signals failure to the
remote end.

- If upload-pack itself dies unexpectedly, pack-objects is killed with
SIGPIPE, and subsequently also rev-list.

The upshot of this is that precise monitoring of child processes is not
required because both terminate if either one of them dies unexpectedly.
This allows us to use finish_command() and finish_async() instead of
an explicit waitpid(2) call.

The change is smaller than it looks because most of it only reduces the
indentation of a large part of the inner loop.

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

builtin-reset: avoid forking "update-index --refresh"Johannes Schindelin Sat, 3 Nov 2007 15:21:21 +0000 (15:21 +0000)

builtin-reset: avoid forking "update-index --refresh"

Instead of forking update-index, call refresh_cache() directly.

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

builtin-reset: do not call "ls-files --unmerged"Johannes Schindelin Sat, 3 Nov 2007 14:33:01 +0000 (14:33 +0000)

builtin-reset: do not call "ls-files --unmerged"

Since reset is a builtin now, it can use the full power of libgit.a
and check for unmerged entries itself.

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

parse-options: abbreviation engine fix.Johannes Schindelin Mon, 5 Nov 2007 13:15:21 +0000 (13:15 +0000)

parse-options: abbreviation engine fix.

When an option could be an ambiguous abbreviation of two options, the code
used to error out. Even if an exact match would have occured later.

Test and original patch by Pierre Habouzit.

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

Merge branch 'maint'Junio C Hamano Tue, 6 Nov 2007 06:03:47 +0000 (22:03 -0800)

Merge branch 'maint'

* maint:
Remove a couple of duplicated include
grep with unmerged index
git-daemon: fix remote port number in log entry
git-svn: t9114: verify merge commit message in test
git-svn: fix dcommit clobbering when committing a series of diffs

git-commit.sh: Fix usage checks regarding paths given... Björn Steinbrink Mon, 5 Nov 2007 19:36:33 +0000 (20:36 +0100)

git-commit.sh: Fix usage checks regarding paths given when they do not make sense

The checks that looked for paths given to git-commit in addition to
--all or --interactive expected only 3 values, while the case statement
actually provides 4, so the check was never triggered.

The bug was introduced in 6cbf07efc5702351897dee4742525c9b9f7828ac when
the case statement was extended to handle --interactive.

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

Fix comment in strbuf.h to use correct name strbuf_avail()Steffen Prohaska Sun, 4 Nov 2007 08:02:21 +0000 (09:02 +0100)

Fix comment in strbuf.h to use correct name strbuf_avail()

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove a couple of duplicated includeMarco Costalba Sun, 4 Nov 2007 14:35:26 +0000 (15:35 +0100)

Remove a couple of duplicated include

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

grep with unmerged indexJunio C Hamano Tue, 6 Nov 2007 01:16:47 +0000 (17:16 -0800)

grep with unmerged index

We called flush_grep() every time we saw an unmerged entry in
the index. If we happen to find an unmerged entry before we saw
more than two paths, we incorrectly declared that the user had
too many non-paths options in front.

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

Merge branch 'gp/maint-diffdoc' into maintJunio C Hamano Tue, 6 Nov 2007 02:56:55 +0000 (18:56 -0800)

Merge branch 'gp/maint-diffdoc' into maint

* gp/maint-diffdoc:
git-diff.txt: add section "output format" describing the diff formats

Rearrange git-format-patch synopsis to improve clarity.David Symonds Mon, 5 Nov 2007 23:04:24 +0000 (10:04 +1100)

Rearrange git-format-patch synopsis to improve clarity.

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

Some better parse-options documentation.Pierre Habouzit Mon, 5 Nov 2007 12:03:22 +0000 (13:03 +0100)

Some better parse-options documentation.

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

git-daemon: fix remote port number in log entryGerrit Pape Mon, 5 Nov 2007 09:16:22 +0000 (09:16 +0000)

git-daemon: fix remote port number in log entry

The port number in struct sockaddr_in needs to be converted from network
byte order to host byte order (on some architectures).

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

revision walker: mini clean-upLinus Torvalds Mon, 5 Nov 2007 21:22:34 +0000 (13:22 -0800)

revision walker: mini clean-up

This removes the unnecessary indirection of "revs->prune_fn",
since that function is always the same one (or NULL), and there
is in fact not even an abstraction reason to make it a function
(i.e. its not called from some other file and doesn't allow us
to keep the function itself static or anything like that).

It then just replaces it with a bit that says "prune or not",
and if not pruning, every commit gets TREECHANGE.

That in turn means that

- if (!revs->prune_fn || (flags & TREECHANGE))
- if (revs->prune_fn && !(flags & TREECHANGE))

just become

- if (flags & TREECHANGE)
- if (!(flags & TREECHANGE))

respectively.

Together with adding the "single_parent()" helper function, the "complex"
conditional now becomes

if (!(flags & TREECHANGE) && rev->dense && single_parent(commit))
continue;

Also indirection of "revs->dense" checking is thrown away the
same way, because TREECHANGE bit is set appropriately now.

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

gc: --prune prunes unreferenced objects.Junio C Hamano Tue, 6 Nov 2007 00:39:00 +0000 (16:39 -0800)

gc: --prune prunes unreferenced objects.

Brandon Casey correctly points out that we repack with -A without --prune
and with -a with --prune, so it is not just unreferenced loose objects
that are pruned away when the option is given.

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

t3502: Disambiguate between file and rev by adding --Brian Gernhardt Sun, 4 Nov 2007 15:31:26 +0000 (10:31 -0500)

t3502: Disambiguate between file and rev by adding --

On a case insensitive file system, this test fails because git-diff
doesn't know if it is asking for the file "A" or the tag "a".

Adding "--" at the end of the ambiguous commands allows the test to
finish properly.

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

Enhance --early-output formatLinus Torvalds Sun, 4 Nov 2007 20:12:05 +0000 (12:12 -0800)

Enhance --early-output format

This makes --early-output a bit more advanced, and actually makes it
generate multiple "Final output:" headers as it updates things
asynchronously. I realize that the "Final output:" line is now illogical,
since it's not really final until it also says "done", but

It now _always_ generates a "Final output:" header in front of any commit
list, and that output header gives you a *guess* at the maximum number of
commits available. However, it should be noted that the guess can be
completely off: I do a reasonable job estimating it, but it is not meant
to be exact.

So what happens is that you may get output like this:

- at 0.1 seconds:

Final output: 2 incomplete
.. 2 commits listed ..

- half a second later:

Final output: 33 incomplete
.. 33 commits listed ..

- another half a second after that:

Final output: 71 incomplete
.. 71 commits listed ..

- another half second later:

Final output: 136 incomplete
.. 100 commits listed: we hit the --early-output limit, and
.. will only output 100 commits, and after this you'll not
.. see an "incomplete" report any more since you got as much
.. early output as you asked for!

- .. and then finally:

Final output: 73106 done
.. all the commits ..

The above is a real-life scenario on my current kernel tree after having
flushed all the caches.

Tested with the experimental gitk patch that Paul sent out, and by looking
at the actual log output (and verifying that my commit count guesses
actually match real life fairly well).

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

Add more tests for git-cleanShawn Bohrer Mon, 5 Nov 2007 04:28:12 +0000 (22:28 -0600)

Add more tests for git-clean

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use parseopts in builtin-pushDaniel Barkalow Mon, 5 Nov 2007 03:35:37 +0000 (22:35 -0500)

Use parseopts in builtin-push

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

send-pack: require --verbose to show update of tracking... Jeff King Mon, 5 Nov 2007 05:12:18 +0000 (00:12 -0500)

send-pack: require --verbose to show update of tracking refs

This is really an uninteresting detail, and it just takes
attention away from the actual push updates and posssible
errors.

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

receive-pack: don't mention successful updatesJeff King Mon, 5 Nov 2007 05:11:41 +0000 (00:11 -0500)

receive-pack: don't mention successful updates

The proposed updates are already shown to the user by
send-pack, so there's no point. We continue to show errors,
since they are unexpected.

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

more terse push outputJeff King Mon, 5 Nov 2007 05:11:15 +0000 (00:11 -0500)

more terse push output

This changes the output of send-pack to match the new,
more terse fetch output. It looks like this:

To git://host.tld/path/to/repo
+ f3325dc...3b91d1c hasforce -> mirror/hasforce (forced update)
f3325dc..bb022dc master -> mirror/master
! [rejected] needsforce -> mirror/needsforce (non-fast forward)
* [new branch] newbranch -> mirror/newbranch
* [new tag] v1.0 -> v1.0

instead of:

updating 'refs/heads/mirror/hasforce' using 'refs/heads/hasforce'
from f3325dca9c4a34d74012c0e159254f454930cec7
to 3b91d1c310ca9d7b547b85466dd876e143498304
updating 'refs/heads/mirror/master' using 'refs/heads/master'
from f3325dca9c4a34d74012c0e159254f454930cec7
to bb022dc363d5c2aa9aa3026beb9706d44fbe1328
error: remote 'refs/heads/mirror/needsforce' is not an ancestor of
local 'refs/heads/needsforce'.
Maybe you are not up-to-date and need to pull first?
updating 'refs/heads/mirror/newbranch' using 'refs/heads/newbranch'
from 0000000000000000000000000000000000000000
to 3b91d1c310ca9d7b547b85466dd876e143498304
updating 'refs/tags/v1.0'
from 0000000000000000000000000000000000000000
to bb022dc363d5c2aa9aa3026beb9706d44fbe1328

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

git-svn: t9114: verify merge commit message in testEric Wong Mon, 5 Nov 2007 11:21:48 +0000 (03:21 -0800)

git-svn: t9114: verify merge commit message in test

It's possible that we end up with an incorrect commit message
in this test after making changes to fix the clobber bug
in dcommit.

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