Code

git.git
13 years agoMerge branch 'tr/add-i-no-escape'
Junio C Hamano [Mon, 23 May 2011 17:50:06 +0000 (10:50 -0700)]
Merge branch 'tr/add-i-no-escape'

* tr/add-i-no-escape:
  add -i: ignore terminal escape sequences

13 years agoMerge branch 'jm/maint-diff-words-with-sbe'
Junio C Hamano [Mon, 23 May 2011 17:27:42 +0000 (10:27 -0700)]
Merge branch 'jm/maint-diff-words-with-sbe'

* jm/maint-diff-words-with-sbe:
  do not read beyond end of malloc'd buffer

13 years agoMerge branch 'js/mingw-shutdown'
Junio C Hamano [Mon, 23 May 2011 17:27:12 +0000 (10:27 -0700)]
Merge branch 'js/mingw-shutdown'

* js/mingw-shutdown:
  Windows: add a wrapper for the shutdown() system call

13 years agoMerge branch 'ms/ls-remote-exit-with-status'
Junio C Hamano [Mon, 23 May 2011 17:27:08 +0000 (10:27 -0700)]
Merge branch 'ms/ls-remote-exit-with-status'

* ms/ls-remote-exit-with-status:
  ls-remote: the --exit-code option reports "no matching refs"

13 years agoMerge branch 'mg/config-symbolic-constants'
Junio C Hamano [Mon, 23 May 2011 16:59:05 +0000 (09:59 -0700)]
Merge branch 'mg/config-symbolic-constants'

* mg/config-symbolic-constants:
  config: Give error message when not changing a multivar
  config: define and document exit codes

13 years agoMerge branch 'ab/i18n-scripts-basic'
Junio C Hamano [Mon, 23 May 2011 16:58:45 +0000 (09:58 -0700)]
Merge branch 'ab/i18n-scripts-basic'

* ab/i18n-scripts-basic:
  Makefile: add xgettext target for *.sh files
  git-sh-i18n.sh: add GIT_GETTEXT_POISON support
  git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers
  git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()

13 years agoMerge branch 'jc/magic-pathspec'
Junio C Hamano [Mon, 23 May 2011 16:58:35 +0000 (09:58 -0700)]
Merge branch 'jc/magic-pathspec'

* jc/magic-pathspec:
  setup.c: Fix some "symbol not declared" sparse warnings
  t3703: Skip tests using directory name ":" on Windows
  revision.c: leave a note for "a lone :" enhancement
  t3703, t4208: add test cases for magic pathspec
  rev/path disambiguation: further restrict "misspelled index entry" diag
  fix overslow :/no-such-string-ever-existed diagnostics
  fix overstrict :<path> diagnosis
  grep: use get_pathspec() correctly
  pathspec: drop "lone : means no pathspec" from get_pathspec()
  Revert "magic pathspec: add ":(icase)path" to match case insensitively"
  magic pathspec: add ":(icase)path" to match case insensitively
  magic pathspec: futureproof shorthand form
  magic pathspec: add tentative ":/path/from/top/level" pathspec support

13 years agoMerge branch 'jk/blame-line-porcelain'
Junio C Hamano [Mon, 23 May 2011 16:58:31 +0000 (09:58 -0700)]
Merge branch 'jk/blame-line-porcelain'

* jk/blame-line-porcelain:
  blame: add --line-porcelain output format
  blame: refactor porcelain output
  add tests for various blame formats

13 years agotests: make test_expect_code quieter on success
Jonathan Nieder [Sat, 21 May 2011 19:40:32 +0000 (14:40 -0500)]
tests: make test_expect_code quieter on success

A command exiting with the expected status is not particularly
notable.

While the indication of progress might be useful when tracking down
where in a test a failure has happened, the same applies to most other
test helpers, which are quiet about success, so this single helper's
output stands out in an unpleasant way.  An alternative method for
showing progress information might to invent a --progress option that
runs tests with "set -x", or until that is available, to run tests
using commands like

prove -v -j2 --shuffle --exec='sh -x' t2202-add-addremove.sh

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff/perl: catch sub with brace on second line
Jonathan Nieder [Sat, 21 May 2011 19:38:26 +0000 (14:38 -0500)]
userdiff/perl: catch sub with brace on second line

Accept

sub foo
{
}

as an alternative to a more common style that introduces perl
functions with a brace on the first line (and likewise for BEGIN/END
blocks).  The new regex is a little hairy to avoid matching

# forward declaration
sub foo;

while continuing to match "sub foo($;@) {" and

sub foo { # This routine is interesting;
# in fact, the lines below explain how...

While at it, pay attention to Perl 5.14's "package foo {" syntax as an
alternative to the traditional "package foo;".

Requested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff/perl: match full line of POD headers
Jonathan Nieder [Sat, 21 May 2011 19:35:51 +0000 (14:35 -0500)]
userdiff/perl: match full line of POD headers

The builtin perl userdiff driver is not greedy enough about catching
POD header lines.  Capture the whole line, so instead of just
declaring that we are in some "@@ =head1" section, diff/grep output
can explain that the enclosing section is about "@@ =head1 OPTIONS".

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff/perl: anchor "sub" and "package" patterns on the left
Jonathan Nieder [Sat, 21 May 2011 19:29:01 +0000 (14:29 -0500)]
userdiff/perl: anchor "sub" and "package" patterns on the left

The userdiff funcname mechanism has no concept of nested scopes ---
instead, "git diff" and "git grep --show-function" simply label the
diff header with the most recent matching line.  Unfortunately that
means text following a subroutine in a POD section:

=head1 DESCRIPTION

You might use this facility like so:

sub example {
foo;
}

Now, having said that, let's say more about the facility.
Blah blah blah ... etc etc.

gets the subroutine name instead of the POD header in its diff/grep
funcname header, making it harder to get oriented when reading a
diff without enough context.

The fix is simple: anchor the funcname syntax to the left margin so
nested subroutines and packages like this won't get picked up.  (The
builtin C++ funcname pattern already does the same thing.)  This means
the userdiff driver will misparse the idiom

{
my $static;
sub foo {
... use $static ...
}
}

but I think that's worth it; we can revisit this later if the userdiff
mechanism learns to keep track of the beginning and end of nested
scopes.

Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4018 (funcname patterns): minor cleanups
Jonathan Nieder [Sat, 21 May 2011 19:25:14 +0000 (14:25 -0500)]
t4018 (funcname patterns): minor cleanups

Introduce a test_expect_funcname function to make a diff and apply a
regexp anchored on the left to the function name it writes, avoiding
some repetition.

Omit the space after >, <<, and < operators for consistency with
other scripts.  Quote the <<here document delimiter and $ signs in
quotes so readers don't have to worry about the effect of shell
metacharacters.

Remove some unnecessary blank lines.

Run "git diff" as a separate command instead of as upstream of a pipe
that checks its output, so the exit status can be tested.  In
particular, this way if "git diff" starts segfaulting the test harness
will notice.

Allow "error:" as a synonym for "fatal:" when checking error messages,
since whether a command uses die() or "return error()" is a small
implementation detail.

Anchor some more regexes on the right.

None of the above is very important on its own; the point is just to
make the script a little easier to read and the code less scary to
modify.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4018 (funcname patterns): make configuration easier to track
Jonathan Nieder [Sat, 21 May 2011 19:22:28 +0000 (14:22 -0500)]
t4018 (funcname patterns): make configuration easier to track

Introduce a "test_config" function to set a configuration variable
for use by a single test (automatically unsetting it when the
assertion finishes).  If this function is used consistently, the
configuration used in a test_expect_success block can be read at the
beginning of that block instead of requiring reading all the tests
that come before.  So it becomes a little easier to add new tests or
rearrange existing ones without fear of breaking configuration.

In particular, the test of alternation in xfuncname patterns also
checks that xfuncname takes precedence over funcname variable as a
sort of side-effect, since the latter leaks in from previous tests.
In the new syntax, the test has to say explicitly what variables it is
using, making the test clearer and a future regression in coverage
from carelessly editing the script less likely.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4018 (funcname patterns): make .gitattributes state easier to track
Jonathan Nieder [Sat, 21 May 2011 19:11:33 +0000 (14:11 -0500)]
t4018 (funcname patterns): make .gitattributes state easier to track

Most, but not all, tests in this script rely on attributes declaring
that files with a .java extension should use the "java" driver:

*.java diff=java

Split out a "set up" test to put such a .gitattributes in place after
the tests that do not want it have run, to make it more likely that
individual tests other than this setup test can be safely modified,
rearranged, or skipped.  Presumably this setup code will learn to
request other drivers for other extensions in the same place when the
test suite learns to exercise other diff drivers.

Similarly, make sure that early test assertions that do not use these
default attributes set up .gitattributes appropriately for themselves,
so tests that run before can be modified with less risk of breaking
something.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect bisect_next_check "You need to" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:29 +0000 (18:44 +0000)]
i18n: git-bisect bisect_next_check "You need to" message

Gettextize the "You need to start by" message in
bisect_next_check. This message assembled English output by hand so it
needed to be split up to make it translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect [Y/n] messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:28 +0000 (18:44 +0000)]
i18n: git-bisect [Y/n] messages

Gettextize the [Y/n] questions git-bisect presents, and leave a note
in a TRANSLATORS comment explaining that translators have to preserve
a mention of the Y/n characters since the program will expect them,
and not their localized equivalents.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect bisect_replay + $1 messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:27 +0000 (18:44 +0000)]
i18n: git-bisect bisect_replay + $1 messages

Gettextize bisect_replay messages that use the $1 variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

Since I was doing that anyway I've changed all other uses of $1
variable to use the alias variable for clarity.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect bisect_reset + $1 messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:26 +0000 (18:44 +0000)]
i18n: git-bisect bisect_reset + $1 messages

ettextize bisect_reset messages that use the $1 variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect bisect_run + $@ messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:25 +0000 (18:44 +0000)]
i18n: git-bisect bisect_run + $@ messages

Gettextize bisect_run messages that use the $@ variable. Since it's
subroutine local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect die + eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:24 +0000 (18:44 +0000)]
i18n: git-bisect die + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect die + gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:23 +0000 (18:44 +0000)]
i18n: git-bisect die + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect echo + eval_gettext message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:22 +0000 (18:44 +0000)]
i18n: git-bisect echo + eval_gettext message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect echo + gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:21 +0000 (18:44 +0000)]
i18n: git-bisect echo + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect gettext + echo message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:20 +0000 (18:44 +0000)]
i18n: git-bisect gettext + echo message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-bisect add git-sh-i18n
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:19 +0000 (18:44 +0000)]
i18n: git-bisect add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash drop_stash say/die messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:18 +0000 (18:44 +0000)]
i18n: git-stash drop_stash say/die messages

Gettextize the say/die eval_gettext messages in the drop_stash
function. Since making these translatable would result in a long line
I've wrapped this into two lines.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash "unknown option" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:17 +0000 (18:44 +0000)]
i18n: git-stash "unknown option" message

Gettextize the "unknown option for 'stash save'" message that's shown
on:

    $ git stash save --blah-blah
    error: unknown option for 'stash save': --blah-blah
           To provide a message, use git stash save -- '--blah-blah'
    Usage: git stash list [<options>]

In a translation the second line should be aligned with the first
one. I've added a TRANSLATORS comment to indicate this.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash die + eval_gettext $1 messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:16 +0000 (18:44 +0000)]
i18n: git-stash die + eval_gettext $1 messages

Gettextize a messages that used the $1 variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash die + eval_gettext $* messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:15 +0000 (18:44 +0000)]
i18n: git-stash die + eval_gettext $* messages

Gettextize messages that used the $* variable. Since it's subroutine
local we have to provide an alias for it for eval_gettext.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash die + eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:14 +0000 (18:44 +0000)]
i18n: git-stash die + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash die + gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:13 +0000 (18:44 +0000)]
i18n: git-stash die + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash say + gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:12 +0000 (18:44 +0000)]
i18n: git-stash say + gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash echo + gettext message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:11 +0000 (18:44 +0000)]
i18n: git-stash echo + gettext message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-stash add git-sh-i18n
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:10 +0000 (18:44 +0000)]
i18n: git-stash add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "blob" and "submodule" messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:09 +0000 (18:44 +0000)]
i18n: git-submodule "blob" and "submodule" messages

Gettextize the words "blob" and "submodule", which will be
interpolated in a message emitted by git-submodule. This is
explicitly tested for so we need to skip a portion of a test with
test_i18ncmp.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "path not initialized" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:08 +0000 (18:44 +0000)]
i18n: git-submodule "path not initialized" message

Gettextize the "Submodule path '$path' not initialized" message. This
is explicitly tested for so we need to skip a portion of a test with
test_i18grep.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "[...] path is ignored" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:07 +0000 (18:44 +0000)]
i18n: git-submodule "[...] path is ignored" message

Gettextize the "The following path is ignored" message. This is
explicitly tested for so we need to skip a portion of a test with
test_i18ncmp.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "Entering [...]" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:06 +0000 (18:44 +0000)]
i18n: git-submodule "Entering [...]" message

Gettextize the "Entering [...]" message. This is explicitly tested for
so we need to skip a portion of a test with test_i18ncmp.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule $errmsg messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:05 +0000 (18:44 +0000)]
i18n: git-submodule $errmsg messages

Gettextize warning messages stored in the $errmsg variable using
eval_gettext interpolation. This is explicitly tested for so we
need to skip a portion of a test with test_i18ncmp.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "Submodule change[...]" messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:04 +0000 (18:44 +0000)]
i18n: git-submodule "Submodule change[...]" messages

Gettextize the "Submodules changed but not updated" and "Submodule
changes to be committed" messages. This is explicitly tested for so we
need to skip a portion of a test with test_i18ncmp.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule "cached cannot be used" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:03 +0000 (18:44 +0000)]
i18n: git-submodule "cached cannot be used" message

Gettextize the "--cached cannot be used with --files" message. Since
this message starts with "--" we have to pass "--" as the first
argument. This works with both GNU gettext 0.18.1 (as expected), and
the gettext(1) on Solaris 10.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule $update_module say + die messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:02 +0000 (18:44 +0000)]
i18n: git-submodule $update_module say + die messages

Gettextize $update_module say and die messages. These messages needed
to be split up to make them translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule die + eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:01 +0000 (18:44 +0000)]
i18n: git-submodule die + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule say + eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:44:00 +0000 (18:44 +0000)]
i18n: git-submodule say + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule echo + eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:59 +0000 (18:43 +0000)]
i18n: git-submodule echo + eval_gettext messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-submodule add git-sh-i18n
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:58 +0000 (18:43 +0000)]
i18n: git-submodule add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-pull eval_gettext + warning message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:57 +0000 (18:43 +0000)]
i18n: git-pull eval_gettext + warning message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-pull eval_gettext + die message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:56 +0000 (18:43 +0000)]
i18n: git-pull eval_gettext + die message

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-pull die messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:55 +0000 (18:43 +0000)]
i18n: git-pull die messages

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-pull add git-sh-i18n
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:54 +0000 (18:43 +0000)]
i18n: git-pull add git-sh-i18n

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am printf(1) message to eval_gettext
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:53 +0000 (18:43 +0000)]
i18n: git-am printf(1) message to eval_gettext

Convert a message that used printf(1) format to use eval_gettext. It's
easier for translators to handle the latter, since the eval format
automatically gives them context via variable names.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am core say messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:52 +0000 (18:43 +0000)]
i18n: git-am core say messages

Make the core git-am messages that use say() translatable. These are
visible on almost every git am invocation.

There are tests that depend on the "Applying" output that need to be
changed to use the test_i18* functions along with this translation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am "Falling back" say message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:51 +0000 (18:43 +0000)]
i18n: git-am "Falling back" say message

Make the "Falling back to patching base and 3-way merge..." message
used by fall_back_3way() translatable.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am "Apply?" message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:50 +0000 (18:43 +0000)]
i18n: git-am "Apply?" message

Make the "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all" message
translatable, and leave a note in a TRANSLATORS comment explaining
that translators have to preserve a mention of the y/n/e/v/a
characters since the program will expect them, and not their
localized equivalents.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am clean_abort messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:49 +0000 (18:43 +0000)]
i18n: git-am clean_abort messages

Messages that used the clean_abort function needed both gettext(1) and
eval_gettext(). These need to be interpolated in a string like the die
and cannot_fallback messages.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am cannot_fallback messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:48 +0000 (18:43 +0000)]
i18n: git-am cannot_fallback messages

Translate messages with gettext(1) before they're passed to the
cannot_fallback function, just like we handle the die function.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am die messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:47 +0000 (18:43 +0000)]
i18n: git-am die messages

The die messages in git-am need to use:

    die "$(gettext "string")"

Since gettext(1) emits the message instead of returning it like the C
equivalent, and our die() function in git-sh-setup needs to get a
string as an argument.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am gettext + gettext to stderr message
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:46 +0000 (18:43 +0000)]
i18n: git-am gettext + gettext to stderr message

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am eval_gettext messages
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:45 +0000 (18:43 +0000)]
i18n: git-am eval_gettext messages

Messages that use variables to be interpolated need to use
eval_gettext(), this wrapper will eval the message and expand the
variable for us.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am multi-line getttext $msg; echo
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:44 +0000 (18:43 +0000)]
i18n: git-am multi-line getttext $msg; echo

When we have multi-line `gettext $msg; echo' messages we can't
preserve the existing indenting because gettext(1) can't accept input
on stdin.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am one-line gettext $msg; echo
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:43 +0000 (18:43 +0000)]
i18n: git-am one-line gettext $msg; echo

One-line `gettext $msg; echo' messages are the simplest use case for
gettext(1).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: git-am add git-sh-i18n
Ævar Arnfjörð Bjarmason [Sat, 21 May 2011 18:43:42 +0000 (18:43 +0000)]
i18n: git-am add git-sh-i18n

Source git-sh-i18n in git-am.sh, it's needed to import the Git gettext
shell functions.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostreaming: read loose objects incrementally
Junio C Hamano [Sun, 15 May 2011 02:17:10 +0000 (19:17 -0700)]
streaming: read loose objects incrementally

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosha1_file.c: expose helpers to read loose objects
Junio C Hamano [Sun, 15 May 2011 02:42:10 +0000 (19:42 -0700)]
sha1_file.c: expose helpers to read loose objects

Make map_sha1_file(), parse_sha1_header() and unpack_sha1_header()
available to the streaming read API by exporting them via cache.h header
file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostreaming: read non-delta incrementally from a pack
Junio C Hamano [Fri, 13 May 2011 22:34:58 +0000 (15:34 -0700)]
streaming: read non-delta incrementally from a pack

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostreaming_write_entry(): support files with holes
Junio C Hamano [Fri, 13 May 2011 22:55:00 +0000 (15:55 -0700)]
streaming_write_entry(): support files with holes

One typical use of a large binary file is to hold a sparse on-disk hash
table with a lot of holes. Help preserving the holes with lseek().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoconvert: CRLF_INPUT is a no-op in the output codepath
Junio C Hamano [Fri, 20 May 2011 23:14:32 +0000 (16:14 -0700)]
convert: CRLF_INPUT is a no-op in the output codepath

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sat, 21 May 2011 01:50:29 +0000 (18:50 -0700)]
Merge branch 'maint'

* maint:
  git-svn: Fix git svn log --show-commit

13 years agostreaming_write_entry(): use streaming API in write_entry()
Junio C Hamano [Thu, 12 May 2011 21:31:08 +0000 (14:31 -0700)]
streaming_write_entry(): use streaming API in write_entry()

When the output to a path does not have to be converted, we can read from
the object database from the streaming API and write to the file in the
working tree, without having to hold everything in the memory.

The ident, auto- and safe- crlf conversions inherently require you to read
the whole thing before deciding what to do, so while it is technically
possible to support them by using a buffer of an unbound size or rewinding
and reading the stream twice, it is less practical than the traditional
"read the whole thing in core and convert" approach.

Adding streaming filters for the other conversions on top of this should
be doable by tweaking the can_bypass_conversion() function (it should be
renamed to can_filter_stream() when it happens). Then the streaming API
can be extended to wrap the git_istream streaming_write_entry() opens on
the underlying object in another git_istream that reads from it, filters
what is read, and let the streaming_write_entry() read the filtered
result. But that is outside the scope of this series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostreaming: a new API to read from the object store
Junio C Hamano [Thu, 12 May 2011 02:30:25 +0000 (19:30 -0700)]
streaming: a new API to read from the object store

Given an object name, use open_istream() to get a git_istream handle
that you can read_istream() from as if you are using read(2) to read
the contents of the object, and close it with close_istream() when
you are done.

Currently, we do not do anything fancy--it just calls read_sha1_file()
and keeps the contents in memory as a whole, and carve it out as you
request with read_istream().

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agowrite_entry(): separate two helper functions out
Junio C Hamano [Fri, 13 May 2011 04:36:42 +0000 (21:36 -0700)]
write_entry(): separate two helper functions out

In the write-out codepath, a block of code determines what file in the
working tree to write to, and opens an output file descriptor to it.

After writing the contents out to the file, another block of code runs
fstat() on the file descriptor when appropriate.

Separate these blocks out to open_output_fd() and fstat_output()
helper functions.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agounpack_object_header(): make it public
Junio C Hamano [Fri, 13 May 2011 22:33:33 +0000 (15:33 -0700)]
unpack_object_header(): make it public

This function is used to read and skip over the per-object header
in a packfile.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosha1_object_info_extended(): hint about objects in delta-base cache
Junio C Hamano [Fri, 13 May 2011 20:20:43 +0000 (13:20 -0700)]
sha1_object_info_extended(): hint about objects in delta-base cache

An object found in the delta-base cache is not guaranteed to
stay there, but we know it came from a pack and it is likely
to give us a quick access if we read_sha1_file() it right now,
which is a piece of useful information.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-gui: warn when trying to commit on a detached head
Heiko Voigt [Tue, 15 Feb 2011 19:43:54 +0000 (19:43 +0000)]
git-gui: warn when trying to commit on a detached head

The commandline is already warning when checking out a detached head.
Since the only thing thats potentially dangerous is to create commits
on a detached head lets warn in case the user is about to do that.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agodo not read beyond end of malloc'd buffer
Jim Meyering [Fri, 20 May 2011 17:20:12 +0000 (19:20 +0200)]
do not read beyond end of malloc'd buffer

With diff.suppress-blank-empty=true, "git diff --word-diff" would
output data that had been read from uninitialized heap memory.
The problem was that fn_out_consume did not account for the
possibility of a line with length 1, i.e., the empty context line
that diff.suppress-blank-empty=true converts from " \n" to "\n".
Since it assumed there would always be a prefix character (the space),
it decremented "len" unconditionally, thus passing len=0 to emit_line,
which would then blindly call emit_line_0 with len=-1 which would
pass that value on to fwrite as SIZE_MAX.  Boom.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn: Fix git svn log --show-commit
Michael J Gruber [Fri, 20 May 2011 11:16:34 +0000 (13:16 +0200)]
git-svn: Fix git svn log --show-commit

git svn log --show-commit had no tests and, consequently, no attention
by the author of

b1b4755 (git-log: put space after commit mark, 2011-03-10)

who kept git svn log working only without --show-commit.

Introduce a test and fix it.

Reported-by: Bernt Hansen <bernt@norang.ca>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate draft release notes to 1.7.6
Junio C Hamano [Fri, 20 May 2011 03:50:07 +0000 (20:50 -0700)]
Update draft release notes to 1.7.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline'
Junio C Hamano [Fri, 20 May 2011 04:02:14 +0000 (21:02 -0700)]
Merge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline'

* jc/maint-1.7.4-pathspec-stdin-and-cmdline:

13 years agoMerge branch 'rg/copy-gecos-username'
Junio C Hamano [Fri, 20 May 2011 03:37:21 +0000 (20:37 -0700)]
Merge branch 'rg/copy-gecos-username'

* rg/copy-gecos-username:
  copy_gecos: fix not adding nlen to len when processing "&"

13 years agoMerge branch 'jl/submodule-conflicted-gitmodules'
Junio C Hamano [Fri, 20 May 2011 03:37:21 +0000 (20:37 -0700)]
Merge branch 'jl/submodule-conflicted-gitmodules'

* jl/submodule-conflicted-gitmodules:
  Submodules: Don't parse .gitmodules when it contains, merge conflicts
  test that git status works with merge conflict in, .gitmodules

13 years agoMerge branch 'jc/replacing'
Junio C Hamano [Fri, 20 May 2011 03:37:21 +0000 (20:37 -0700)]
Merge branch 'jc/replacing'

* jc/replacing:
  read_sha1_file(): allow selective bypassing of replacement mechanism
  inline lookup_replace_object() calls
  read_sha1_file(): get rid of read_sha1_file_repl() madness
  t6050: make sure we test not just commit replacement
  Declare lookup_replace_object() in cache.h, not in commit.h

Conflicts:
environment.c

13 years agoMerge branch 'nd/sparse-co-fix'
Junio C Hamano [Fri, 20 May 2011 03:37:21 +0000 (20:37 -0700)]
Merge branch 'nd/sparse-co-fix'

* nd/sparse-co-fix:
  sparse checkout: do not eagerly decide the fate for whole directory
  t1011: fix sparse-checkout initialization and add new file

13 years agoMerge branch 'ld/p4-preserve-user-names'
Junio C Hamano [Fri, 20 May 2011 03:37:20 +0000 (20:37 -0700)]
Merge branch 'ld/p4-preserve-user-names'

* ld/p4-preserve-user-names:
  git-p4: warn if git authorship won't be retained
  git-p4: small improvements to user-preservation
  git-p4: add option to preserve user names

13 years agoMerge branch 'ms/tagname-does-not-begin-with-dash'
Junio C Hamano [Fri, 20 May 2011 03:37:20 +0000 (20:37 -0700)]
Merge branch 'ms/tagname-does-not-begin-with-dash'

* ms/tagname-does-not-begin-with-dash:
  tag: disallow '-' as tag name

13 years agoMerge branch 'jk/git-connection-deadlock-fix'
Junio C Hamano [Fri, 20 May 2011 03:37:20 +0000 (20:37 -0700)]
Merge branch 'jk/git-connection-deadlock-fix'

* jk/git-connection-deadlock-fix:
  test core.gitproxy configuration
  send-pack: avoid deadlock on git:// push with failed pack-objects
  connect: let callers know if connection is a socket
  connect: treat generic proxy processes like ssh processes

Conflicts:
connect.c

13 years agoMerge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'
Junio C Hamano [Fri, 20 May 2011 03:37:19 +0000 (20:37 -0700)]
Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'

* js/maint-send-pack-stateless-rpc-deadlock-fix:
  sideband_demux(): fix decl-after-stmt

13 years agoMerge branch 'jk/cherry-pick-root-with-resolve'
Junio C Hamano [Fri, 20 May 2011 03:37:19 +0000 (20:37 -0700)]
Merge branch 'jk/cherry-pick-root-with-resolve'

* jk/cherry-pick-root-with-resolve:
  t3503: test cherry picking and reverting root commits
  revert: allow reverting a root commit
  cherry-pick: handle root commits with external strategies

13 years agoMerge branch 'jc/maint-pathspec-stdin-and-cmdline'
Junio C Hamano [Fri, 20 May 2011 03:37:18 +0000 (20:37 -0700)]
Merge branch 'jc/maint-pathspec-stdin-and-cmdline'

* jc/maint-pathspec-stdin-and-cmdline:
  setup_revisions(): take pathspec from command line and --stdin correctly

Conflicts:
revision.c

13 years agoMerge 1.7.5.2 in
Junio C Hamano [Fri, 20 May 2011 03:37:08 +0000 (20:37 -0700)]
Merge 1.7.5.2 in

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRevert "Merge branch 'en/merge-recursive'"
Junio C Hamano [Fri, 20 May 2011 03:17:44 +0000 (20:17 -0700)]
Revert "Merge branch 'en/merge-recursive'"

As the band-aid to merge-recursive seems to regress complex merges in an
unpleasant way.  The merge-recursive implementation needs to be rewritten
in such a way that it resolves renames and D/F conflicts entirely in-core
and not to touch working tree at all while doing so. But in the meantime,
this reverts commit ac9666f84 that merged the topic in its entirety.

13 years agoGit 1.7.5.2 v1.7.5.2
Junio C Hamano [Fri, 20 May 2011 03:30:44 +0000 (20:30 -0700)]
Git 1.7.5.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoreceive-pack: eliminate duplicate .have refs
Jeff King [Thu, 19 May 2011 21:34:46 +0000 (17:34 -0400)]
receive-pack: eliminate duplicate .have refs

When receiving a push, we advertise ref tips from any
alternate repositories, in case that helps the client send a
smaller pack. Since these refs don't actually exist in the
destination repository, we don't transmit the real ref
names, but instead use the pseudo-ref ".have".

If your alternate has a large number of duplicate refs (for
example, because it is aggregating objects from many related
repositories, some of which will have the same tags and
branch tips), then we will send each ".have $sha1" line
multiple times. This is a pointless waste of bandwidth, as
we are simply repeating the same fact to the client over and
over.

This patch eliminates duplicate .have refs early on. It does
so efficiently by sorting the complete list and skipping
duplicates. This has the side effect of re-ordering the
.have lines by ascending sha1; this isn't a problem, though,
as the original order was meaningless.

There is a similar .have system in fetch-pack, but it
does not suffer from the same problem. For each alternate
ref we consider in fetch-pack, we actually open the object
and mark it with the SEEN flag, so duplicates are
automatically culled.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agobisect: refactor sha1_array into a generic sha1 list
Jeff King [Thu, 19 May 2011 21:34:33 +0000 (17:34 -0400)]
bisect: refactor sha1_array into a generic sha1 list

This is a generally useful abstraction, so let's let others
make use of it.  The refactoring is more or less a straight
copy; however, functions and struct members have had their
names changed to match string_list, which is the most
similar data structure.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorefactor refs_from_alternate_cb to allow passing extra data
Jeff King [Thu, 19 May 2011 21:33:17 +0000 (17:33 -0400)]
refactor refs_from_alternate_cb to allow passing extra data

The foreach_alt_odb function triggers a callback for each
alternate object db we have, with room for a single void
pointer as data. Currently, we always call refs_from_alternate_cb
as the callback function, and then pass another callback (to
receive each ref individually) as the void pointer.

This has two problems:

  1. C technically forbids stuffing a function pointer into
     a "void *". In practice, this probably doesn't matter
     on any architectures git runs on, but it never hurts to
     follow the letter of the law.

  2. There is no room for an extra data pointer. Indeed, the
     alternate_ref_fn that refs_from_alternate_cb calls
     takes a void* for data, but we always pass it NULL.

Instead, let's properly stuff our function pointer into a
data struct, which also leaves room for an extra
caller-supplied data pointer. And to keep things simple for
existing callers, let's make a for_each_alternate_ref
function that takes care of creating the extra struct.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: sort TEST_PROGRAMS list
Jeff King [Thu, 19 May 2011 21:24:24 +0000 (17:24 -0400)]
Makefile: sort TEST_PROGRAMS list

We usually keep these lists in sorted order, but the last
few entries were just tacked on the end.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofetch: avoid repeated commits in mark_complete
Jeff King [Thu, 19 May 2011 20:48:51 +0000 (16:48 -0400)]
fetch: avoid repeated commits in mark_complete

We add every local ref to a list so that we can mark them
and all of their ancestors back to a certain cutoff point.
However, if some refs point to the same commit, we will end
up adding them to the list many times.

Furthermore, since commit_lists are stored as linked lists,
we must do an O(n) traversal of the list in order to find
the right place to insert each commit. This makes building
the list O(n^2) in the number of refs.

For normal repositories, this isn't a big deal. We have a
few hundreds refs at most, and most of them are unique. But
consider an "alternates" repo that serves as an object
database for many other similar repos. For reachability, it
needs to keep a copy of the refs in each child repo. This
means it may have a large number of refs, many of which
point to the same commits.

By noting commits we have already added to the list, we can
shrink the size of "n" in such a repo to the number of
unique commits, which is on the order of what a normal repo
would contain (it's actually more than a normal repo, since child repos
may have branches at different states, but in practice it tends
to be much smaller than the list with duplicates).

Here are the results on one particular giant repo
(containing objects for all Rails forks on GitHub):

  $ git for-each-ref | wc -l
  112514

  [before]
  $ git fetch --no-tags ../remote.git
  63.52user 0.12system 1:03.68elapsed 99%CPU (0avgtext+0avgdata 137648maxresident)k
  1856inputs+48outputs (11major+19603minor)pagefaults 0swaps

  $ git fetch --no-tags ../remote.git
  6.15user 0.08system 0:06.25elapsed 99%CPU (0avgtext+0avgdata 123856maxresident)k
  0inputs+40outputs (0major+18872minor)pagefaults 0swaps

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd
Rafael Gieschke [Thu, 19 May 2011 11:37:55 +0000 (13:37 +0200)]
ident: add NO_GECOS_IN_PWENT for systems without pw_gecos in struct passwd

Allow NO_GECOS_IN_PWENT to be defined in the Makefile for platforms that
lack the pw_gecos field in their "struct passwd", in which case the
uppercased user name is used instead via the standard '&' replacement
mechanism.

Signed-off-by: Rafael Gieschke <rafael@gieschke.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoprovide a copy of the LGPLv2.1
Jonathan Nieder [Thu, 19 May 2011 15:14:25 +0000 (10:14 -0500)]
provide a copy of the LGPLv2.1

The LGPL seems to require providing a copy of the license when
distributing xdiff, compat/fnmatch, and so on, or altering the license
notices to refer to the GPL intead.  Since we don't want to do the
latter, let's do the former.  It's nice to let people know their
rights anyway.

Inspired-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosha1_object_info_extended(): expose a bit more info
Junio C Hamano [Thu, 12 May 2011 22:51:38 +0000 (15:51 -0700)]
sha1_object_info_extended(): expose a bit more info

The original interface for sha1_object_info() takes an object name and
gives back a type and its size (the latter is given only when it was
asked).  The new interface wraps its implementation and exposes a bit
more pieces of information that the interface used to discard, namely:

 - where the object is stored (loose? cached? packed?)
 - if packed, where in which packfile?

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

 * In the earlier round, this used u.pack.delta to record the length of
   the delta chain, but the caller is not necessarily interested in the
   length of the delta chain per-se, but may only want to know if it is a
   delta against another object or is stored as a deflated data. Calling
   packed_object_info_detail() involves walking the reverse index chain to
   compute the store size of the object and is unnecessarily expensive.

   We could resurrect the code if a new caller wants to know, but I doubt
   it.