Code

git.git
12 years agol10n: leave leading space unchanged for zh_CN.po
ws3389 [Wed, 29 Feb 2012 12:53:26 +0000 (20:53 +0800)]
l10n: leave leading space unchanged for zh_CN.po

Signed-off-by: ws3389 <willsmith3389@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoMerge pull request from jiangxin/master
Jiang Xin [Tue, 28 Feb 2012 16:40:07 +0000 (00:40 +0800)]
Merge pull request from jiangxin/master

l10n: translation for Simplified Chinese.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agol10n: update Chinese translation to the new git.po
Jiang Xin [Tue, 28 Feb 2012 04:24:54 +0000 (12:24 +0800)]
l10n: update Chinese translation to the new git.po

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agol10n: Update git.pot (12 new messages)
Jiang Xin [Tue, 28 Feb 2012 04:24:20 +0000 (12:24 +0800)]
l10n: Update git.pot (12 new messages)

Update file 'po/git.pot' to v1.7.9.2-315-g25a78 (Merge branch 'maint'),
with 12 new string additions.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoMerge branch 'master' into git-po
Jiang Xin [Tue, 28 Feb 2012 04:23:26 +0000 (12:23 +0800)]
Merge branch 'master' into git-po

12 years agoMerge branch 'maint'
Junio C Hamano [Mon, 27 Feb 2012 23:37:02 +0000 (15:37 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.9.3
  CodingGuidelines: do not use 'which' in shell scripts
  CodingGuidelines: Add a note about spaces after redirection
  post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly
  post-receive-email: remove unused variable

12 years agoUpdate draft release notes to 1.7.9.3
Junio C Hamano [Mon, 27 Feb 2012 23:36:08 +0000 (15:36 -0800)]
Update draft release notes to 1.7.9.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'pj/remote-set-branches-usage-fix' into maint
Junio C Hamano [Mon, 27 Feb 2012 23:33:33 +0000 (15:33 -0800)]
Merge branch 'pj/remote-set-branches-usage-fix' into maint

* pj/remote-set-branches-usage-fix:
  remote: fix set-branches usage and documentation

Conflicts:
builtin/remote.c

12 years agoMerge branch 'jn/gitweb-unborn-head' into maint
Junio C Hamano [Mon, 27 Feb 2012 23:33:26 +0000 (15:33 -0800)]
Merge branch 'jn/gitweb-unborn-head' into maint

* jn/gitweb-unborn-head:
  gitweb: Fix "heads" view when there is no current branch

12 years agoMerge branch 'jn/ancient-meld-support' into maint
Junio C Hamano [Mon, 27 Feb 2012 23:33:07 +0000 (15:33 -0800)]
Merge branch 'jn/ancient-meld-support' into maint

* jn/ancient-meld-support:
  mergetools/meld: Use --help output to detect --output support

12 years agoMerge branch 'tr/merge-edit-guidance' into maint
Junio C Hamano [Mon, 27 Feb 2012 23:31:50 +0000 (15:31 -0800)]
Merge branch 'tr/merge-edit-guidance' into maint

* tr/merge-edit-guidance:
  merge: add instructions to the commit message when editing

12 years agoCodingGuidelines: do not use 'which' in shell scripts
Tim Henigan [Fri, 24 Feb 2012 23:12:58 +0000 (18:12 -0500)]
CodingGuidelines: do not use 'which' in shell scripts

During the code review of a recent patch, it was noted that shell scripts
must not use 'which $cmd' to check the availability of the command $cmd.
The output of the command is not machine parseable and its exit code is
not reliable across platforms.

It is better to use 'type' to accomplish this task.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoCodingGuidelines: Add a note about spaces after redirection
Tim Henigan [Fri, 24 Feb 2012 23:12:57 +0000 (18:12 -0500)]
CodingGuidelines: Add a note about spaces after redirection

During code review of some patches, it was noted that redirection operators
should have space before, but no space after them.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: missing she-bang line in t9804 confuses prove
Zbigniew Jędrzejewski-Szmek [Mon, 27 Feb 2012 17:40:14 +0000 (18:40 +0100)]
git-p4: missing she-bang line in t9804 confuses prove

Without the magic line, prove shows lots and lots of errors:
% prove ./t9804-git-p4-label.sh
./t9804-git-p4-label.sh .. syntax error at ./t9804-git-p4-label.sh line 3, near ". ."
...

When #!/bin/sh is added, tests are skipped (I have no p4d).

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogrep -P: add tests for matching ^ and $
Michał Kiedrowicz [Mon, 27 Feb 2012 16:45:49 +0000 (17:45 +0100)]
grep -P: add tests for matching ^ and $

Earlier, fba4f1 (grep -P: Fix matching ^ and $) fixed an ancient bug.  Add
some tests to protect the change from future breakages; a slightly broken
version of this was a part of the originally submitted patch.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopost-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly
Michael Haggerty [Mon, 27 Feb 2012 18:34:10 +0000 (19:34 +0100)]
post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctly

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopost-receive-email: remove unused variable
Michael Haggerty [Mon, 27 Feb 2012 18:34:09 +0000 (19:34 +0100)]
post-receive-email: remove unused variable

prep_for_email neither is passed a fourth argument nor uses it.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agosend-email: document the --smtp-debug option
Zbigniew Jędrzejewski-Szmek [Mon, 27 Feb 2012 16:22:53 +0000 (17:22 +0100)]
send-email: document the --smtp-debug option

The option was already shown in -h output, so it should be documented
in the man page.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Suggested-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agol10n: fast-forward here is ff-only merge, not push
Yichao Yu [Thu, 2 Feb 2012 08:43:01 +0000 (03:43 -0500)]
l10n: fast-forward here is ff-only merge, not push

Signed-off-by: Yichao Yu <yyc1992@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agol10n: update zh_CN translation for "Fetching %s"
Riku [Thu, 2 Feb 2012 08:40:12 +0000 (16:40 +0800)]
l10n: update zh_CN translation for "Fetching %s"

Signed-off-by: Riku <lu.riku@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Mon, 27 Feb 2012 07:11:10 +0000 (23:11 -0800)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jn/gitweb-search-optim'
Junio C Hamano [Mon, 27 Feb 2012 07:05:56 +0000 (23:05 -0800)]
Merge branch 'jn/gitweb-search-optim'

* jn/gitweb-search-optim:
  gitweb: Faster project search
  gitweb: Option for filling only specified info in fill_project_list_info
  gitweb: Refactor checking if part of project info need filling

12 years agoMerge branch 'tr/maint-bundle-long-subject'
Junio C Hamano [Mon, 27 Feb 2012 07:05:51 +0000 (23:05 -0800)]
Merge branch 'tr/maint-bundle-long-subject'

* tr/maint-bundle-long-subject:
  t5704: match tests to modern style
  strbuf: improve strbuf_get*line documentation
  bundle: use a strbuf to scan the log for boundary commits
  bundle: put strbuf_readline_fd in strbuf.c with adjustments

12 years agoMerge branch 'sp/smart-http-failure-to-push'
Junio C Hamano [Mon, 27 Feb 2012 07:05:48 +0000 (23:05 -0800)]
Merge branch 'sp/smart-http-failure-to-push'

* sp/smart-http-failure-to-push:
  : Mask SIGPIPE on the command channel going to a transport helper
  disconnect from remote helpers more gently

Conflicts:
transport-helper.c

12 years agoMerge branch 'fc/push-prune'
Junio C Hamano [Mon, 27 Feb 2012 07:05:45 +0000 (23:05 -0800)]
Merge branch 'fc/push-prune'

* fc/push-prune:
  push: add '--prune' option
  remote: refactor code into alloc_delete_ref()
  remote: reorganize check_pattern_match()
  remote: use a local variable in match_push_refs()

Conflicts:
builtin/push.c

12 years agoMerge branch 'jc/doc-merge-options'
Junio C Hamano [Mon, 27 Feb 2012 07:05:42 +0000 (23:05 -0800)]
Merge branch 'jc/doc-merge-options'

* jc/doc-merge-options:
  Documentation/merge-options.txt: group "ff" related options together

12 years agoMerge branch 'jk/maint-avoid-streaming-filtered-contents'
Junio C Hamano [Mon, 27 Feb 2012 07:05:38 +0000 (23:05 -0800)]
Merge branch 'jk/maint-avoid-streaming-filtered-contents'

* jk/maint-avoid-streaming-filtered-contents:
  do not stream large files to pack when filters are in use
  teach dry-run convert_to_git not to require a src buffer
  teach convert_to_git a "dry run" mode

12 years agoMerge branch 'jb/filter-ignore-sigpipe'
Junio C Hamano [Mon, 27 Feb 2012 07:05:31 +0000 (23:05 -0800)]
Merge branch 'jb/filter-ignore-sigpipe'

* jb/filter-ignore-sigpipe:
  Ignore SIGPIPE when running a filter driver

12 years agopack-objects: Fix compilation with NO_PTHREDS
Michał Kiedrowicz [Sat, 25 Feb 2012 08:16:09 +0000 (09:16 +0100)]
pack-objects: Fix compilation with NO_PTHREDS

It looks like commit 99fb6e04 (pack-objects: convert to use
parse_options(), 2012-02-01) moved the #ifdef NO_PTHREDS around but
hasn't noticed that the 'arg' variable no longer is available.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Mon, 27 Feb 2012 01:13:07 +0000 (17:13 -0800)]
Merge branch 'maint'

* maint:
  Document accumulated fixes since 1.7.9.2
  Git 1.7.8.5
  grep -P: Fix matching ^ and $
  am: don't infloop for an empty input file
  rebase -m: only call "notes copy" when rewritten exists and is non-empty
  git-p4: remove bash-ism in t9800
  git-p4: remove bash-ism in t9809
  git-p4: fix submit regression with clientSpec and subdir clone
  git-p4: set useClientSpec variable on initial clone
  Makefile: add thread-utils.h to LIB_H

Conflicts:
RelNotes
t/t9809-git-p4-client-view.sh

12 years agoDocument accumulated fixes since 1.7.9.2
Junio C Hamano [Mon, 27 Feb 2012 01:08:59 +0000 (17:08 -0800)]
Document accumulated fixes since 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/add-refresh-unmerged' into maint
Junio C Hamano [Mon, 27 Feb 2012 01:06:23 +0000 (17:06 -0800)]
Merge branch 'jc/add-refresh-unmerged' into maint

* jc/add-refresh-unmerged:
  refresh_index: do not show unmerged path that is outside pathspec

12 years agoMerge branch 'js/configure-libintl' into maint
Junio C Hamano [Mon, 27 Feb 2012 01:04:53 +0000 (17:04 -0800)]
Merge branch 'js/configure-libintl' into maint

* js/configure-libintl:
  configure: don't use -lintl when there is no gettext support

12 years agoSync with 1.7.8.5
Junio C Hamano [Mon, 27 Feb 2012 00:42:35 +0000 (16:42 -0800)]
Sync with 1.7.8.5

12 years agoGit 1.7.8.5 v1.7.8.5
Junio C Hamano [Mon, 27 Feb 2012 00:40:20 +0000 (16:40 -0800)]
Git 1.7.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogrep -P: Fix matching ^ and $
Michał Kiedrowicz [Sat, 25 Feb 2012 09:24:28 +0000 (10:24 +0100)]
grep -P: Fix matching ^ and $

When "git grep" is run with -P/--perl-regexp, it doesn't match ^ and $ at
the beginning/end of the line.  This is because PCRE normally matches ^
and $ at the beginning/end of the whole text, not for each line, and "git
grep" passes a large chunk of text (possibly containing many lines) to
pcre_exec() and then splits the text into lines.

This makes "git grep -P" behave differently from "git grep -E" and also
from "grep -P" and "pcregrep":

$ cat file
a
 b
$ git grep --no-index -P '^ ' file
$ git grep --no-index -E '^ ' file
file: b
$ grep -c -P '^ ' file
 b
$ pcregrep -c '^ ' file
 b

Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoam: don't infloop for an empty input file
Jim Meyering [Sat, 25 Feb 2012 17:34:26 +0000 (18:34 +0100)]
am: don't infloop for an empty input file

git-am.sh's check_patch_format function would attempt to preview
the patch to guess its format, but would go into an infinite loop
when the patch file happened to be empty.  The solution: exit the
loop when "read" fails, not when the line var, "$l1" becomes empty.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agorebase -m: only call "notes copy" when rewritten exists and is non-empty
Andrew Wong [Sat, 25 Feb 2012 04:31:22 +0000 (23:31 -0500)]
rebase -m: only call "notes copy" when rewritten exists and is non-empty

This prevents a shell error complaining rebase-merge/rewritten doesn't exist.

Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: remove bash-ism in t9800
Pete Wyckoff [Sun, 26 Feb 2012 15:37:27 +0000 (10:37 -0500)]
git-p4: remove bash-ism in t9800

This works in both bash and dash:

    $ bash -c 'VAR=1 env' | grep VAR
    VAR=1
    $ dash -c 'VAR=1 env' | grep VAR
    VAR=1

But environment variables assigned this way are not necessarily propagated
through a function in POSIX compliant shells:

    $ bash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR
    VAR=1
    $ dash -c 'f() { "$@"
    }; VAR=1 f "env"' | grep VAR

Fix constructs like this, in particular, setting variables through
test_must_fail.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: remove bash-ism in t9809
Pete Wyckoff [Sun, 26 Feb 2012 15:37:26 +0000 (10:37 -0500)]
git-p4: remove bash-ism in t9809

Plain old $# works to count the number of arguments in
either bash or dash, even if the arguments have spaces.

Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: fix submit regression with clientSpec and subdir clone
Pete Wyckoff [Sun, 26 Feb 2012 01:06:25 +0000 (20:06 -0500)]
git-p4: fix submit regression with clientSpec and subdir clone

When the --use-client-spec is given to clone, and the clone
path is a subset of the full tree as specified in the client,
future submits will go to the wrong place.

Factor out getClientSpec() so both clone/sync and submit can
use it.  Introduce getClientRoot() that is needed for the client
spec case, and use it instead of p4Where().

Test the five possible submit behaviors (add, modify, rename,
copy, delete).

Reported-by: Laurent Charrière <lcharriere@promptu.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: set useClientSpec variable on initial clone
Pete Wyckoff [Sun, 26 Feb 2012 01:06:24 +0000 (20:06 -0500)]
git-p4: set useClientSpec variable on initial clone

If --use-client-spec was given, set the matching configuration
variable.  This is necessary to ensure that future submits
work properly.

The alternatives of requiring the user to set it, or providing
a command-line option on every submit, are error prone.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMakefile: add thread-utils.h to LIB_H
Dmitry V. Levin [Fri, 24 Feb 2012 23:42:42 +0000 (03:42 +0400)]
Makefile: add thread-utils.h to LIB_H

Starting with commit v1.7.8-165-g0579f91, grep.h includes
thread-utils.h, so the latter has to be added to LIB_H.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodo not stream large files to pack when filters are in use
Jeff King [Fri, 24 Feb 2012 22:10:17 +0000 (17:10 -0500)]
do not stream large files to pack when filters are in use

Because git's object format requires us to specify the
number of bytes in the object in its header, we must know
the size before streaming a blob into the object database.
This is not a problem when adding a regular file, as we can
get the size from stat(). However, when filters are in use
(such as autocrlf, or the ident, filter, or eol
gitattributes), we have no idea what the ultimate size will
be.

The current code just punts on the whole issue and ignores
filter configuration entirely for files larger than
core.bigfilethreshold. This can generate confusing results
if you use filters for large binary files, as the filter
will suddenly stop working as the file goes over a certain
size.  Rather than try to handle unknown input sizes with
streaming, this patch just turns off the streaming
optimization when filters are in use.

This has a slight performance regression in a very specific
case: if you have autocrlf on, but no gitattributes, a large
binary file will avoid the streaming code path because we
don't know beforehand whether it will need conversion or
not. But if you are handling large binary files, you should
be marking them as such via attributes (or at least not
using autocrlf, and instead marking your text files as
such). And the flip side is that if you have a large
_non_-binary file, there is a correctness improvement;
before we did not apply the conversion at all.

The first half of the new t1051 script covers these failures
on input. The second half tests the matching output code
paths. These already work correctly, and do not need any
adjustment.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoteach dry-run convert_to_git not to require a src buffer
Jeff King [Fri, 24 Feb 2012 22:05:03 +0000 (17:05 -0500)]
teach dry-run convert_to_git not to require a src buffer

When we call convert_to_git in dry-run mode, it may still
want to look at the source buffer, because some CRLF
conversion modes depend on analyzing the source to determine
whether it is in fact convertible CRLF text.

However, the main motivation for convert_to_git's dry-run
mode is that we would decide which method to use to acquire
the blob's data (streaming versus in-core). Requiring this
source analysis creates a chicken-and-egg problem. We are
better off simply guessing that anything we can't analyze
will end up needing conversion.

This patch lets a caller specify a NULL src buffer when
using dry-run mode (and only dry-run mode). A non-zero
return value goes from "we would convert" to "we might
convert"; a zero return value remains "we would definitely
not convert".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoteach convert_to_git a "dry run" mode
Jeff King [Fri, 24 Feb 2012 22:02:37 +0000 (17:02 -0500)]
teach convert_to_git a "dry run" mode

Some callers may want to know whether convert_to_git will
actually do anything before performing the conversion
itself (e.g., to decide whether to stream or handle blobs
in-core). This patch lets callers specify the dry run mode
by passing a NULL destination buffer. The return value,
instead of indicating whether conversion happened, will
indicate whether conversion would occur.

For readability, we also include a wrapper function which
makes it more obvious we are not actually performing the
conversion.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot5704: match tests to modern style
Thomas Rast [Thu, 23 Feb 2012 09:42:23 +0000 (10:42 +0100)]
t5704: match tests to modern style

The test did not adhere to the current style on several counts:

 . empty lines around the test blocks, but within the test string
 . ': > file' or even just '> file' with an extra space
 . inconsistent indentation
 . hand-rolled commits instead of using test_commit

Fix all of them.

There's a catch to the last point: test_commit creates a tag, which the
original test did not create.  We still change it to test_commit, and
explicitly delete the tags, so as to highlight that the test relies on not
having them.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agostrbuf: improve strbuf_get*line documentation
Thomas Rast [Thu, 23 Feb 2012 09:42:21 +0000 (10:42 +0100)]
strbuf: improve strbuf_get*line documentation

Clarify strbuf_getline() documentation, and add the missing documentation
for strbuf_getwholeline() and strbuf_getwholeline_fd().

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Thu, 23 Feb 2012 21:38:50 +0000 (13:38 -0800)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'ld/git-p4-expanded-keywords'
Junio C Hamano [Thu, 23 Feb 2012 21:30:31 +0000 (13:30 -0800)]
Merge branch 'ld/git-p4-expanded-keywords'

* ld/git-p4-expanded-keywords:
  : Teach git-p4 to unexpand $RCS$-like keywords that are embedded in
  : tracked contents in order to reduce unnecessary merge conflicts.
  git-p4: add initial support for RCS keywords

12 years agoMerge branch 'jk/config-include'
Junio C Hamano [Thu, 23 Feb 2012 21:30:14 +0000 (13:30 -0800)]
Merge branch 'jk/config-include'

* jk/config-include:
  : An assignment to the include.path pseudo-variable causes the named file
  : to be included in-place when Git looks up configuration variables.
  config: add include directive
  config: eliminate config_exclusive_filename
  config: stop using config_exclusive_filename
  config: provide a version of git_config with more options
  config: teach git_config_rename_section a file argument
  config: teach git_config_set_multivar_in_file a default path
  config: copy the return value of prefix_filename
  t1300: add missing &&-chaining
  docs/api-config: minor clarifications
  docs: add a basic description of the config API

12 years agoMerge branch 'jc/add-refresh-unmerged'
Junio C Hamano [Thu, 23 Feb 2012 21:30:10 +0000 (13:30 -0800)]
Merge branch 'jc/add-refresh-unmerged'

* jc/add-refresh-unmerged:
  refresh_index: do not show unmerged path that is outside pathspec

12 years agoMerge branch 'js/configure-libintl'
Junio C Hamano [Thu, 23 Feb 2012 21:30:04 +0000 (13:30 -0800)]
Merge branch 'js/configure-libintl'

* js/configure-libintl:
  configure: don't use -lintl when there is no gettext support

12 years agoMerge branch 'pj/remote-set-branches-usage-fix'
Junio C Hamano [Thu, 23 Feb 2012 21:30:00 +0000 (13:30 -0800)]
Merge branch 'pj/remote-set-branches-usage-fix'

* pj/remote-set-branches-usage-fix:
  remote: fix set-branches usage and documentation

Conflicts:
builtin/remote.c

12 years agoMerge branch 'tr/perftest'
Junio C Hamano [Thu, 23 Feb 2012 21:29:56 +0000 (13:29 -0800)]
Merge branch 'tr/perftest'

* tr/perftest:
  Add a performance test for git-grep
  Introduce a performance testing framework
  Move the user-facing test library to test-lib-functions.sh

12 years agoMerge branch 'maint'
Junio C Hamano [Thu, 23 Feb 2012 21:29:10 +0000 (13:29 -0800)]
Merge branch 'maint'

* maint:
  README: point to Documentation/SubmittingPatches
  Document merge.branchdesc configuration variable

12 years agogit-p4: add initial support for RCS keywords
Luke Diamand [Thu, 23 Feb 2012 07:51:30 +0000 (07:51 +0000)]
git-p4: add initial support for RCS keywords

RCS keywords cause problems for git-p4 as perforce always
expands them (if +k is set) and so when applying the patch,
git reports that the files have been modified by both sides,
when in fact they haven't.

This change means that when git-p4 detects a problem applying
a patch, it will check to see if keyword expansion could be
the culprit. If it is, it strips the keywords in the p4
repository so that they match what git is expecting. It then
has another go at applying the patch.

This behaviour is enabled with a new git-p4 configuration
option and is off by default.

Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Faster project search
Jakub Narebski [Thu, 23 Feb 2012 15:54:48 +0000 (16:54 +0100)]
gitweb: Faster project search

Before searching by some field the information we search for must be
filled in, but we do not have to fill other fields that are not
involved in the search.

To be able to request filling only specified fields,
fill_project_list_info() was enhanced in previous commit to take
additional parameters which specify part of projects info to fill.
This way we can limit doing expensive calculations (like running
git-for-each-ref to get 'age' / "Last changed" info) to doing those
only for projects which we will show as search results.

This commit actually uses this interface, changing gitweb code from
the following behavior

  fill all project info on all projects
  search projects

to behaving like this pseudocode

  fill search fields on all projects
  search projects
  fill all project info on search results

With this commit the number of git commands used to generate search
results is 2*<matched projects> + 1, and depends on number of matched
projects rather than number of all projects (all repositories).

Note: this is 'git for-each-ref' to find last activity, and 'git config'
for each project, and 'git --version' once.

Example performance improvements, for search that selects 2
repositories out of 12 in total:

* Before (warm cache):
  "This page took 0.867151 seconds  and 27 git commands to generate."

* After (warm cache):
  "This page took 0.673643 seconds  and 5 git commands to generate."

Now imagine that they are 5 repositories out of 5000, and cold or
trashed cache case.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Option for filling only specified info in fill_project_list_info
Jakub Narebski [Thu, 23 Feb 2012 15:54:47 +0000 (16:54 +0100)]
gitweb: Option for filling only specified info in fill_project_list_info

Enhance fill_project_list_info() subroutine to accept optional
parameters that specify which fields in project information needs to
be filled.  If none are specified then fill_project_list_info()
behaves as it used to, and ensure that all project info is filled.

This is in preparation of future lazy filling of project info in
project search and pagination of sorted list of projects.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb: Refactor checking if part of project info need filling
Jakub Narebski [Thu, 23 Feb 2012 15:54:46 +0000 (16:54 +0100)]
gitweb: Refactor checking if part of project info need filling

Extract the check if given keys (given parts) of project info needs to
be filled into project_info_needs_filling() subroutine.  It is for now
a thin wrapper around "!exists $project_info->{$key}".

Note that !defined was replaced by more correct !exists.

While at it uniquify treating of all project info, adding checks for
'age' field before running git_get_last_activity(), and also checking
for all keys filled in code protected by conditional, and not only
one.

The code now looks like this

  foreach my $project (@$project_list) {
   if (given keys need to be filled) {
   fill given keys
   }
   ...
  }

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomerge: do not trust fstat(2) too much when checking interactiveness
Junio C Hamano [Thu, 23 Feb 2012 19:24:44 +0000 (11:24 -0800)]
merge: do not trust fstat(2) too much when checking interactiveness

The heuristic used by "git merge" to decide if it automatically gives an
editor upon clean automerge is to see if the standard input and the
standard output is the same device and is a tty, we are in an interactive
session.  "The same device" test was done by comparing fstat(2) result on
the two file descriptors (and they must match), and we asked isatty() only
for the standard input (we insist that they are the same device and there
is no point asking tty-ness of the standard output).

The stat(2) emulation in the Windows port however does not give a usable
value in the st_ino field, so even if the standard output is connected to
something different from the standard input, "The same device" test may
incorrectly return true. To accomodate it, add another isatty() check for
the standard output stream as well.

Reported-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoREADME: point to Documentation/SubmittingPatches
Matthieu Moy [Thu, 23 Feb 2012 12:52:06 +0000 (13:52 +0100)]
README: point to Documentation/SubmittingPatches

It was indeed not obvious for new contributors to find this document in
the source tree, since there were no reference to it outside the
Documentation/ directory.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocument merge.branchdesc configuration variable
Junio C Hamano [Thu, 23 Feb 2012 19:20:15 +0000 (11:20 -0800)]
Document merge.branchdesc configuration variable

This was part of the "branch description" feature in the larger
"help people communicate better during their pull based workflow"
topic, but was never documented.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodisconnect from remote helpers more gently
Jeff King [Thu, 23 Feb 2012 10:04:34 +0000 (05:04 -0500)]
disconnect from remote helpers more gently

When git spawns a remote helper program (like git-remote-http),
the last thing we do before closing the pipe to the child
process is to send a blank line, telling the helper that we
are done issuing commands. However, the helper may already
have exited, in which case the parent git process will
receive SIGPIPE and die.

In particular, this can happen with the remote-curl helper
when it encounters errors during a push. The helper reports
individual errors for each ref back to git-push, and then
exits with a non-zero exit code. Depending on the exact
timing of the write, the parent process may or may not
receive SIGPIPE.

This causes intermittent test failure in t5541.8, and is a
side effect of 5238cbf (remote-curl: Fix push status report
when all branches fail). Before that commit, remote-curl
would not send the final blank line to indicate that the
list of status lines was complete; it would just exit,
closing the pipe. The parent git-push would notice the
closed pipe while reading the status report and exit
immediately itself, propagating the failing exit code. But
post-5238cbf, remote-curl completes the status list before
exiting, git-push actually runs to completion, and then it
tries to cleanly disconnect the helper, leading to the
SIGPIPE race above.

This patch drops all error-checking when sending the final
"we are about to hang up" blank line to helpers. There is
nothing useful for the parent process to do about errors at
that point anyway, and certainly failing to send our "we are
done with commands" line to a helper that has already exited
is not a problem.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobundle: use a strbuf to scan the log for boundary commits
Thomas Rast [Wed, 22 Feb 2012 19:34:23 +0000 (20:34 +0100)]
bundle: use a strbuf to scan the log for boundary commits

The first part of the bundle header contains the boundary commits, and
could be approximated by

  # v2 git bundle
  $(git rev-list --pretty=oneline --boundary <ARGS> | grep ^-)

git-bundle actually spawns exactly this rev-list invocation, and does
the grepping internally.

There was a subtle bug in the latter step: it used fgets() with a
1024-byte buffer.  If the user has sufficiently long subjects (e.g.,
by not adhering to the git oneline-subject convention in the first
place), the 'oneline' format can easily overflow the buffer.  fgets()
then returns the rest of the line in the next call(s).  If one of
these remaining parts started with '-', git-bundle would mistakenly
insert it into the bundle thinking it was a boundary commit.

Fix it by using strbuf_getwholeline() instead, which handles arbitrary
line lengths correctly.

Note that on the receiving side in parse_bundle_header() we were
already using strbuf_getwholeline_fd(), so that part is safe.

Reported-by: Jannis Pohlmann <jannis.pohlmann@codethink.co.uk>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobundle: put strbuf_readline_fd in strbuf.c with adjustments
Thomas Rast [Wed, 22 Feb 2012 19:34:22 +0000 (20:34 +0100)]
bundle: put strbuf_readline_fd in strbuf.c with adjustments

The comment even said that it should eventually go there.  While at
it, match the calling convention and name of the function to the
strbuf_get*line family.  So it now is strbuf_getwholeline_fd.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopush: add '--prune' option
Felipe Contreras [Wed, 22 Feb 2012 22:43:41 +0000 (00:43 +0200)]
push: add '--prune' option

When pushing groups of refs to a remote, there is no simple way to remove
old refs that still exist at the remote that is no longer updated from us.
This will allow us to remove such refs from the remote.

With this change, running this command

 $ git push --prune remote refs/heads/*:refs/remotes/laptop/*

removes refs/remotes/laptop/foo from the remote if we do not have branch
"foo" locally anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.9.2
Junio C Hamano [Thu, 23 Feb 2012 01:49:02 +0000 (17:49 -0800)]
Sync with 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.7.9.2 v1.7.9.2
Junio C Hamano [Thu, 23 Feb 2012 01:48:01 +0000 (17:48 -0800)]
Git 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: refactor code into alloc_delete_ref()
Felipe Contreras [Wed, 22 Feb 2012 22:43:40 +0000 (00:43 +0200)]
remote: refactor code into alloc_delete_ref()

Will be useful in next patches. No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: reorganize check_pattern_match()
Felipe Contreras [Wed, 22 Feb 2012 22:43:39 +0000 (00:43 +0200)]
remote: reorganize check_pattern_match()

The function match_name_with_pattern() is called twice, once to see if a
pattern matches with the name, and again to learn what the matched pattern
maps the name to.  Since check_pattern_match() is only used in one place,
we can just reorganize it to make a single call and fetch the values at
the same time.

This changes the meaning of check_pattern_match() that used to check which
pattern in the array of refspecs matched the given ref, to return the name
of the remote ref the given ref is mapped to.

Rename it to get_ref_match() which actually describes more closely what
it's actually doing now.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoremote: use a local variable in match_push_refs()
Felipe Contreras [Wed, 22 Feb 2012 22:43:38 +0000 (00:43 +0200)]
remote: use a local variable in match_push_refs()

So that we can reuse src later on. No functional changes.

Will be useful in next patches.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/merge-options.txt: group "ff" related options together
Junio C Hamano [Wed, 22 Feb 2012 22:27:07 +0000 (14:27 -0800)]
Documentation/merge-options.txt: group "ff" related options together

The --ff-only option was not described next to --ff and --no-ff options in
"git merge" documentation, even though these three are logically together,
describing how to choose one of three possibilities.

Also the description for '--ff' and '--no-ff' discussed what '--ff' means,
and mentioned '--no-ff' as if it were a side-note to '--ff'.

Make them into three top-level entries and list them together. This way,
it would be more clear that the user can choose one from these three.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: use tabs for indentation
Philip Jägenstedt [Wed, 22 Feb 2012 08:58:13 +0000 (09:58 +0100)]
completion: use tabs for indentation

CodingGuidlines confidently declares "We use tabs for indentation."
It would be a shame if it were caught lying.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompletion: remove stale "to submit patches" documentation
Philip Jägenstedt [Wed, 22 Feb 2012 08:58:12 +0000 (09:58 +0100)]
completion: remove stale "to submit patches" documentation

It was out-of-sync with the reality of who works on this
script. Defer (silently) to Documentation/SubmittingPatches
like all other code.

Signed-off-by: Philip Jägenstedt <philip@foolip.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-p4: the option to specify 'host' is -H, not -h
Russell Myers [Wed, 22 Feb 2012 19:16:05 +0000 (11:16 -0800)]
git-p4: the option to specify 'host' is -H, not -h

This was broken since the feature was introduced initially at abcaf07 (If
the user has configured various parameters, use them., 2008-08-10).

Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9100: remove bogus " || test" after each test scriptlet
Junio C Hamano [Wed, 22 Feb 2012 05:10:33 +0000 (21:10 -0800)]
t9100: remove bogus " || test" after each test scriptlet

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'master' of git://bogomips.org/git-svn
Junio C Hamano [Wed, 22 Feb 2012 02:11:31 +0000 (18:11 -0800)]
Merge branch 'master' of git://bogomips.org/git-svn

* 'master' of git://bogomips.org/git-svn:
  git-svn.perl: fix a false-positive in the "already exists" test
  git-svn.perl: perform deletions before anything else
  git-svn: Fix time zone in --localtime
  git-svn: un-break "git svn rebase" when log.abbrevCommit=true
  git-svn: remove redundant porcelain option to rev-list
  completion: add --interactive option to git svn dcommit

12 years agoUpdate draft release notes to 1.7.10
Junio C Hamano [Tue, 21 Feb 2012 23:29:29 +0000 (15:29 -0800)]
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jn/gitweb-unborn-head'
Junio C Hamano [Tue, 21 Feb 2012 23:25:53 +0000 (15:25 -0800)]
Merge branch 'jn/gitweb-unborn-head'

* jn/gitweb-unborn-head:
  gitweb: Fix "heads" view when there is no current branch

12 years agoMerge branch 'jk/diff-highlight'
Junio C Hamano [Tue, 21 Feb 2012 23:25:39 +0000 (15:25 -0800)]
Merge branch 'jk/diff-highlight'

* jk/diff-highlight:
  diff-highlight: document some non-optimal cases
  diff-highlight: match multi-line hunks
  diff-highlight: refactor to prepare for multi-line hunks
  diff-highlight: don't highlight whole lines
  diff-highlight: make perl strict and warnings fatal

12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 21 Feb 2012 23:18:00 +0000 (15:18 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.7.9.2
  completion: Allow dash as the first character for __git_ps1

12 years agoUpdate draft release notes to 1.7.9.2
Junio C Hamano [Tue, 21 Feb 2012 23:16:34 +0000 (15:16 -0800)]
Update draft release notes to 1.7.9.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'cb/receive-pack-keep-errors' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:14:41 +0000 (15:14 -0800)]
Merge branch 'cb/receive-pack-keep-errors' into maint

* cb/receive-pack-keep-errors:
  do not override receive-pack errors

12 years agoMerge branch 'cb/transfer-no-progress' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:14:37 +0000 (15:14 -0800)]
Merge branch 'cb/transfer-no-progress' into maint

* cb/transfer-no-progress:
  push/fetch/clone --no-progress suppresses progress output

12 years agoMerge branch 'jk/git-dir-lookup' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:13:16 +0000 (15:13 -0800)]
Merge branch 'jk/git-dir-lookup' into maint

* jk/git-dir-lookup:
  standardize and improve lookup rules for external local repos

12 years agoMerge branch 'jc/diff-stat-scaler' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:00:33 +0000 (15:00 -0800)]
Merge branch 'jc/diff-stat-scaler' into maint

* jc/diff-stat-scaler:
  diff --stat: show bars of same length for paths with same amount of changes

12 years agoMerge branch 'zj/term-columns' into maint
Junio C Hamano [Tue, 21 Feb 2012 23:00:15 +0000 (15:00 -0800)]
Merge branch 'zj/term-columns' into maint

* zj/term-columns:
  pager: find out the terminal width before spawning the pager

12 years agoMerge branch 'cb/maint-rev-list-verify-object' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:59:35 +0000 (14:59 -0800)]
Merge branch 'cb/maint-rev-list-verify-object' into maint

* cb/maint-rev-list-verify-object:
  git rev-list: fix invalid typecast

12 years agoMerge branch 'cb/maint-t5541-make-server-port-portable' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:57:40 +0000 (14:57 -0800)]
Merge branch 'cb/maint-t5541-make-server-port-portable' into maint

* cb/maint-t5541-make-server-port-portable:
  t5541: check error message against the real port number used

12 years agoMerge branch 'dp/i18n-libcharset' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:57:14 +0000 (14:57 -0800)]
Merge branch 'dp/i18n-libcharset' into maint

* dp/i18n-libcharset:
  Makefile: introduce CHARSET_LIB to link with -lcharset

12 years agoMerge branch 'jk/grep-binary-attribute' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:57:05 +0000 (14:57 -0800)]
Merge branch 'jk/grep-binary-attribute' into maint

* jk/grep-binary-attribute:
  grep: pre-load userdiff drivers when threaded
  grep: load file data after checking binary-ness
  grep: respect diff attributes for binary-ness
  grep: cache userdiff_driver in grep_source
  grep: drop grep_buffer's "name" parameter
  convert git-grep to use grep_source interface
  grep: refactor the concept of "grep source" into an object
  grep: move sha1-reading mutex into low-level code
  grep: make locking flag global

12 years agoMerge branch 'nd/diffstat-gramnum' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:39 +0000 (14:56 -0800)]
Merge branch 'nd/diffstat-gramnum' into maint

* nd/diffstat-gramnum:
  Use correct grammar in diffstat summary line

12 years agoMerge branch 'nd/find-pack-entry-recent-cache-invalidation' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:36 +0000 (14:56 -0800)]
Merge branch 'nd/find-pack-entry-recent-cache-invalidation' into maint

* nd/find-pack-entry-recent-cache-invalidation:
  find_pack_entry(): do not keep packed_git pointer locally
  sha1_file.c: move the core logic of find_pack_entry() into fill_pack_entry()

12 years agoMerge branch 'tt/profile-build-fix' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:56:06 +0000 (14:56 -0800)]
Merge branch 'tt/profile-build-fix' into maint

* tt/profile-build-fix:
  Makefile: fix syntax for older make
  Fix build problems related to profile-directed optimization

12 years agoMerge branch 'fc/zsh-completion' into maint
Junio C Hamano [Tue, 21 Feb 2012 22:55:50 +0000 (14:55 -0800)]
Merge branch 'fc/zsh-completion' into maint

* fc/zsh-completion:
  completion: simplify __gitcomp and __gitcomp_nl implementations
  completion: use ls -1 instead of rolling a loop to do that ourselves
  completion: work around zsh option propagation bug

12 years agogit-svn.perl: fix a false-positive in the "already exists" test
Steven Walter [Mon, 20 Feb 2012 14:17:54 +0000 (09:17 -0500)]
git-svn.perl: fix a false-positive in the "already exists" test

open_or_add_dir checks to see if the directory already exists or not.
If it already exists and is not a directory, then we fail.  However,
open_or_add_dir did not previously account for the possibility that the
path did exist as a file, but is deleted in the current commit.

In order to prevent this legitimate case from failing, open_or_add_dir
needs to know what files are deleted in the current commit.
Unfortunately that information has to be plumbed through a couple of
layers.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn.perl: perform deletions before anything else
Steven Walter [Thu, 9 Feb 2012 20:52:22 +0000 (15:52 -0500)]
git-svn.perl: perform deletions before anything else

If we delete a file and recreate it as a directory in a single commit,
we have to tell the server about the deletion first or else we'll get
"RA layer request failed: Server sent unexpected return value (405
Method Not Allowed) in response to MKCOL request"

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: Fix time zone in --localtime
Wei-Yin Chen (陳威尹) [Mon, 19 Dec 2011 08:11:05 +0000 (16:11 +0800)]
git-svn: Fix time zone in --localtime

Use numerical form of time zone to replace alphabetic time zone
abbreviation generated by "%Z". "%Z" is not portable and contain
ambiguity for many areas. For example, CST could be "Central
Standard Time" (GMT-0600) and "China Standard Time" (GMT+0800).
Alphabetic time zone abbreviation is meant for human readability,
not for specifying a time zone for machines.

Failed case can be illustrated like this in linux shell:
  > echo $TZ
  Asia/Taipei
  > date +%Z
  CST
  > env TZ=`date +%Z` date
  Mon Dec 19 06:03:04 CST 2011
  > date
  Mon Dec 19 14:03:04 CST 2011

[ew: fixed bad package reference inside Git::SVN::Log]

Signed-off-by: Wei-Yin Chen (陳威尹) <chen.weiyin@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: un-break "git svn rebase" when log.abbrevCommit=true
Ævar Arnfjörð Bjarmason [Sun, 12 Feb 2012 00:23:06 +0000 (00:23 +0000)]
git-svn: un-break "git svn rebase" when log.abbrevCommit=true

Change git-svn to use git-rev-list(1) instead of git-log(1) since the
latter is porcelain that'll cause "git svn rebase" to fail completely
if log.abbrevCommit is set to true in the configuration.

Without this patch the code will fail to parse a SHA1, and then just
spew a bunch of "Use of uninitialized value $hash in string eq"
warnings at "if ($c && $c eq $hash) { ..." and never do anything
useful.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>