send-email: add --[no-]xmailer option

Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:'
header to the email being sent.

Signed-off-by: Luis Henriques <henrix@camandro.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SQUASH???

Signed-off-by: Junio C Hamano <gitster@pobox.com>
rerere: error out on autoupdate failure

We have been silently tolerating errors by returning early with an
error that the caller ignores since rerere.autoupdate was introduced
in v1.6.0-rc0~120^2 (2008-06-22).  So on error (for example if the
index is already locked), rerere can return success silently without
updating the index or with only some items in the index updated.

Better to treat such failures as a fatal error so the operator can
figure out what is wrong and fix it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SQUASH???
refs.c: rename the transaction functions

Rename the transaction functions. Remove the leading ref_ from the
names and append _ref to the names for functions that create/delete/
update sha1 refs.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c: rename transaction.updates to transaction.ref_updates

The updates are only holding refs not reflogs, so express it to the reader.

Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http: send Accept-Language header if possible

Add an Accept-Language header to indicate the user's preferred
languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.

Examples:
  LANGUAGE= -> ""
  LANGUAGE=ko:en -> "Accept-Language: ko, en;q=0.9, *;q=0.1"
  LANGUAGE=ko LANG=en_US.UTF-8 -> "Accept-Language: ko, *;q=0.1"
  LANGUAGE= LANG=en_US.UTF-8 -> "Accept-Language: en-US, *;q=0.1"

This gives git servers a chance to display remote error messages in
the user's preferred language.

Limit the number of languages to 1,000 because q-value must not be
smaller than 0.001, and limit the length of Accept-Language header to
4,000 bytes for some HTTP servers which cannot accept such long header.

Signed-off-by: Yi EungJun <eungjun.yi@navercorp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
SQUASH???

 - make sure that a cleared cache is reinitialized.
 - clarify the counting loop.
 - move the initialization of a counter variable to where it belongs to.
 - avoid unnecessary test-must-fail that tolerates unexpected failures.
 - avoid depending on GNU that passes \r in "text" files.
 - allow underlying transport to make multiple HTTP connetions in test.
git-new-workdir: don't fail if the target directory is empty

Allow new workdirs to be created in an empty directory (similar to "git
clone").  Provide more error checking and clean up on failure.

Signed-off-by: Paul Smith <paul@mad-scientist.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'ps/new-workdir-into-empty-directory' into jch

* ps/new-workdir-into-empty-directory:
  git-new-workdir: don't fail if the target directory is empty
Merge branch 'js/push-to-deploy' into jch

"git push" into a repository with a working tree normally refuses
to modify the branch that is checked out.  The command learned to
optionally do an equivalent of "git reset --hard" only when there
is no change to the working tree and the index instead, which would
be useful to "deploy" by pushing into a repository.

* js/push-to-deploy:
  t5516: more tests for receive.denyCurrentBranch=updateInstead
  receive-pack: add another option for receive.denyCurrentBranch
Merge branch 'cc/interpret-trailers-more' into jch

* cc/interpret-trailers-more:
  trailer: add test with an old style conflict block
  trailer: reuse ignore_non_trailer() to ignore conflict lines
  commit: make ignore_non_trailer() non static
Merge branch 'jc/unpack-trees-plug-leak' into jch

* jc/unpack-trees-plug-leak:
  unpack_trees: plug leakage of o->result
Merge branch 'rt/push-recurse-submodule-usage-string' into jch

* rt/push-recurse-submodule-usage-string:
  builtin/push.c: fix description of --recurse-submodules option
Merge branch 'po/everyday-doc' into jch

* po/everyday-doc:
  Documentation: change "gitlink" typo in git-push
Merge branch 'mh/config-copy-string-from-git-path' into jch

* mh/config-copy-string-from-git-path:
  cmd_config(): make a copy of path obtained from git_path()
Merge branch 'sv/doc-stripspace' into jch

* sv/doc-stripspace:
  Documentation/git-stripspace: Update synopsis
Merge branch 'sv/typofix-apply-error-message' into jch

* sv/typofix-apply-error-message:
  apply: fix typo in an error message
Merge branch 'sb/log-ref-write-fd' into jch

Moves a part of function around to add a helper that still only has
one caller.  Need to see how this helps in a bigger picture;
conflicts with nd/multiple-work-trees.

* sb/log-ref-write-fd:
  refs.c: add a function to append a reflog entry to a fd
Merge branch 'mh/simplify-repack-without-refs' into jch

* mh/simplify-repack-without-refs:
  sort_string_list(): rename to string_list_sort()
  prune_remote(): iterate using for_each_string_list_item()
  prune_remote(): rename local variable
  repack_without_refs(): make the refnames argument a string_list
  prune_remote(): sort delete_refs_list references en masse
  prune_remote(): initialize both delete_refs lists in a single loop
  prune_remote(): exit early if there are no stale references