autoconf: GIT_CONF_APPEND_LINE: change signature

Change one-argument GIT_CONF_APPEND_LINE([VAR=VAL]) to
GIT_CONF_APPEND_LINE([VAR], [VAL]), that is more similar to the usual
AC_SUBST macro; this is only a preparatory change in view of future
refactorings.

No semantic change is intended.  In fact, the generated configure file
doesn't change at all.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
autoconf: GIT_CONF_APPEND_LINE -> GIT_CONF_SUBST

The new name fits better with the macro signature, and underlines the
similarities with the autoconf-provided macro AC_SUBST (which will be
made even more pronounced in planned future commits).

Once again, no semantic change is intended, and indeed no change to the
generated configure script is expected.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
autoconf: remove some redundant shell indirections

They are merely useless now, but would get in the way of future changes.

No semantic change is intended.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
autoconf: remove few redundant semicolons

They are merely useless now, but would get in the way of future changes.

No semantic change is intended.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
autoconf: use AC_CONFIG_COMMANDS instead of ad-hoc 'config.mak.append'

This will allow "./config.status --recheck; ./config.status" to work
correctly as a mean of reconfiguring the tree with the same configure
argument used in the previous "./configure" invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
build: "make clean" should not remove configure-generated files

Those filed hold variables, settings and information set by the
configuration process run by './configure'; in Autotools-based
build system that kind of stuff should only be removed by
"make distclean".  Having it removed by "make clean" is not only
inconsistent, but causes real confusion for that part of the Git
audience that is used to the Autotools semantics; for example,
an autotools old-timer that has run:

    ./configure --prefix /opt/git

in the past, without running "make distclean" afterwards, would
expect a "make install" issued after a "make clean" to rebuild and
install git in '/opt/git'; but with the current behaviour, the
"make clean" invocation removes (among the other things) the file
'config.mak.autogen', so that the "make install" falls back to the
default prefix of '$HOME', thus installing git in the user's home
directory -- definitely unexpected.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
build: reconfigure automatically if configure.ac changes

This provides a reduced but still useful sibling of the Automake's
"automatic Makefile rebuild" feature.  It's important to note that
we take care to enable the new rules only if the tree that has already
be configured with './configure', so that users relying on manual
configuration won't be negatively impacted.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
difftool: only copy back files modified during directory diff

When 'difftool --dir-diff' is used to compare working tree files,
it always copies files from the tmp dir back to the working tree
when the diff tool is closed, even if the files were not modified
by the diff tool.

This causes the file timestamp to change. Files should only be
copied from the tmp dir back to the working copy if they were
actually modified.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: New keywords for xgettext extraction from sh

Since we have additional shell wrappers (eval_gettextln and
gettextln) for gettext, we need to take into account these wrappers
when running 'make pot' to extract messages from shell scripts.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: rebase: mark strings for translation

Signed-off-by: Jiang Xin <worldhello.net@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 in this case.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Remove obsolete LONG_USAGE which breaks xgettext

Since there is a modern OPTIONS_SPEC variable in use in this script,
it's safe to remove the USAGE and LONG_USAGE variables; they are no
longer used.

By the way, the obsolete LONG_USAGE variable has the following
message in it:

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

and such complex LONG_USAGE message will breaks 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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: am: mark more strings for translation

Mark additional 3 strings for translation, and reduce one indentation
level for one gettextln clause introduced in commit de88c1c.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Remove unused and bad gettext block from git-am

Gettext message should not start with '-' nor '--'. Since the '-d' and
'--dotest' options do not exist in OPTIONS_SPEC variable, it's safe to
remove the block.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
i18n: merge-recursive: mark strings for translation

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 'nk/maint-gitweb-log-by-lines' into jch

Teach gitweb to pay attention to various forms of credits that are
similar to "Signed-off-by:" lines.

Needs to be eyeballed for the correctness of the esc_html() in the tip one.

* nk/maint-gitweb-log-by-lines:
  gitweb: Add support to Link: tag
  gitweb: Handle other types of tag in git_print_log
  gitweb: Cleanup git_print_log()
Merge branch 'tg/ce-namelen-field' into jch

Split lower bits of ce_flags field and creates a new ce_namelen
field in the in-core index structure.

Will merge to 'next'.

* tg/ce-namelen-field:
  Strip namelen out of ce_flags into a ce_namelen field
Merge branch 'sn/doc-typofix' into jch

Will merge to 'next'.

* sn/doc-typofix:
  doc: A few minor copy edits.
Merge branch 'mm/mediawiki-usability' into jch

Will merge to 'next'.

* mm/mediawiki-usability:
  git-remote-mediawiki: allow page names with a ':'
  git-remote-mediawiki: fix incorrect test usage in test
  git-remote-mediawiki: properly deal with invalid remote revisions
  git-remote-mediawiki: show progress information when getting last remote revision
  git-remote-mediawiki: show progress information when listing pages
  git-remote-mediawiki: use --force when adding notes
  git-remote-mediawiki: get rid of O(N^2) loop
  git-remote-mediawiki: make mediafiles export optional
  git-remote-mediawiki: actually send empty comment when they're empty
  git-remote-mediawiki: don't split namespaces with spaces