Merge remote-tracking branch 'kernel.org/master'
combine-diff: fix loop index underflow

If both la and context are zero at the start of the loop, la wraps around
and we end up reading from memory far away.  Skip the loop in that case
instead.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
documentation: fix alphabetic ordered list for git-rebase man page

An alphabetic ordered list (a.) is converted to numerical in
the man page (1.) so context comments naming 'a' were confusing,
fix that by not using ordered list notation for 'a' anb 'b' items.

Signed-off-by: Nelson Benitez Leon <nelsonjesus.benitez@seap.minhap.es>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation: improve description of GIT_EDITOR and preference order

Previously GIT_EDITOR was not listed in git(1) "Environment Variables" section,
which could be very confusing to users. Include it in "other" subsection along
with a link to git-var(1), since that is the page that fully describes all
places where editor can be set and also their preference order.

Also, git-var(1) did not say that hardcoded fallback 'vi' may have been changed
at build time. A user could be puzzled if 'nano' pops up even when none of the
mentioned environment vars or config.editor are set. Clarify this.

Ideally, the build system should be changed to reflect the chosen fallback
editor when creating the man pages. Not sure if that is even possible though.

Signed-off-by: Rodrigo Silva (MestreLion) <linux@rodrigosilva.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configure: move definitions of private m4 macros before AC_INIT invocation

This way, no spurious comments nor whitespace will be propagated in the
generated configure script.

This change is a pure code movement (plus addition of a comment line).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configure: avoid some code repetitions thanks to m4_{push,pop}def

This change is just cosmetic, and should cause no semantic change, nor
any change in the generated configure script.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configure: be more idiomatic

Lots of code in Git's configure.ac doesn't follow the typical formatting,
idioms and best practices for Autoconf input files.  Improve the situation.

There are probably many more similar improvements to be done, but trying
to clump all of them in a single change would make it unreviewable, so we
content ourselves with a partial improvement.

This change is just cosmetic, and should cause no semantic change.

The most relevant of the changes introduced by this patch are:

 - Do not add trailing '\' characters for line continuation where they
   are not truly needed.

 - In several (but not all) macro calls, properly quote the arguments.

 - Few cosmetic changes in spacing and comments.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep doc: add --break / --heading / -W to synopsis

All of the other options were included in the synopsis, so it makes
sense to include these as well.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ms/maint-config-error-at-eol-linecount' into maint

* ms/maint-config-error-at-eol-linecount:
  config: report errors at the EOL with correct line number
Merge branch 'ph/rerere-doc' into maint

* ph/rerere-doc:
  rerere: Document 'rerere remaining'
Merge branch 'jn/maint-fast-import-empty-ls' into maint

* jn/maint-fast-import-empty-ls:
  fast-import: don't allow 'ls' of path with empty components
  fast-import: leakfix for 'ls' of dirty trees
Git 1.7.9.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sync with 1.7.9.5
Merge remote-tracking branch 'kernel.org/master'
Update draft release notes to 1.7.10

Signed-off-by: Junio C Hamano <gitster@pobox.com>
clean up struct ref's nonfastforward field

Each ref structure contains a "nonfastforward" field which
is set during push to show whether the ref rewound history.
Originally this was a single bit, but it was changed in
f25950f (push: Provide situational hints for non-fast-forward
errors) to an enum differentiating a non-ff of the current
branch versus another branch.

However, we never actually set the member according to the
enum values, nor did we ever read it expecting anything but
a boolean value. But we did use the side effect of declaring
the enum constants to store those values in a totally
different integer variable. The code as-is isn't buggy, but
the enum declaration inside "struct ref" is somewhat
misleading.

Let's convert nonfastforward back into a single bit, and
then define the NON_FF_* constants closer to where they
would be used (they are returned via the "int *nonfastforward"
parameter to transport_push, so we can define them there).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
checkout: suppress tracking message with "-q"

Like the "switched to..." message (which is already
suppressed by "-q"), this message is purely informational.
Let's silence it if the user asked us to be quiet.

This patch is slightly more than a one-liner, because we
have to teach create_branch to propagate the flag all the
way down to install_branch_config.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
teach "git branch" a --quiet option

There's currently no way to suppress the informational
"deleted branch..." or "set up tracking..." messages.  This
patch provides a "-q" option to do so.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Update Swedish translation (724t0f0u).

- Update for 1.7.10-rc1.
- Add a missing -e when generaring the "Untracked files" message.
- Fixed some wordings after playing with the localized version.
l10n: Review zh_CN translation for Git 1.7.10-rc1

Overall review of the zh_CN translation:

 - Distinguish the translations of index and stage, though they are the
   same thing.

 - Many other fixes, e.g., add the lost periods at the end of translated
   sentences.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>