1
0
mirror of https://github.com/git/git.git synced 2024-10-19 15:18:24 +02:00
Commit Graph

19938 Commits

Author SHA1 Message Date
Junio C Hamano
64fb90b707 Merge branch 'jn/maint-1.6.3-check-ref-format-doc' into maint
* jn/maint-1.6.3-check-ref-format-doc:
  Documentation: describe check-ref-format --branch
2009-10-23 22:30:20 -07:00
Junio C Hamano
70ed433c2b Merge branch 'pv/maint-add-p-no-exclude' into maint
* pv/maint-add-p-no-exclude:
  git-add--interactive: never skip files included in index
2009-10-23 22:29:19 -07:00
Junio C Hamano
024ab976ff Do not fail "describe --always" in a tag-less repository
This fixes a regression introduce by d68dc34 (git-describe: Die early if
there are no possible descriptions, 2009-08-06).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-23 12:00:41 -07:00
Thomas Rast
204d363f5a Quote ' as \(aq in manpages
The docbook/xmlto toolchain insists on quoting ' as \'.  This does
achieve the quoting goal, but modern 'man' implementations turn the
apostrophe into a unicode "proper" apostrophe (given the right
circumstances), breaking code examples in many of our manpages.

Quote them as \(aq instead, which is an "apostrophe quote" as per the
groff_char manpage.

Unfortunately, as Anders Kaseorg kindly pointed out, this is not
portable beyond groff, so we add an extra Makefile variable GNU_ROFF
which you need to enable to get the new quoting.

Thanks also to Miklos Vajna for documentation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-22 12:59:50 -07:00
Jari Aalto
7c85d27429 Documentation/merge-options.txt: order options in alphabetical groups
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-22 12:39:18 -07:00
Jari Aalto
3f7a9b5ad1 Documentation/git-pull.txt: Add subtitles above included option files
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-22 12:39:10 -07:00
Junio C Hamano
39eea7bdd9 Fix incorrect error check while reading deflated pack data
The loop in get_size_from_delta() feeds a deflated delta data from the
pack stream _until_ we get inflated result of 20 bytes[*] or we reach the
end of stream.

    Side note. This magic number 20 does not have anything to do with the
    size of the hash we use, but comes from 1a3b55c (reduce delta head
    inflated size, 2006-10-18).

The loop reads like this:

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
        curpos += stream.next_in - in;
    } while ((st == Z_OK || st == Z_BUF_ERROR) &&
             stream.total_out < sizeof(delta_head));

This git_inflate() can return:

 - Z_STREAM_END, if use_pack() fed it enough input and the delta itself
   was smaller than 20 bytes;

 - Z_OK, when some progress has been made;

 - Z_BUF_ERROR, if no progress is possible, because we either ran out of
   input (due to corrupt pack), or we ran out of output before we saw the
   end of the stream.

The fix b3118bd (sha1_file: Fix infinite loop when pack is corrupted,
2009-10-14) attempted was against a corruption that appears to be a valid
stream that produces a result larger than the output buffer, but we are
not even trying to read the stream to the end in this loop.  If avail_out
becomes zero, total_out will be the same as sizeof(delta_head) so the loop
will terminate without the "fix".  There is no fix from b3118bd needed for
this loop, in other words.

The loop in unpack_compressed_entry() is quite a different story.  It
feeds a deflated stream (either delta or base) and allows the stream to
produce output up to what we expect but no more.

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
        curpos += stream.next_in - in;
    } while (st == Z_OK || st == Z_BUF_ERROR)

This _does_ risk falling into an endless interation, as we can exhaust
avail_out if the length we expect is smaller than what the stream wants to
produce (due to pack corruption).  In such a case, avail_out will become
zero and inflate() will return Z_BUF_ERROR, while avail_in may (or may
not) be zero.

But this is not a right fix:

    do {
        in = use_pack();
        stream.next_in = in;
        st = git_inflate(&stream, Z_FINISH);
+       if (st == Z_BUF_ERROR && (stream.avail_in || !stream.avail_out)
+               break; /* wants more input??? */
        curpos += stream.next_in - in;
    } while (st == Z_OK || st == Z_BUF_ERROR)

as Z_BUF_ERROR from inflate() may be telling us that avail_in has also run
out before reading the end of stream marker.  In such a case, both avail_in
and avail_out would be zero, and the loop should iterate to allow the end
of stream marker to be seen by inflate from the input stream.

The right fix for this loop is likely to be to increment the initial
avail_out by one (we allocate one extra byte to terminate it with NUL
anyway, so there is no risk to overrun the buffer), and break out if we
see that avail_out has become zero, in order to detect that the stream
wants to produce more than what we expect.  After the loop, we have a
check that exactly tests this condition:

    if ((st != Z_STREAM_END) || stream.total_out != size) {
        free(buffer);
        return NULL;
    }

So here is a patch (without my previous botched attempts) to fix this
issue.  The first hunk reverts the corresponding hunk from b3118bd, and
the second hunk is the same fix proposed earlier.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 23:19:47 -07:00
Junio C Hamano
3694209ca1 Merge branch 'maint'
* maint:
  Document `delta` attribute in "git help attributes".
  Mark files in t/t5100 as UTF-8
  Remove a left-over file from t/t5100
2009-10-21 17:33:15 -07:00
Junio C Hamano
8e850a4dbd Merge branch 'gb/maint-gitweb-esc-param'
* gb/maint-gitweb-esc-param:
  gitweb: fix esc_param
2009-10-21 17:32:59 -07:00
Björn Gustavsson
550c66f3f9 git-clone.txt: Fix grammar and formatting
Add the missing definite article ("the") in several places.

Change "note to..." to "note for...", since "note to" means that
that the note is addressed to someone (source: Google search).

Change "progressbar" to "progress bar" (source: Wikipedia).

Format git commands, options, and file names consistently using
back quotes (i.e. a fixed font in the resulting HTML document).

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 17:16:08 -07:00
Ingmar Vanhassel
2a94552887 import-tars: Add support for tarballs compressed with lzma, xz
Also handle the extensions .tlz and .txz, aliases for .tar.lzma and
.tar.xz respectively.

Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Liked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 17:15:43 -07:00
Junio C Hamano
77e3efbf43 receive-pack: run "gc --auto --quiet" and optionally "update-server-info"
Introduce two new configuration variables, receive.autogc (defaults to
true) and receive.updateserverinfo (defaults to false).  When these are
set, receive-pack runs "gc --auto --quiet" and "update-server-info"
respectively after it finishes receiving data from "git push" and updating
refs.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
2009-10-21 15:32:32 -07:00
Junio C Hamano
dad5f89fc5 gc --auto --quiet: make the notice a bit less verboase
When "gc --auto --quiet" decides there is something to do, it tells the
user what it is doing, as it is going to make the user wait for a bit.

But the message was a bit too long.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 15:28:42 -07:00
Jari Aalto
6b276e19fa Documentation/fetch-options.txt: order options alphabetically
git-fetch.{1,html} will be helped with this patch

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 15:12:01 -07:00
Clemens Buchacher
d504f6975d modernize fetch/merge/pull examples
The "git pull" documentation has examples which follow an outdated
style. Update the examples to use "git merge" where appropriate and
move the examples to the corresponding manpages.

Furthermore,

 - show that pull is equivalent to fetch and merge, which is still a
   frequently asked question,

 - explain the default fetch refspec.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 14:20:50 -07:00
Nasser Grainawi
975457f185 Document delta attribute in "git help attributes".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 14:07:44 -07:00
Johannes Sixt
814a9bfee9 Mark files in t/t5100 as UTF-8
This enables gitk to show the patch text with correct glyphs if the locale
is not UTF-8.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 11:27:50 -07:00
Johannes Sixt
66bcb6a68f Remove a left-over file from t/t5100
This mbox file must have been added by accident in e9fe804 (git-mailinfo:
Fix getting the subject from the in-body [PATCH] line, 2008-07-14).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-21 11:27:48 -07:00
Junio C Hamano
f29cd3938d fsck: default to "git fsck --full"
Linus and other git developers from the early days trained their fingers
to type the command, every once in a while even without thinking, to check
the consistency of the repository back when the lower core part of the git
was still being developed.  Developers who wanted to make sure that git
correctly dealt with packfiles could deliberately trigger their creation
and checked them after they were created carefully, but loose objects are
the ones that are written by various commands from random codepaths.  It
made some technical sense to have a mode that checked only loose objects
from the debugging point of view for that reason.

Even for git developers, there no longer is any reason to type "git fsck"
every five minutes these days, worried that some newly created objects
might be corrupt due to recent change to git.

The reason we did not make "--full" the default is probably we trust our
filesystems a bit too much.  At least, we trusted filesystems more than we
trusted the lower core part of git that was under development.

Once a packfile is created and we always use it read-only, there didn't
seem to be much point in suspecting that the underlying filesystems or
disks may corrupt them in such a way that is not caught by the SHA-1
checksum over the entire packfile and per object checksum.  That trust in
the filesystems might have been a good tradeoff between fsck performance
and reliability on platforms git was initially developed on and for, but
it may not be true anymore as we run on many more platforms these days.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-20 12:11:39 -07:00
Junio C Hamano
a9d7c9552e Merge branch 'maint'
* maint:
  Documentation/git-gc.txt: change "references" to "reference"
2009-10-20 00:13:13 -07:00
Stephen Boyd
e133d65c3e gitweb: linkify author/committer names with search
It's nice to search for an author by merely clicking on their name in
gitweb. This is usually faster than selecting the name, copying the
selection, pasting it into the search box, selecting between
author/committer and then hitting enter.

Linkify the avatar icon in log/shortlog view because the icon is directly
adjacent to the name and thus more related. The same is not true
when in commit/tag view where the icon is farther away.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-20 00:08:16 -07:00
Matt Kraai
3ed0b11e7e Documentation/git-gc.txt: change "references" to "reference"
Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-20 00:01:23 -07:00
Junio C Hamano
e79999b1a2 Merge branch 'bg/rebase-reword'
* bg/rebase-reword:
  rebase -i: fix reword when using a terminal editor
  Teach 'rebase -i' the command "reword"
2009-10-19 00:49:21 -07:00
Stephen Boyd
7725cb5e8b rebase -i: fix reword when using a terminal editor
We don't want to use output() on git-commit --amend when rewording the
commit message. This leads to confusion as the editor is run in a
subshell with it's output saved away, leaving the user with a seemingly
frozen terminal.

Fix by removing the output part.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19 00:49:09 -07:00
Junio C Hamano
7f98ebc8fd format_commit_message(): fix function signature
The format template string was declared as "const void *" for some unknown
reason, even though it obviously is meant to be passed a string.  Make it
"const char *".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19 00:48:59 -07:00
Jeff King
f6fdbb6804 cvsimport: fix relative argument filenames
One of the first things that cvsimport does is chdir to the
newly created git repo. This means that any filenames given
to us on the command line will be looked up relative to the
git repo directory. This is probably not what the user
expects, so let's remember and prepend the original
directory for relative filenames.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-19 00:31:02 -07:00
Junio C Hamano
ee50af1566 Merge branch 'jp/maint-send-email-fold'
* jp/maint-send-email-fold:
  git-send-email.perl: fold multiple entry "Cc:" and multiple single line "RCPT TO:"s
2009-10-18 23:01:37 -07:00
Junio C Hamano
804edc13ae Merge branch 'cc/replace-no-replace'
* cc/replace-no-replace:
  git: add --no-replace-objects option to disable replacing
2009-10-18 23:01:31 -07:00
Junio C Hamano
c22e5e994a Merge branch 'jn/maint-1.6.3-check-ref-format-doc'
* jn/maint-1.6.3-check-ref-format-doc:
  Documentation: describe check-ref-format --branch
2009-10-18 23:01:26 -07:00
Junio C Hamano
e38d1c555e Merge branch 'jk/maint-1.6.3-ls-files-no-ignore-cached'
* jk/maint-1.6.3-ls-files-no-ignore-cached:
  ls-files: excludes should not impact tracked files
2009-10-18 23:01:22 -07:00
Junio C Hamano
03fee47d89 Merge branch 'jn/gitweb-show-size'
* jn/gitweb-show-size:
  gitweb: Add 'show-sizes' feature to show blob sizes in tree view
2009-10-18 23:01:14 -07:00
Junio C Hamano
8457e8ca86 Merge branch 'jp/fetch-tag-match'
* jp/fetch-tag-match:
  fetch: Speed up fetch by rewriting find_non_local_tags
2009-10-18 23:01:09 -07:00
Junio C Hamano
023adc077c Merge branch 'jn/gitweb-patch'
* jn/gitweb-patch:
  gitweb: Do not show 'patch' link for merge commits
2009-10-18 23:01:03 -07:00
Junio C Hamano
178071baa7 Merge branch 'tf/doc-pt-br'
* tf/doc-pt-br:
  Documentation: update pt-BR
2009-10-18 23:00:58 -07:00
Junio C Hamano
37ce6b12ac Merge branch 'dk/blame-el'
* dk/blame-el:
  git-blame.el: Change how blame information is shown.
2009-10-18 23:00:51 -07:00
Junio C Hamano
d9499c80c1 Merge branch 'mr/instaweb-cgid'
* mr/instaweb-cgid:
  instaweb: support mod_cgid for apache2
2009-10-18 23:00:45 -07:00
René Scharfe
fb423da0e5 describe: load refnames before calling describe()
Get rid of the static variable that was used to prevent loading all
the refnames multiple times by moving that code out of describe(),
simply making sure it is only run once that way.

Also change the error message that is shown in case no refnames are
found to not include a hash any more, as the error condition is not
specific to any particular revision.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 23:00:02 -07:00
Junio C Hamano
bcc9b7427d Merge branch 'maint'
* maint:
  git push: say that --tag can't be used with --all or --mirror in help text
  git push: remove incomplete options list from help text
  document push's new quiet option
  Makefile: clean block-sha1/ directory instead of mozilla-sha1/
2009-10-18 22:58:53 -07:00
Nanako Shiraishi
8ef4c28b8d git push: say that --tag can't be used with --all or --mirror in help text
This replaces an earlier patch by Björn Gustavsson,

  Message-ID: <4AD75029.1010109@gmail.com>

Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:47:48 -07:00
Nanako Shiraishi
fcb044ee57 git push: remove incomplete options list from help text
'git push -h' shows usage text with incomplete list of options and then
has a separate list of options that are supported. Imitate the way other
commands (I looked at 'git diff' for an example) show their options.

Signed-off-by: しらいし ななこ <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:47:29 -07:00
Jeff King
989119d96e document push's new quiet option
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 22:44:22 -07:00
Carlos R. Mafra
3edd98ac65 Makefile: clean block-sha1/ directory instead of mozilla-sha1/
'make clean' should remove the object files from block-sha1/
instead of the non-existent mozilla-sha1/ directory.

Signed-off-by: Carlos R. Mafra <crmafra@aei.mpg.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-18 19:45:38 -07:00
Junio C Hamano
ad12b81271 Start 1.6.6 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-17 00:11:43 -07:00
Junio C Hamano
9981c808b4 Merge branch 'jc/maint-blank-at-eof'
* jc/maint-blank-at-eof:
  diff -B: colour whitespace errors
  diff.c: emit_add_line() takes only the rest of the line
  diff.c: split emit_line() from the first char and the rest of the line
  diff.c: shuffling code around
  diff --whitespace: fix blank lines at end
  core.whitespace: split trailing-space into blank-at-{eol,eof}
  diff --color: color blank-at-eof
  diff --whitespace=warn/error: fix blank-at-eof check
  diff --whitespace=warn/error: obey blank-at-eof
  diff.c: the builtin_diff() deals with only two-file comparison
  apply --whitespace: warn blank but not necessarily empty lines at EOF
  apply --whitespace=warn/error: diagnose blank at EOF
  apply.c: split check_whitespace() into two
  apply --whitespace=fix: detect new blank lines at eof correctly
  apply --whitespace=fix: fix handling of blank lines at the eof
2009-10-17 00:11:03 -07:00
Junio C Hamano
7641eb400f Merge branch 'maint'
* maint:
  GIT 1.6.5.1
  grep: do not segfault when -f is used
2009-10-17 00:10:33 -07:00
Junio C Hamano
b142da2a5d GIT 1.6.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.5.1
2009-10-16 23:57:19 -07:00
Junio C Hamano
050dfc4535 Merge branch 'maint-1.6.4' into maint
* maint-1.6.4:
  grep: do not segfault when -f is used
2009-10-16 23:47:58 -07:00
Matt Kraai
cfe370c647 grep: do not segfault when -f is used
"git grep" would segfault if its -f option was used because it would
try to use an uninitialized strbuf, so initialize the strbuf.

Thanks to Johannes Sixt <j.sixt@viscovery.net> for the help with the
test cases.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-16 23:47:47 -07:00
Junio C Hamano
c274db7057 Merge branch 'pv/maint-add-p-no-exclude'
* pv/maint-add-p-no-exclude:
  git-add--interactive: never skip files included in index
2009-10-14 16:13:20 -07:00
Junio C Hamano
695f9523dd Merge branch 'maint'
* maint:
  sha1_file: Fix infinite loop when pack is corrupted
2009-10-14 16:10:37 -07:00