git.git
12 years agoFix tests under GETTEXT_POISON on parseopt
Jiang Xin [Mon, 27 Aug 2012 05:36:55 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on parseopt

Use the i18n-specific test functions in test scripts for parseopt tests.
This issue was was introduced in v1.7.10.1-488-g54e6d:

    54e6d i18n: parseopt: lookup help and argument translations when showing usage

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on git-remote
Jiang Xin [Mon, 27 Aug 2012 05:36:54 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on git-remote

Use the i18n-specific test functions in test scripts for git-remote.
This issue was was introduced in v1.7.10-233-gbb16d5:

    bb16d5 i18n: remote: mark strings for translation

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on pack-object
Jiang Xin [Mon, 27 Aug 2012 05:36:53 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on pack-object

Use the i18n-specific test functions in test scripts for pack-object.
This issue was was introduced in v1.7.10.2-556-g46140:

    46140 index-pack: use streaming interface for collision test on large blobs
    cf2ba pack-objects: use streaming interface for reading large loose blobs

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on git-apply
Jiang Xin [Mon, 27 Aug 2012 05:36:52 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on git-apply

Use the i18n-specific test functions in test scripts for git-apply.
This issue was was introduced in the following commits:

    de373 i18n: apply: mark parseopt strings for translation
    3638e i18n: apply: mark strings for translation

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on diffstat
Jiang Xin [Mon, 27 Aug 2012 05:36:51 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on diffstat

Use the i18n-specific test functions in test scripts for diffstat.
This issue was was introduced in v1.7.9-1-g7f814:

    7f814 Use correct grammar in diffstat summary line

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on git-stash
Jiang Xin [Mon, 27 Aug 2012 05:36:50 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on git-stash

Use i18n-specific test functions in test scripts for git-stash.
This issue was was introduced in v1.7.4.1-119-g355ec:

    355ec i18n: git-status basic messages

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoFix tests under GETTEXT_POISON on relative dates
Jiang Xin [Mon, 27 Aug 2012 05:36:49 +0000 (13:36 +0800)]
Fix tests under GETTEXT_POISON on relative dates

Use the i18n-specific test_i18ncmp in t/t0006-date.sh for relative dates
tests. This issue was was introduced in v1.7.10-230-g7d29a:

    7d29a i18n: mark relative dates for translation

and been broken under GETTEXT_POISON=YesPlease since.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodoc: "git checkout -b/-B/--orphan" always takes a branch name
Junio C Hamano [Sun, 26 Aug 2012 18:40:08 +0000 (11:40 -0700)]
doc: "git checkout -b/-B/--orphan" always takes a branch name

While the synopsis section makes it clear that the new branch name
is the parameter to these flags, the option description did not.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoapply: compute patch->def_name correctly under -p0
Junio C Hamano [Sat, 25 Aug 2012 05:48:55 +0000 (22:48 -0700)]
apply: compute patch->def_name correctly under -p0

Back when "git apply" was written, we made sure that the user can
skip more than the default number of path components (i.e. 1) by
giving "-p<n>", but the logic for doing so was built around the
notion of "we skip N slashes and stop".  This obviously does not
work well when running under -p0 where we do not want to skip any,
but still want to skip SP/HT that separates the pathnames of
preimage and postimage and want to reject absolute pathnames.

Stop using "stop_at_slash()", and instead introduce a new helper
"skip_tree_prefix()" with similar logic but works correctly even for
the -p0 case.

This is an ancient bug, but has been masked for a long time because
most of the patches are text and have other clues to tell us the
name of the preimage and the postimage.

Noticed by Colin McCabe.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Fri, 24 Aug 2012 20:13:53 +0000 (13:13 -0700)]
Merge branch 'maint'

* maint:
  Prepare for 1.7.11.6
  Make the ciabot scripts completely self-configuring in the normal case.
  Improved documentation for the ciabot scripts.

12 years agoMerge branch 'maint-1.7.11' into maint
Junio C Hamano [Fri, 24 Aug 2012 19:34:19 +0000 (12:34 -0700)]
Merge branch 'maint-1.7.11' into maint

* maint-1.7.11:
  Prepare for 1.7.11.6
  Make the ciabot scripts completely self-configuring in the normal case.
  Improved documentation for the ciabot scripts.
  man: git pull -r is a short for --rebase
  gitcli: describe abbreviation of long options
  rev-list docs: clarify --topo-order description
  Documentation/CodingGuidelines: spell out more shell guidelines
  Documentation: do not mention .git/refs/* directories
  tests: Introduce test_seq

12 years agoPrepare for 1.7.11.6
Junio C Hamano [Fri, 24 Aug 2012 19:33:31 +0000 (12:33 -0700)]
Prepare for 1.7.11.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'mv/pull-r-for-rebase' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:47 +0000 (12:05 -0700)]
Merge branch 'mv/pull-r-for-rebase' into maint-1.7.11

A minor documentation update.

* mv/pull-r-for-rebase:
  man: git pull -r is a short for --rebase

12 years agoMerge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:44 +0000 (12:05 -0700)]
Merge branch 'jc/maint-abbrev-option-cli' into maint-1.7.11

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
  gitcli: describe abbreviation of long options

12 years agoMerge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:40 +0000 (12:05 -0700)]
Merge branch 'jc/maint-rev-list-topo-doc' into maint-1.7.11

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description

12 years agoMerge branch 'hv/coding-guidelines' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:35 +0000 (12:05 -0700)]
Merge branch 'hv/coding-guidelines' into maint-1.7.11

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines

12 years agoMerge branch 'jc/tag-doc' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:30 +0000 (12:05 -0700)]
Merge branch 'jc/tag-doc' into maint-1.7.11

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories

12 years agoMerge branch 'mk/test-seq' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:24 +0000 (12:05 -0700)]
Merge branch 'mk/test-seq' into maint-1.7.11

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq

12 years agoMerge branch 'lp/no-cmd-http-fetch' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:19 +0000 (12:05 -0700)]
Merge branch 'lp/no-cmd-http-fetch' into maint-1.7.11

* lp/no-cmd-http-fetch:
  builtin.h: remove unused cmd_<foo> declarations

12 years agoMerge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)]
Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11

* bw/maint-1.7.9-solaris-getpass:
  Enable HAVE_DEV_TTY for Solaris
  terminal: seek when switching between reading and writing

12 years agoMerge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11
Junio C Hamano [Fri, 24 Aug 2012 19:05:08 +0000 (12:05 -0700)]
Merge branch 'jk/maint-commit-check-committer-early' into maint-1.7.11

* jk/maint-commit-check-committer-early:
  commit: check committer identity more strictly

12 years agocontrib: add credential helper for GnomeKeyring
Philipp A. Hartmann [Thu, 23 Aug 2012 16:57:45 +0000 (18:57 +0200)]
contrib: add credential helper for GnomeKeyring

With this installed in your $PATH, you can store
git-over-http passwords in your keyring by doing:

git config credential.helper gnome-keyring

The code is based in large part on the work of John Szakmeister
who wrote the helper originally for the initial, unpublished
version of the credential helper protocol.

This version will pass t0303 if you do:

  GIT_TEST_CREDENTIAL_HELPER=gnome-keyring \
  ./t0303-credential-external.sh

Signed-off-by: Philipp A. Hartmann <pah@qo.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocompat: some mkdir() do not like a slash at the end
Joachim Schmitz [Fri, 24 Aug 2012 10:31:03 +0000 (12:31 +0200)]
compat: some mkdir() do not like a slash at the end

Introduce a compatibility helper for platforms with such a mkdir().

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agosha1_file.c: introduce get_max_fd_limit() helper
Joachim Schmitz [Fri, 24 Aug 2012 09:52:22 +0000 (11:52 +0200)]
sha1_file.c: introduce get_max_fd_limit() helper

Not all platforms have getrlimit(), but there are other ways to see
the maximum number of files that a process can have open.  If
getrlimit() is unavailable, fall back to sysconf(_SC_OPEN_MAX) if
available, and use OPEN_MAX from <limits.h>.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMake 'git submodule update --force' always check out submodules.
Stefan Zager [Wed, 25 Jul 2012 17:41:54 +0000 (10:41 -0700)]
Make 'git submodule update --force' always check out submodules.

Currently, it will only do a checkout if the sha1 registered in the containing
repository doesn't match the HEAD of the submodule, regardless of whether the
submodule is dirty.  As discussed on the mailing list, the '--force' flag is a
strong indicator that the state of the submodule is suspect, and should be reset
to HEAD.

Signed-off-by: Stefan Zager <szager@google.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agomergetool: style fixes
Junio C Hamano [Thu, 23 Aug 2012 05:33:15 +0000 (22:33 -0700)]
mergetool: style fixes

This script is one of the sizeable ones that tempted people to copy
its "neibouring style" in their new code, but was littered with
styles incompatible with our style guide.

 - use one tab, not four spaces, per indent level;

 - long lines can be wrapped after '|', '&&', or '||' for
   readability.

 - structures like "if .. then .. else .. fi", "while .. do .. done"
   are split into lines in such a way that does not require
   unnecessary semicolon.

 - case, esac and case-arms align at the same column.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMake the ciabot scripts completely self-configuring in the normal case.
Eric S. Raymond [Thu, 23 Aug 2012 05:21:53 +0000 (01:21 -0400)]
Make the ciabot scripts completely self-configuring in the normal case.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoImproved documentation for the ciabot scripts.
Eric S. Raymond [Thu, 23 Aug 2012 04:10:53 +0000 (00:10 -0400)]
Improved documentation for the ciabot scripts.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agospecifying ranges: we did not mean to make ".." an empty set
Junio C Hamano [Mon, 2 May 2011 20:39:16 +0000 (13:39 -0700)]
specifying ranges: we did not mean to make ".." an empty set

Either end of revision range operator can be omitted to default to HEAD,
as in "origin.." (what did I do since I forked) or "..origin" (what did
they do since I forked).  But the current parser interprets ".."  as an
empty range "HEAD..HEAD", and worse yet, because ".." does exist on the
filesystem, we get this annoying output:

  $ cd Documentation/howto
  $ git log .. ;# give me recent commits that touch Documentation/ area.
  fatal: ambiguous argument '..': both revision and filename
  Use '--' to separate filenames from revisions

Surely we could say "git log ../" or even "git log -- .." to disambiguate,
but we shouldn't have to.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agohttp.c: don't use curl_easy_strerror prior to curl-7.12.0
Joachim Schmitz [Thu, 23 Aug 2012 07:33:55 +0000 (09:33 +0200)]
http.c: don't use curl_easy_strerror prior to curl-7.12.0

Reverts be22d92 (http: avoid empty error messages for some curl
errors, 2011-09-05) on platforms with older versions of libcURL
where the function is not available.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agobranch: introduce --set-upstream-to
Carlos Martín Nieto [Mon, 20 Aug 2012 13:47:38 +0000 (15:47 +0200)]
branch: introduce --set-upstream-to

The existing --set-uptream option can cause confusion, as it uses the
usual branch convention of assuming a starting point of HEAD if none
is specified, causing

    git branch --set-upstream origin/master

to create a new local branch 'origin/master' that tracks the current
branch. As --set-upstream already exists, we can't simply change its
behaviour. To work around this, introduce --set-upstream-to which
accepts a compulsory argument indicating what the new upstream branch
should be and one optinal argument indicating which branch to change,
defaulting to HEAD.

The new options allows us to type

    git branch --set-upstream-to origin/master

to set the current branch's upstream to be origin's master.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUse imperative form in help usage to describe an action
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:55 +0000 (19:32 +0700)]
Use imperative form in help usage to describe an action

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoReduce translations by using same terminologies
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:54 +0000 (19:32 +0700)]
Reduce translations by using same terminologies

Somewhere in help usage, we use both "message" and "msg", "command"
and "cmd", "key id" and "key-id". This patch makes all help text from
parseopt use the first form. Clearer and 3 fewer strings for
translators.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoKick off cycle towards 1.8.0
Junio C Hamano [Wed, 22 Aug 2012 18:49:26 +0000 (11:49 -0700)]
Kick off cycle towards 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Wed, 22 Aug 2012 18:53:58 +0000 (11:53 -0700)]
Merge branch 'maint'

* maint:
  contrib/ciabot: Get ciabot configuration from git variables

12 years agoMerge branch 'jc/doc-git-updates'
Junio C Hamano [Wed, 22 Aug 2012 18:53:36 +0000 (11:53 -0700)]
Merge branch 'jc/doc-git-updates'

A minor documentation update.

* jc/doc-git-updates:
  Documentation: update the introductory section

12 years agoMerge branch 'mv/pull-r-for-rebase'
Junio C Hamano [Wed, 22 Aug 2012 18:53:31 +0000 (11:53 -0700)]
Merge branch 'mv/pull-r-for-rebase'

A minor documentation update.

* mv/pull-r-for-rebase:
  man: git pull -r is a short for --rebase

12 years agoMerge branch 'jc/maint-abbrev-option-cli'
Junio C Hamano [Wed, 22 Aug 2012 18:53:25 +0000 (11:53 -0700)]
Merge branch 'jc/maint-abbrev-option-cli'

We did not document that many commands take unique prefix
abbreviations of long options (e.g. "--option" may be the only flag
that the command accepts that begin with "--opt", in which case you
can give "--opt") anywhere easy to find for new people.

* jc/maint-abbrev-option-cli:
  gitcli: describe abbreviation of long options

12 years agoMerge branch 'jc/maint-rev-list-topo-doc'
Junio C Hamano [Wed, 22 Aug 2012 18:53:20 +0000 (11:53 -0700)]
Merge branch 'jc/maint-rev-list-topo-doc'

It was unclear what "--topo-order" was really about in the
documentation. It is not just about "children before parent", but
also about "don't mix lineages".

* jc/maint-rev-list-topo-doc:
  rev-list docs: clarify --topo-order description

12 years agoMerge branch 'hv/coding-guidelines'
Junio C Hamano [Wed, 22 Aug 2012 18:53:07 +0000 (11:53 -0700)]
Merge branch 'hv/coding-guidelines'

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

* hv/coding-guidelines:
  Documentation/CodingGuidelines: spell out more shell guidelines

12 years agoMerge branch 'jk/check-docs-update'
Junio C Hamano [Wed, 22 Aug 2012 18:53:00 +0000 (11:53 -0700)]
Merge branch 'jk/check-docs-update'

Simplify "make check-docs" implementation and update its coverage.

* jk/check-docs-update:
  check-docs: get documented command list from Makefile
  check-docs: drop git-help special-case
  check-docs: list git-gui as a command
  check-docs: factor out command-list
  command-list: mention git-credential-* helpers
  command-list: add git-sh-i18n
  check-docs: update non-command documentation list
  check-docs: mention gitweb specially

12 years agoMerge branch 'jc/tag-doc'
Junio C Hamano [Wed, 22 Aug 2012 18:52:55 +0000 (11:52 -0700)]
Merge branch 'jc/tag-doc'

Our documentation used to assume having files in .git/refs/*
directories was the only to have branches and tags, but that is not
true for quite some time.

* jc/tag-doc:
  Documentation: do not mention .git/refs/* directories

12 years agoMerge branch 'js/gitweb-path-info-unquote'
Junio C Hamano [Wed, 22 Aug 2012 18:52:32 +0000 (11:52 -0700)]
Merge branch 'js/gitweb-path-info-unquote'

"gitweb" when used with PATH_INFO failed to notice directories with
SP (and other characters that need URL-style quoting) in them.

* js/gitweb-path-info-unquote:
  gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO

12 years agoMerge branch 'tr/void-diff-setup-done'
Junio C Hamano [Wed, 22 Aug 2012 18:52:26 +0000 (11:52 -0700)]
Merge branch 'tr/void-diff-setup-done'

Remove unnecessary code.

* tr/void-diff-setup-done:
  diff_setup_done(): return void

12 years agoMerge branch 'tr/merge-recursive-flush'
Junio C Hamano [Wed, 22 Aug 2012 18:52:19 +0000 (11:52 -0700)]
Merge branch 'tr/merge-recursive-flush'

Remove unnecessary code.

* tr/merge-recursive-flush:
  merge-recursive: eliminate flush_buffer() in favor of write_in_full()

12 years agoMerge branch 'mm/die-with-dashdash-help'
Junio C Hamano [Wed, 22 Aug 2012 18:51:53 +0000 (11:51 -0700)]
Merge branch 'mm/die-with-dashdash-help'

When the user gives an argument that can be taken as both a revision
name and a pathname without disambiguating with "--", we used to
give a help message "Use '--' to separate".  The message has been
clarified to show where that '--' goes on the command line.

* mm/die-with-dashdash-help:
  setup: clarify error messages for file/revisions ambiguity

12 years agoMerge branch 'tr/maint-send-email-2047'
Junio C Hamano [Wed, 22 Aug 2012 18:51:47 +0000 (11:51 -0700)]
Merge branch 'tr/maint-send-email-2047'

"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.

* tr/maint-send-email-2047:
  send-email: improve RFC2047 quote parsing

12 years agoMerge branch 'nd/index-errno'
Junio C Hamano [Wed, 22 Aug 2012 18:51:42 +0000 (11:51 -0700)]
Merge branch 'nd/index-errno'

Assignments to errno before calling system functions that used to
matter in the old code were left behind after the code structure
changed sufficiently to make them useless.

* nd/index-errno:
  read_index_from: remove bogus errno assignments

12 years agoMerge branch 'mk/test-seq'
Junio C Hamano [Wed, 22 Aug 2012 18:51:37 +0000 (11:51 -0700)]
Merge branch 'mk/test-seq'

Add a compatibility/utility function to the test framework.

* mk/test-seq:
  tests: Introduce test_seq

12 years agoMerge branch 'pg/maint-apply-remove-unused-variable'
Junio C Hamano [Wed, 22 Aug 2012 18:51:33 +0000 (11:51 -0700)]
Merge branch 'pg/maint-apply-remove-unused-variable'

Remove an unused field.

* pg/maint-apply-remove-unused-variable:
  apply: delete unused deflate_origlen from patch struct

12 years agoMerge branch 'jc/test-prereq'
Junio C Hamano [Wed, 22 Aug 2012 18:51:26 +0000 (11:51 -0700)]
Merge branch 'jc/test-prereq'

Teaches the test framework to probe rarely used prerequistes lazily,
and make use of it for detecting SYMLINKS, CASE_INSENSITIVE_FS and
NKD/NKC MacOS x gotcha.

* jc/test-prereq:
  t3910: use the UTF8_NFD_TO_NFC test prereq
  test-lib: provide UTF8 behaviour as a prerequisite
  t0050: use the SYMLINKS test prereq
  t0050: use the CASE_INSENSITIVE_FS test prereq
  test-lib: provide case insensitivity as a prerequisite
  test: allow prerequisite to be evaluated lazily
  test: rename $satisfied to $satisfied_prereq

12 years agoMerge branch 'ms/git-svn-1.7'
Junio C Hamano [Wed, 22 Aug 2012 18:51:20 +0000 (11:51 -0700)]
Merge branch 'ms/git-svn-1.7'

A series by Michael Schwern via Eric to update git-svn to revamp the
way URLs are internally passed around, to make it work with SVN 1.7.

* ms/git-svn-1.7:
  git-svn: remove ad-hoc canonicalizations
  git-svn: canonicalize newly-minted URLs
  git-svn: introduce add_path_to_url function
  git-svn: canonicalize earlier
  git-svn: replace URL escapes with canonicalization
  git-svn: attempt to mimic SVN 1.7 URL canonicalization
  t9107: fix typo
  t9118: workaround inconsistency between SVN versions
  Git::SVN{,::Ra}: canonicalize earlier
  git-svn: path canonicalization uses SVN API
  Git::SVN::Utils: remove irrelevant comment
  git-svn: add join_paths() to safely concatenate paths
  git-svn: factor out _collapse_dotdot function
  git-svn: use SVN 1.7 to canonicalize when possible
  git-svn: move canonicalization to Git::SVN::Utils
  use Git::SVN{,::RA}->url accessor globally
  use Git::SVN->path accessor globally
  Git::SVN::Ra: use accessor for URLs
  Git::SVN: use accessor for URLs internally
  Git::SVN: use accessors internally for path

12 years agot3910: use the UTF8_NFD_TO_NFC test prereq
Michael J Gruber [Mon, 30 Jul 2012 09:57:18 +0000 (11:57 +0200)]
t3910: use the UTF8_NFD_TO_NFC test prereq

Besides reusing the new test prerequisite, this fixes also the issue
that the current output is not TAP compliant and produces the output "no
reason given" [for skipping].

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint-1.7.11' into maint
Junio C Hamano [Wed, 22 Aug 2012 18:27:30 +0000 (11:27 -0700)]
Merge branch 'maint-1.7.11' into maint

* maint-1.7.11:
  contrib/ciabot: Get ciabot configuration from git variables

12 years agocontrib/ciabot: Get ciabot configuration from git variables
Eric S. Raymond [Wed, 22 Aug 2012 10:52:30 +0000 (06:52 -0400)]
contrib/ciabot: Get ciabot configuration from git variables

These changes remove all need to modify the ciabot scripts for installation.
Instead, per-project configuration can be dome via variables in a [ciabot]
section of the config file.

Also, correct for the new server address.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofast-import: document the --done option
Eric S. Raymond [Wed, 22 Aug 2012 10:57:05 +0000 (06:57 -0400)]
fast-import: document the --done option

Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: write-tree: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:53 +0000 (19:32 +0700)]
i18n: write-tree: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: verify-tag: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:52 +0000 (19:32 +0700)]
i18n: verify-tag: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: verify-pack: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:51 +0000 (19:32 +0700)]
i18n: verify-pack: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: update-server-info: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:50 +0000 (19:32 +0700)]
i18n: update-server-info: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: update-ref: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:49 +0000 (19:32 +0700)]
i18n: update-ref: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: update-index: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:48 +0000 (19:32 +0700)]
i18n: update-index: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: tag: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:47 +0000 (19:32 +0700)]
i18n: tag: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: symbolic-ref: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:46 +0000 (19:32 +0700)]
i18n: symbolic-ref: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: show-ref: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:45 +0000 (19:32 +0700)]
i18n: show-ref: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: show-branch: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:44 +0000 (19:32 +0700)]
i18n: show-branch: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoam: quote string for translation before passing to eval_gettextln
Nguyễn Thái Ngọc Duy [Wed, 22 Aug 2012 14:48:03 +0000 (21:48 +0700)]
am: quote string for translation before passing to eval_gettextln

If it's not quoted, the string is expanded before it gets looked up in
gettext database and obviously nothing is returned.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocommit/commit-tree: correct latin1 to utf-8
Linus Torvalds [Thu, 28 Jun 2012 18:24:14 +0000 (11:24 -0700)]
commit/commit-tree: correct latin1 to utf-8

When a line in the message is not a valid utf-8, "git mailinfo"
attempts to convert it to utf-8 assuming the input is latin1 (and
punt if it does not convert cleanly).  Using the same heuristics in
"git commit" and "git commit-tree" lets the editor output be in
latin1 to make the overall system more consistent.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agodifftool: silence warning
Ross Lagerwall [Tue, 21 Aug 2012 10:21:40 +0000 (12:21 +0200)]
difftool: silence warning

Silence a warning given when running git difftool --dir-diff and
there are no changes.

This is because command_oneline returns undef when the command has no
output, not ''.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agowarn_on_inaccessible(): a helper to warn on inaccessible paths
Junio C Hamano [Tue, 21 Aug 2012 21:52:07 +0000 (14:52 -0700)]
warn_on_inaccessible(): a helper to warn on inaccessible paths

The previous series introduced warnings to multiple places, but it
could become tiring to see the warning on the same path over and
over again during a single run of Git.  Making just one function
responsible for issuing this warning, we could later choose to keep
track of which paths we issued a warning (it would involve a hash
table of paths after running them through real_path() or something)
in order to reduce noise.

Right now we do not know if the noise reduction is necessary, but it
still would be a good code reduction/sharing anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr: warn on inaccessible attribute files
Jeff King [Tue, 21 Aug 2012 06:31:52 +0000 (02:31 -0400)]
attr: warn on inaccessible attribute files

Just like config and gitignore files, we silently ignore
missing or inaccessible attribute files. An existent but
inaccessible file is probably a configuration error, so
let's warn the user.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitignore: report access errors of exclude files
Jeff King [Tue, 21 Aug 2012 06:26:07 +0000 (02:26 -0400)]
gitignore: report access errors of exclude files

When we try to access gitignore files, we check for their
existence with a call to "access". We silently ignore
missing files. However, if a file is not readable, this may
be a configuration error; let's warn the user.

For $GIT_DIR/info/excludes or core.excludesfile, we can just
use access_or_warn. However, for per-directory files we
actually try to open them, so we must add a custom warning.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoconfig: warn on inaccessible files
Jeff King [Tue, 21 Aug 2012 06:10:59 +0000 (02:10 -0400)]
config: warn on inaccessible files

Before reading a config file, we check "!access(path, R_OK)"
to make sure that the file exists and is readable. If it's
not, then we silently ignore it.

For the case of ENOENT, this is fine, as the presence of the
file is optional. For other cases, though, it may indicate a
configuration error (e.g., not having permissions to read
the file). Let's print a warning in these cases to let the
user know.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agofor-each-ref: Fix sort with multiple keys
Kacper Kornet [Tue, 21 Aug 2012 07:47:26 +0000 (09:47 +0200)]
for-each-ref: Fix sort with multiple keys

The linked list describing sort options was not correctly set up in
opt_parse_sort. In the result, contrary to the documentation, only the
last of multiple --sort options to git-for-each-ref was taken into
account. This commit fixes it.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot6300: test sort with multiple keys
Kacper Kornet [Tue, 21 Aug 2012 07:46:06 +0000 (09:46 +0200)]
t6300: test sort with multiple keys

Documentation of git-for-each-ref says that --sort=<key> option can be
used multiple times, in which case the last key becomes the primary key.
However this functionality was never checked in test suite and is
currently broken. This commit adds appropriate test in preparation for fix.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogettext: do not translate empty string
Thomas Rast [Mon, 20 Aug 2012 18:24:56 +0000 (20:24 +0200)]
gettext: do not translate empty string

The gettext .po files have a header, but it looks like the
translation specification for an empty string.  This results in
_("") actually returning that header.

Check the input to _() and do not call gettext() on an empty string;
in some places, we run _(opts->help) where opts->help may be empty.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit p4: make branch detection work with --use-client-spec
Pete Wyckoff [Sat, 11 Aug 2012 16:55:04 +0000 (12:55 -0400)]
git p4: make branch detection work with --use-client-spec

The bug report in http://stackoverflow.com/questions/11893688
observes that files are mapped into the wrong locations in
git when both --use-client-spec and --branch-detection are enabled.

Fix this by changing the relative path prefix to match discovered
branches when using a client spec.

The problem was likely introduced with ecb7cf9 (git-p4: rewrite view
handling, 2012-01-02).

Signed-off-by: Pete Wyckoff <pw@padd.com>
Tested-by: Matthew Korich <matthew@korich.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: shortlog: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:43 +0000 (19:32 +0700)]
i18n: shortlog: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: rm: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:42 +0000 (19:32 +0700)]
i18n: rm: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: revert, cherry-pick: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:41 +0000 (19:32 +0700)]
i18n: revert, cherry-pick: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: rev-parse: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:40 +0000 (19:32 +0700)]
i18n: rev-parse: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: reset: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:39 +0000 (19:32 +0700)]
i18n: reset: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: rerere: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:38 +0000 (19:32 +0700)]
i18n: rerere: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: status: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:37 +0000 (19:32 +0700)]
i18n: status: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: replace: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:36 +0000 (19:32 +0700)]
i18n: replace: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: remote: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:35 +0000 (19:32 +0700)]
i18n: remote: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: read-tree: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:34 +0000 (19:32 +0700)]
i18n: read-tree: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: push: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:33 +0000 (19:32 +0700)]
i18n: push: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: prune: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:32 +0000 (19:32 +0700)]
i18n: prune: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: prune-packed: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:31 +0000 (19:32 +0700)]
i18n: prune-packed: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: pack-refs: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:30 +0000 (19:32 +0700)]
i18n: pack-refs: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: pack-objects: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:29 +0000 (19:32 +0700)]
i18n: pack-objects: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: notes: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:28 +0000 (19:32 +0700)]
i18n: notes: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: name-rev: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:27 +0000 (19:32 +0700)]
i18n: name-rev: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: mv: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:26 +0000 (19:32 +0700)]
i18n: mv: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: mktree: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:25 +0000 (19:32 +0700)]
i18n: mktree: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: merge: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:24 +0000 (19:32 +0700)]
i18n: merge: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: merge-file: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:23 +0000 (19:32 +0700)]
i18n: merge-file: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: merge-base: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:22 +0000 (19:32 +0700)]
i18n: merge-base: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoi18n: ls-tree: mark parseopt strings for translation
Nguyễn Thái Ngọc Duy [Mon, 20 Aug 2012 12:32:21 +0000 (19:32 +0700)]
i18n: ls-tree: mark parseopt strings for translation

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>