i18n: leave \n out of translated diffstat

GETTEXT_POISON scrapes everything in translated strings, including \n.
t4205.12 however needs this \n in matching the end result. Keep this
\n out of translation to make t4205.12 happy.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: Rewrite gettext messages start with dash

Gettext message in a shell script should not start with '-', one
workaround is adding '--' between gettext and the message, like:

    gettext -- "--exec option ..."

But due to a bug in the xgettext extraction, xgettext can not
extract the actual message for this case. Rewriting the message
is a simpler and better solution.

Reported-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rebase: remove obsolete and unused LONG_USAGE which breaks xgettext

Since there is a modern OPTIONS_SPEC variable in use in this script,
the obsolete USAGE and LONG_USAGE variables are no longer used.
Remove them.

In addition, the obsolete LONG_USAGE variable has the following
message in it:

    A'\''--B'\''--C'\''

And such complex LONG_USAGE message will break xgettext when
extracting l10n messages (but if single quotes are removed from the
message, xgettext works fine on 'git-rebase.sh').

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: am: mark more strings for translation

Mark strings in 'git-am.sh' for translation. In the last chunk,
change '$1' to '-b/--binary', as it is not worth turning this
message to "The %s option has been..." and using printf on it.

Also reduce one indentation level for one gettextln clause introduced
in commit de88c1c.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Remove dead code which contains bad gettext block

Found this dead code when I examine gettext messages in shell scripts
start with dash ('-' or '--'). An error will be raised for this case,
like:

    $ gettext "-d option is no longer supported.  Do not use."
    gettext: missing arguments

Indead, this code has been left as dead for a long time, as Jonathan
points out:

    The git am -d/--dotest option has errored out with a message
    since e72c7406 (am: remove support for -d .dotest, 2008-03-04).
    The error message about lack of support was eliminated along
    with other cleanups (probably by mistake) a year later by
    removing the option from the option table in 98ef23b3 (git-am:
    minor cleanups, 2009-01-28).

    But the code to handle -d and --dotest stayed around even though
    ever since then it could not be tripped.  Remove this dead code.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: merge-recursive: mark strings for translation

Mark strings in merge-recursive for translation.

Some tests would start to fail with GETTEXT_POISON turned on after
this update.  Use test_i18ncmp and test_i18ngrep where appropriate
to mark strings that should only be checked in the C locale output
to avoid such issues.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'sz/submodule-force-update' into jch

We may want a documentation update and a few tests on top.
Not urgent.

* sz/submodule-force-update:
  Make 'git submodule update --force' always check out submodules.
Merge branch 'mm/push-default-switch-warning' into jch

Will defer for another cycle.

* mm/push-default-switch-warning:
  push: start warning upcoming default change for push.default
Merge branch 'jk/no-more-pre-exec-callback' into jch

Will defer for 6 months until ancient "less" goes extinct.

* jk/no-more-pre-exec-callback:
  pager: drop "wait for output to run less" hack
Merge branch 'da/difftool-updates' into jch

"git difftool --dir-diff" learned to use symbolic links to prepare
temporary copy of the working tree when available.

Not urgent.

* da/difftool-updates:
  difftool: Disable --symlinks on cygwin
  difftool: Handle compare() returning -1
  difftool: Wrap long lines for readability
  difftool: Check all return codes from compare()
  difftool: Handle finding mergetools/ in a path with spaces
  difftool: Use symlinks when diffing against the worktree
  difftool: Call the temp directory "git-difftool"
  difftool: Move option values into a hash
  difftool: Eliminate global variables
  difftool: Simplify print_tool_help()
Merge branch 'jc/test-prereq' into jch

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.

Not urgent.

* jc/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
Merge branch 'ph/stash-rerere' into pu

Will be rerolled but is going in the right direction.

* ph/stash-rerere:
  stash: invoke rerere in case of conflict
  test: git-stash conflict sets up rerere
Merge branch 'jc/split-blob' into pu

Not ready.

I finished the streaming checkout codepath, but as explained in
127b177 (bulk-checkin: support chunked-object encoding, 2011-11-30),
these are still early steps of a long and painful journey. At least
pack-objects and fsck need to learn the new encoding for the series
to be usable locally, and then index-pack/unpack-objects needs to
learn it to be used remotely.

Given that I heard a lot of noise that people want large files, and
that I was asked by somebody at GitTogether'11 privately for an
advice on how to pay developers (not me) to help adding necessary
support, I am somewhat dissapointed that the original patch series
that was sent long time ago still remains here without much comments
and updates from the developer community. I even made the interface
to the logic that decides where to split chunks easily replaceable,
and I deliberately made the logic in the original patch extremely
stupid to entice others, especially the "bup" fanbois, to come up
with a better logic, thinking that giving people an easy target to
shoot for, they may be encouraged to help out. The plan is not
working :-<.

* jc/split-blob:
  chunked-object: streaming checkout
  chunked-object: fallback checkout codepaths
  bulk-checkin: support chunked-object encoding
  bulk-checkin: allow the same data to be multiply hashed
  new representation types in the packstream
  packfile: use varint functions

Conflicts:
	builtin/pack-objects.c
	streaming.c
	t/t1050-large.sh
Merge branch 'jc/maint-push-refs-all' into pu

Allows pushing and fetching refs/stash.
There still seem to be other bugs hiding (e.g. try pushing twice).

Not ready.

* jc/maint-push-refs-all:
  get_fetch_map(): tighten checks on dest refs
  fetch/push: allow refs/*:refs/*
Merge branch 'lt/commit-tree-guess-utf-8' into pu

Teaches "git commit" and "git commit-tree" the "we are told to use
utf-8 in log message, but this does not look like utf-8---attempt to
pass it through convert-from-latin1-to-utf8 and see if it makes
sense" heuristics "git mailinfo" already uses.

A draft from Linus received privately without a log message.
Expecting a reroll.

* lt/commit-tree-guess-utf-8:
  commit/commit-tree: correct latin1 to utf-8
Merge branch 'jl/submodule-rm' into pu

Expecting a reroll.

* jl/submodule-rm:
  rm: remove submodules from the index and the .gitmodules file
  rm: don't fail when removing populated submodules
Merge branch 'mb/remote-default-nn-origin' into pu

When the user does not specify what remote to interact with, we
often attempt to use 'origin'.  This can now be customized via a
configuration variable.

Expecting a reroll.
"The first remote becomes the default" bit is better done as a
separate step.

* mb/remote-default-nn-origin:
  Teach get_default_remote to respect remote.default.
  Test that plain "git fetch" uses remote.default when on a detached HEAD.
  Teach clone to set remote.default.
  Teach "git remote" about remote.default.
  Teach remote.c about the remote.default configuration setting.
  Rename remote.c's default_remote_name static variables.
Merge branch 'mz/rebase-range' into pu

Expecting a reroll.

Performance concerns from Windows folks.  Also the series lacks
proper sign-offs.

* mz/rebase-range:
  rebase (without -p): correctly calculate patches to rebase
  rebase -p: don't request --left-right only to ignore left side
  rebase -p: use --cherry-mark for todo file
  git-rebase--interactive.sh: look up subject in add_pick_line
  git-rebase--interactive: group all $preserve_merges code
  git-rebase--interactive.sh: extract function for adding "pick" line
  git-rebase--am.sh: avoid special-casing --keep-empty
Merge branch 'jx/i18n-1.7.11' into pu

Is this ready for 'next'?
Not urgent.

* jx/i18n-1.7.11:
  i18n: merge-recursive: mark strings for translation
  Remove dead code which contains bad gettext block
  i18n: am: mark more strings for translation
  rebase: remove obsolete and unused LONG_USAGE which breaks xgettext
  i18n: Rewrite gettext messages start with dash
  i18n: rebase: mark messages for translation
  i18n: New keywords for xgettext extraction from sh

Conflicts:
	git-am.sh
Merge branch 'nd/maint-i18n-diffstat' into pu

* nd/maint-i18n-diffstat:
  i18n: leave \n out of translated diffstat