git
10 years agoMerge branch 'nd/daemonize-gc' into next
Junio C Hamano [Tue, 10 Jun 2014 20:36:00 +0000 (13:36 -0700)] 
Merge branch 'nd/daemonize-gc' into next

"git gc --auto" was recently changed to run in the background to
give control back early to the end-user sitting in front of the
terminal, but it forgot that housekeeping involving reflogs should
be done without other processes competing for accesses to the refs.

* nd/daemonize-gc:
  gc --auto: do not lock refs in the background

10 years agoMerge branch 'jm/t9138-style-fix' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:58 +0000 (13:35 -0700)] 
Merge branch 'jm/t9138-style-fix' into next

* jm/t9138-style-fix:
  t9138-git-svn-authors-prog.sh fixups

10 years agoMerge branch 'jm/instaweb-apache-24' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:56 +0000 (13:35 -0700)] 
Merge branch 'jm/instaweb-apache-24' into next

* jm/instaweb-apache-24:
  git-instaweb: add support for Apache 2.4

10 years agoMerge branch 'jl/remote-rm-prune' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:55 +0000 (13:35 -0700)] 
Merge branch 'jl/remote-rm-prune' into next

"git remote rm" and "git remote prune" can involve removing many
refs at once, which is not a very efficient thing to do when very
many refs exist in the packed-refs file.

* jl/remote-rm-prune:
  remote prune: optimize "dangling symref" check/warning
  remote: repack packed-refs once when deleting multiple refs
  remote rm: delete remote configuration as the last

10 years agoMerge branch 'jk/complete-merge-pull' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:53 +0000 (13:35 -0700)] 
Merge branch 'jk/complete-merge-pull' into next

The completion code did not know about quite a few options that are
common between "git merge" and "git pull", and a couple of options
unique to "git merge".

* jk/complete-merge-pull:
  completion: add missing options for git-merge
  completion: add a note that merge options are shared

10 years agoMerge branch 'bg/xcalloc-nmemb-then-size' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:50 +0000 (13:35 -0700)] 
Merge branch 'bg/xcalloc-nmemb-then-size' into next

Like calloc(3), xcalloc() takes nmemb and then size.

* bg/xcalloc-nmemb-then-size:
  transport-helper.c: rearrange xcalloc arguments
  remote.c: rearrange xcalloc arguments
  reflog-walk.c: rearrange xcalloc arguments
  pack-revindex.c: rearrange xcalloc arguments
  notes.c: rearrange xcalloc arguments
  imap-send.c: rearrange xcalloc arguments
  http-push.c: rearrange xcalloc arguments
  diff.c: rearrange xcalloc arguments
  config.c: rearrange xcalloc arguments
  commit.c: rearrange xcalloc arguments
  builtin/remote.c: rearrange xcalloc arguments
  builtin/ls-remote.c: rearrange xcalloc arguments

10 years agoMerge branch 'jl/status-added-submodule-is-never-ignored' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:46 +0000 (13:35 -0700)] 
Merge branch 'jl/status-added-submodule-is-never-ignored' into next

submodule.*.ignore and diff.ignoresubmodules are used to ignore all
submodule changes in "diff" output, but it can be confusing to
apply these configuration values to status and commit.

This is a backward-incompatible change, but should be so in a good
way (aka bugfix).

* jl/status-added-submodule-is-never-ignored:
  commit -m: commit staged submodules regardless of ignore config
  status/commit: show staged submodules regardless of ignore config

10 years agoMerge branch 'cb/byte-order' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:42 +0000 (13:35 -0700)] 
Merge branch 'cb/byte-order' into next

Compatibility enhancement for Solaris.

* cb/byte-order:
  compat/bswap.h: fix endianness detection
  compat/bswap.h: restore preference __BIG_ENDIAN over BIG_ENDIAN
  compat/bswap.h: detect endianness on more platforms that don't use BYTE_ORDER

10 years agoMerge branch 'jk/strbuf-tolower' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:40 +0000 (13:35 -0700)] 
Merge branch 'jk/strbuf-tolower' into next

* jk/strbuf-tolower:
  strbuf: add strbuf_tolower function

10 years agoMerge branch 'jk/daemon-tolower' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:39 +0000 (13:35 -0700)] 
Merge branch 'jk/daemon-tolower' into next

* jk/daemon-tolower:
  daemon/config: factor out duplicate xstrdup_tolower

10 years agoMerge branch 'as/pretty-truncate' into next
Junio C Hamano [Tue, 10 Jun 2014 20:35:36 +0000 (13:35 -0700)] 
Merge branch 'as/pretty-truncate' into next

* as/pretty-truncate:
  pretty.c: format string with truncate respects logOutputEncoding
  t4205, t6006: add tests that fail with i18n.logOutputEncoding set
  t4205 (log-pretty-format): use `tformat` rather than `format`
  t4041, t4205, t6006, t7102: don't hardcode tested encoding value
  t4205 (log-pretty-formats): don't hardcode SHA-1 in expected outputs

10 years agoMerge branch 'jk/diff-follow-must-take-one-pathspec' into next
Junio C Hamano [Tue, 10 Jun 2014 20:33:52 +0000 (13:33 -0700)] 
Merge branch 'jk/diff-follow-must-take-one-pathspec' into next

* jk/diff-follow-must-take-one-pathspec:
  move "--follow needs one pathspec" rule to diff_setup_done

10 years agoMerge branch 'sk/windows-unc-path' into next
Junio C Hamano [Tue, 10 Jun 2014 20:33:50 +0000 (13:33 -0700)] 
Merge branch 'sk/windows-unc-path' into next

* sk/windows-unc-path:
  Windows: allow using UNC path for git repository

10 years agoWindows: allow using UNC path for git repository
Cezary Zawadka [Tue, 13 Jul 2010 14:17:43 +0000 (16:17 +0200)] 
Windows: allow using UNC path for git repository

[efl: moved MinGW-specific part to compat/]
[jes: fixed compilation on non-Windows]

Eric Sunshine fixed mingw_offset_1st_component() to return
consistently "foo" for UNC "//machine/share/foo", cf

http://groups.google.com/group/msysgit/browse_thread/thread/c0af578549b5dda0

Author: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Cezary Zawadka <czawadka@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Stepan Kasal <kasal@ucw.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'rr/rebase-autostash-fix' into next
Junio C Hamano [Tue, 10 Jun 2014 20:27:15 +0000 (13:27 -0700)] 
Merge branch 'rr/rebase-autostash-fix' into next

* rr/rebase-autostash-fix:
  rebase -i: test "Nothing to do" case with autostash
  rebase -i: handle "Nothing to do" case with autostash

10 years agoMerge branch 'jk/report-fail-to-read-objects-better' into next
Junio C Hamano [Tue, 10 Jun 2014 20:26:45 +0000 (13:26 -0700)] 
Merge branch 'jk/report-fail-to-read-objects-better' into next

* jk/report-fail-to-read-objects-better:
  open_sha1_file: report "most interesting" errno

10 years agoMerge branch 'jk/diff-files-assume-unchanged' into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:31 +0000 (13:24 -0700)] 
Merge branch 'jk/diff-files-assume-unchanged' into next

* jk/diff-files-assume-unchanged:
  run_diff_files: do not look at uninitialized stat data

10 years agoMerge branch 'jk/argv-array-for-child-process' into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:25 +0000 (13:24 -0700)] 
Merge branch 'jk/argv-array-for-child-process' into next

* jk/argv-array-for-child-process:
  argv-array: drop "detach" code
  get_importer: use run-command's internal argv_array
  get_exporter: use argv_array
  get_helper: use run-command's internal argv_array
  git_connect: use argv_array
  run_column_filter: use argv_array
  run-command: store an optional argv_array

10 years agoMerge branch 'sk/wincred' into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:20 +0000 (13:24 -0700)] 
Merge branch 'sk/wincred' into next

* sk/wincred:
  wincred: avoid overwriting configured variables
  wincred: add install target

10 years agoMerge branch 'jk/do-not-run-httpd-tests-as-root' into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:16 +0000 (13:24 -0700)] 
Merge branch 'jk/do-not-run-httpd-tests-as-root' into next

* jk/do-not-run-httpd-tests-as-root:
  t/lib-httpd: require SANITY prereq

10 years agoMerge branch 'cc/replace-edit' into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:09 +0000 (13:24 -0700)] 
Merge branch 'cc/replace-edit' into next

"git replace" learns a new "--edit" option.

* cc/replace-edit:
  Documentation: replace: describe new --edit option
  replace: add --edit to usage string
  replace: add tests for --edit
  replace: die early if replace ref already exists
  replace: refactor checking ref validity
  replace: make sure --edit results in a different object
  replace: add --edit option
  replace: factor object resolution out of replace_object
  replace: use OPT_CMDMODE to handle modes
  replace: refactor command-mode determination

10 years agoMerge branch 'mt/patch-id-stable' (early part) into next
Junio C Hamano [Tue, 10 Jun 2014 20:24:02 +0000 (13:24 -0700)] 
Merge branch 'mt/patch-id-stable' (early part) into next

* 'mt/patch-id-stable' (early part):
  patch-id-test: test stable and unstable behaviour
  patch-id: make it stable against hunk reordering
  test doc: test_write_lines does not split its arguments
  test: add test_write_lines helper

10 years agopatch-id-test: test stable and unstable behaviour
Michael S. Tsirkin [Sun, 27 Apr 2014 18:15:51 +0000 (21:15 +0300)] 
patch-id-test: test stable and unstable behaviour

Verify that patch ID supports an algorithm
that is stable against diff split and reordering.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agopatch-id: make it stable against hunk reordering
Michael S. Tsirkin [Sun, 27 Apr 2014 18:15:44 +0000 (21:15 +0300)] 
patch-id: make it stable against hunk reordering

Patch id changes if users reorder file diffs that make up a patch.

As the result is functionally equivalent, a different patch id is
surprising to many users.
In particular, reordering files using diff -O is helpful to make patches
more readable (e.g. API header diff before implementation diff).

Add an option to change patch-id behaviour making it stable against
these kinds of patch change:
calculate SHA1 hash for each hunk separately and sum all hashes
(using a symmetrical sum) to get patch id

We use a 20byte sum and not xor - since xor would give 0 output
for patches that have two identical diffs, which isn't all that
unlikely (e.g. append the same line in two places).

The new behaviour is enabled
- when patchid.stable is true
- when --stable flag is present

Using a new flag --unstable or setting patchid.stable to false force
the historical behaviour.

In the documentation, clarify that patch ID can now be a sum of hashes,
not a hash.
Document how command line and config options affect the
behaviour.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest doc: test_write_lines does not split its arguments
Jonathan Nieder [Mon, 5 May 2014 23:51:43 +0000 (16:51 -0700)] 
test doc: test_write_lines does not split its arguments

test_write_lines carefully quotes its arguments as "$@", so

test_write_lines "a b" c

writes two lines as requested, not three.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agotest: add test_write_lines helper
Michael S. Tsirkin [Sun, 27 Apr 2014 18:15:47 +0000 (21:15 +0300)] 
test: add test_write_lines helper

API and implementation as suggested by Junio.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoUpdate draft release notes to 2.1
Junio C Hamano [Mon, 9 Jun 2014 18:39:43 +0000 (11:39 -0700)] 
Update draft release notes to 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'jc/shortlog-ref-exclude'
Junio C Hamano [Mon, 9 Jun 2014 18:30:12 +0000 (11:30 -0700)] 
Merge branch 'jc/shortlog-ref-exclude'

"log --exclude=<glob> --all | shortlog" worked as expected, but
"shortlog --exclude=<glob> --all" was not accepted at the command
line argument parser level.

* jc/shortlog-ref-exclude:
  shortlog: allow --exclude=<glob> to be passed

10 years agoMerge branch 'mn/sideband-no-ansi'
Junio C Hamano [Mon, 9 Jun 2014 18:27:55 +0000 (11:27 -0700)] 
Merge branch 'mn/sideband-no-ansi'

Tools that read diagnostic output in our standard error stream do
not want to see terminal control sequence (e.g. erase-to-eol).
Detect them by checking if the standard error stream is connected to
a tty.

* mn/sideband-no-ansi:
  sideband.c: do not use ANSI control sequence on non-terminal

10 years agoMerge branch 'rs/mailinfo-header-cmp'
Junio C Hamano [Mon, 9 Jun 2014 18:27:53 +0000 (11:27 -0700)] 
Merge branch 'rs/mailinfo-header-cmp'

Avoid running over the end of header string while parsing an
incoming e-mail message to extract the patch.

* rs/mailinfo-header-cmp:
  mailinfo: use strcmp() for string comparison

10 years agoMerge branch 'pb/trim-trailing-spaces'
Junio C Hamano [Mon, 9 Jun 2014 18:27:47 +0000 (11:27 -0700)] 
Merge branch 'pb/trim-trailing-spaces'

Fix an error in parsing of .gitignore files that use a trailing
"\ " to mark pathnames that end with a SP.

* pb/trim-trailing-spaces:
  dir.c:trim_trailing_spaces(): fix for " \ " sequence

10 years agoMerge branch 'na/no-http-test-in-the-middle'
Junio C Hamano [Mon, 9 Jun 2014 18:26:51 +0000 (11:26 -0700)] 
Merge branch 'na/no-http-test-in-the-middle'

The mode to run tests with HTTP server tests disabled was broken.

* na/no-http-test-in-the-middle:
  t5538: move http push tests out to t5542

10 years agoMerge branch 'jc/rev-parse-argh-dashed-multi-words'
Junio C Hamano [Mon, 9 Jun 2014 18:26:49 +0000 (11:26 -0700)] 
Merge branch 'jc/rev-parse-argh-dashed-multi-words'

"update-index --cacheinfo" in 2.0 crashes on a malformed command line.

* jc/rev-parse-argh-dashed-multi-words:
  update-index: fix segfault with missing --cacheinfo argument

10 years agoMerge branch 'lt/request-pull'
Junio C Hamano [Mon, 9 Jun 2014 18:26:22 +0000 (11:26 -0700)] 
Merge branch 'lt/request-pull'

A brown-paper-bag bugfix to a test that turned out to be a no-op by
mistake.

* lt/request-pull:
  fix brown paper bag breakage in t5150-request-pull.sh

10 years agoSecond batch for 2.1
Junio C Hamano [Fri, 6 Jun 2014 18:42:05 +0000 (11:42 -0700)] 
Second batch for 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'ss/howto-manage-trunk'
Junio C Hamano [Fri, 6 Jun 2014 18:39:12 +0000 (11:39 -0700)] 
Merge branch 'ss/howto-manage-trunk'

* ss/howto-manage-trunk:
  How to keep a project's canonical history correct.

10 years agoMerge branch 'mc/git-p4-prepare-p4-only'
Junio C Hamano [Fri, 6 Jun 2014 18:38:57 +0000 (11:38 -0700)] 
Merge branch 'mc/git-p4-prepare-p4-only'

* mc/git-p4-prepare-p4-only:
  git-p4: Do not include diff in spec file when just preparing p4

10 years agoMerge branch 'jn/test-lint-unmoor'
Junio C Hamano [Fri, 6 Jun 2014 18:38:54 +0000 (11:38 -0700)] 
Merge branch 'jn/test-lint-unmoor'

* jn/test-lint-unmoor:
  test-lint: find unportable sed, echo, test, and export usage after &&

10 years agoMerge branch 'ep/shell-assign-and-export-vars'
Junio C Hamano [Fri, 6 Jun 2014 18:38:51 +0000 (11:38 -0700)] 
Merge branch 'ep/shell-assign-and-export-vars'

* ep/shell-assign-and-export-vars:
  scripts: more "export VAR=VALUE" fixes
  scripts: "export VAR=VALUE" construct is not portable

10 years agoMerge branch 'jj/command-line-adjective'
Junio C Hamano [Fri, 6 Jun 2014 18:38:48 +0000 (11:38 -0700)] 
Merge branch 'jj/command-line-adjective'

* jj/command-line-adjective:
  Documentation: use "command-line" when used as a compound adjective, and fix other minor grammatical issues

10 years agoMerge branch 'jc/coding-guidelines'
Junio C Hamano [Fri, 6 Jun 2014 18:38:44 +0000 (11:38 -0700)] 
Merge branch 'jc/coding-guidelines'

* jc/coding-guidelines:
  CodingGuidelines: avoid "test <cond> -a/-o <cond>"
  CodingGuidelines: on splitting a long line
  CodingGuidelines: on comparison
  CodingGuidelines: do not call the conditional statement "if()"
  CodingGuidelines: give an example for shell function preamble
  CodingGuidelines: give an example for control statements
  CodingGuidelines: give an example for redirection
  CodingGuidelines: give an example for case/esac statement
  CodingGuidelines: once it is in, it is not worth the code churn

10 years agoMerge branch 'nd/status-auto-comment-char'
Junio C Hamano [Fri, 6 Jun 2014 18:36:10 +0000 (11:36 -0700)] 
Merge branch 'nd/status-auto-comment-char'

* nd/status-auto-comment-char:
  commit: allow core.commentChar=auto for character auto selection
  config: be strict on core.commentChar

10 years agoMerge branch 'mt/rebase-i-keep-empty-test'
Junio C Hamano [Fri, 6 Jun 2014 18:36:06 +0000 (11:36 -0700)] 
Merge branch 'mt/rebase-i-keep-empty-test'

* mt/rebase-i-keep-empty-test:
  rebase --keep-empty -i: add test

10 years agoMerge branch 'mk/show-s-no-extra-blank-line-for-merges'
Junio C Hamano [Fri, 6 Jun 2014 18:35:01 +0000 (11:35 -0700)] 
Merge branch 'mk/show-s-no-extra-blank-line-for-merges'

* mk/show-s-no-extra-blank-line-for-merges:
  git-show: fix 'git show -s' to not add extra terminator after merge commit

10 years agoMerge branch 'sk/spawn-less-case-insensitively-from-grep-O-i'
Junio C Hamano [Fri, 6 Jun 2014 18:32:49 +0000 (11:32 -0700)] 
Merge branch 'sk/spawn-less-case-insensitively-from-grep-O-i'

* sk/spawn-less-case-insensitively-from-grep-O-i:
  git grep -O -i: if the pager is 'less', pass the '-I' option

10 years agoMerge branch 'jd/subtree'
Junio C Hamano [Fri, 6 Jun 2014 18:32:21 +0000 (11:32 -0700)] 
Merge branch 'jd/subtree'

* jd/subtree:
  contrib/subtree: allow adding an annotated tag
  contrib/subtree/Makefile: clean up rule for "clean"
  contrib/subtree/Makefile: clean up rules to generate documentation
  contrib/subtree/Makefile: s/libexecdir/gitexecdir/
  contrib/subtree/Makefile: use GIT-VERSION-FILE
  contrib/subtree/Makefile: scrap unused $(gitdir)

10 years agoMerge branch 'wk/doc-clarify-upstream'
Junio C Hamano [Fri, 6 Jun 2014 18:32:13 +0000 (11:32 -0700)] 
Merge branch 'wk/doc-clarify-upstream'

* wk/doc-clarify-upstream:
  Documentation: mention config sources for @{upstream}

10 years agoMerge branch 'tb/unicode-6.3-zero-width'
Junio C Hamano [Fri, 6 Jun 2014 18:29:38 +0000 (11:29 -0700)] 
Merge branch 'tb/unicode-6.3-zero-width'

Update the logic to compute the display width needed for utf8
strings and allow us to more easily maintain the tables used in
that logic.

We may want to let the users choose if codepoints with ambiguous
widths are treated as a double or single width in a follow-up patch.

* tb/unicode-6.3-zero-width:
  utf8: make it easier to auto-update git_wcwidth()
  utf8.c: use a table for double_width

10 years agoMerge branch 'jk/index-pack-report-missing'
Junio C Hamano [Fri, 6 Jun 2014 18:28:13 +0000 (11:28 -0700)] 
Merge branch 'jk/index-pack-report-missing'

* jk/index-pack-report-missing:
  index-pack: distinguish missing objects from type errors

10 years agoMerge branch 'bc/blame-crlf-test'
Junio C Hamano [Fri, 6 Jun 2014 18:26:50 +0000 (11:26 -0700)] 
Merge branch 'bc/blame-crlf-test'

If a file contained CRLF line endings in a repository with
core.autocrlf=input, then blame always marked lines as "Not
Committed Yet", even if they were unmodified.

* bc/blame-crlf-test:
  blame: correctly handle files regardless of autocrlf

10 years agoMerge branch 'sk/submodules-absolute-path-on-windows'
Junio C Hamano [Fri, 6 Jun 2014 18:26:38 +0000 (11:26 -0700)] 
Merge branch 'sk/submodules-absolute-path-on-windows'

* sk/submodules-absolute-path-on-windows:
  Revert "submodules: fix ambiguous absolute paths under Windows"

10 years agoMerge branch 'dk/blame-reorg'
Junio C Hamano [Fri, 6 Jun 2014 18:24:44 +0000 (11:24 -0700)] 
Merge branch 'dk/blame-reorg'

"git blame" has been optimized greatly by reorganising the data
structure that is used to keep track of the work to be done, thanks
to David Karstrup <dak@gnu.org>.

* dk/blame-reorg:
  blame: large-scale performance rewrite

10 years agoMerge branch 'wg/svn-fe-style-fixes'
Junio C Hamano [Fri, 6 Jun 2014 18:24:32 +0000 (11:24 -0700)] 
Merge branch 'wg/svn-fe-style-fixes'

* wg/svn-fe-style-fixes:
  svn-fe: conform to pep8

10 years agoMerge branch 'jn/contrib-remove-vim'
Junio C Hamano [Fri, 6 Jun 2014 18:24:30 +0000 (11:24 -0700)] 
Merge branch 'jn/contrib-remove-vim'

Spring cleaning of contrib/.

* jn/contrib-remove-vim:
  contrib: remove vim support instructions

10 years agoMerge branch 'jn/contrib-remove-diffall'
Junio C Hamano [Fri, 6 Jun 2014 18:23:46 +0000 (11:23 -0700)] 
Merge branch 'jn/contrib-remove-diffall'

Spring cleaning of contrib/.

* jn/contrib-remove-diffall:
  contrib: remove git-diffall

10 years agoMerge branch 'dt/merge-recursive-case-insensitive'
Junio C Hamano [Fri, 6 Jun 2014 18:23:13 +0000 (11:23 -0700)] 
Merge branch 'dt/merge-recursive-case-insensitive'

On a case insensitive filesystem, merge-recursive incorrectly
deleted the file that is to be renamed to a name that is the same
except for case differences.

* dt/merge-recursive-case-insensitive:
  mv: allow renaming to fix case on case insensitive filesystems
  merge-recursive.c: fix case-changing merge bug

10 years agoMerge branch 'rs/reflog-exists'
Junio C Hamano [Fri, 6 Jun 2014 18:23:04 +0000 (11:23 -0700)] 
Merge branch 'rs/reflog-exists'

* rs/reflog-exists:
  checkout.c: use ref_exists instead of file_exist
  refs.c: add new functions reflog_exists and delete_reflog

10 years agoMerge branch 'tg/tag-state-tag-name-in-editor-hints'
Junio C Hamano [Fri, 6 Jun 2014 18:22:24 +0000 (11:22 -0700)] 
Merge branch 'tg/tag-state-tag-name-in-editor-hints'

* tg/tag-state-tag-name-in-editor-hints:
  builtin/tag.c: show tag name to hint in the message editor

10 years agoMerge branch 'jk/grep-tell-run-command-to-cd-when-running-pager'
Junio C Hamano [Fri, 6 Jun 2014 18:21:49 +0000 (11:21 -0700)] 
Merge branch 'jk/grep-tell-run-command-to-cd-when-running-pager'

* jk/grep-tell-run-command-to-cd-when-running-pager:
  grep: use run-command's "dir" option for --open-files-in-pager

10 years agoMerge branch 'fc/status-printf-squelch-format-zero-length-warnings'
Junio C Hamano [Fri, 6 Jun 2014 18:21:47 +0000 (11:21 -0700)] 
Merge branch 'fc/status-printf-squelch-format-zero-length-warnings'

* fc/status-printf-squelch-format-zero-length-warnings:
  silence a bunch of format-zero-length warnings

10 years agoMerge branch 'jk/squelch-compiler-warning-from-funny-error-macro'
Junio C Hamano [Fri, 6 Jun 2014 18:21:36 +0000 (11:21 -0700)] 
Merge branch 'jk/squelch-compiler-warning-from-funny-error-macro'

* jk/squelch-compiler-warning-from-funny-error-macro:
  let clang use the constant-return error() macro
  inline constant return from error() function

10 years agoMerge branch 'dk/raise-core-deltabasecachelimit'
Junio C Hamano [Fri, 6 Jun 2014 18:18:34 +0000 (11:18 -0700)] 
Merge branch 'dk/raise-core-deltabasecachelimit'

The `core.deltabasecachelimit` used to default to 16 MiB , but this
proved to be too small, and has been bumped to 96 MiB.

* dk/raise-core-deltabasecachelimit:
  Bump core.deltaBaseCacheLimit to 96m

10 years agoMerge branch 'tl/relax-in-poll-emulation'
Junio C Hamano [Fri, 6 Jun 2014 18:18:29 +0000 (11:18 -0700)] 
Merge branch 'tl/relax-in-poll-emulation'

* tl/relax-in-poll-emulation:
  compat/poll: sleep 1 millisecond to avoid busy wait

10 years agoMerge branch 'jk/utf8-switch-between-nfd-and-nfc'
Junio C Hamano [Fri, 6 Jun 2014 18:18:26 +0000 (11:18 -0700)] 
Merge branch 'jk/utf8-switch-between-nfd-and-nfc'

Document a known breakage with a test.

* jk/utf8-switch-between-nfd-and-nfc:
  t3910: show failure of core.precomposeunicode with decomposed filenames

10 years agoMerge branch 'da/imap-send-use-credential-helper'
Junio C Hamano [Fri, 6 Jun 2014 18:17:56 +0000 (11:17 -0700)] 
Merge branch 'da/imap-send-use-credential-helper'

"git imap-send" learns to ask the credential helper for
authentication material.

* da/imap-send-use-credential-helper:
  imap-send: use git-credential

10 years agoMerge branch 'je/pager-do-not-recurse'
Junio C Hamano [Fri, 6 Jun 2014 18:16:59 +0000 (11:16 -0700)] 
Merge branch 'je/pager-do-not-recurse'

We used to unconditionally disable the pager in the pager process
we spawn to feed out output, but that prevented people who want to
run "less" within "less" from doing so.

* je/pager-do-not-recurse:
  pager: do allow spawning pager recursively

10 years agoMerge branch 'jk/commit-C-pick-empty'
Junio C Hamano [Fri, 6 Jun 2014 18:16:04 +0000 (11:16 -0700)] 
Merge branch 'jk/commit-C-pick-empty'

"git commit --allow-empty-message -C $commit" did not work when the
commit did not have any log message.

* jk/commit-C-pick-empty:
  commit: do not complain of empty messages from -C

10 years agoMerge branch 'mm/pager-less-sans-S'
Junio C Hamano [Fri, 6 Jun 2014 18:02:59 +0000 (11:02 -0700)] 
Merge branch 'mm/pager-less-sans-S'

Since the very beginning of Git, we gave the LESS environment a
default value "FRSX" when we spawn "less" as the pager.  "S" (chop
long lines instead of wrapping) has been removed from this default
set of options, because it is more or less a personal taste thing,
as opposed to others that have good justifications (i.e. "R" is very
much justified because many kinds of output we produce are colored
and "FX" is justified because output we produce is often shorter
than a page).

Existing users who prefer not to see line-wrapped output may want to
set

  $ git config core.pager "less -S"

to restore the traditional behaviour.  It is expected that people
find output from the most subcommands easier to read with the new
default, except for "blame" which tends to produce really long
lines.  To override the new default only for "git blame", you can do
this:

  $ git config pager.blame "less -S"

* mm/pager-less-sans-S:
  pager: remove 'S' from $LESS by default

10 years agoshortlog: allow --exclude=<glob> to be passed
Junio C Hamano [Fri, 30 May 2014 19:57:25 +0000 (12:57 -0700)] 
shortlog: allow --exclude=<glob> to be passed

These two commands are supposed to be equivalent:

  $ git log --exclude=refs/notes/\* --all --no-merges --since=2.days |
    git shortlog
  $ git shortlog --exclude=refs/notes/\* --all --no-merges --since=2.days

However, the latter does not understand the ref-exclusion command
line option, even though other options understood by "log", such as
"--all" and "--no-merges", are understood.

This was because e7b432c5 (revision: introduce --exclude=<glob> to
tame wildcards, 2013-08-30) did not wire the new option fully to the
machinery.  A new option understood by handle_revision_pseudo_opt()
must be told to handle_revision_opt() as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoupdate-index: fix segfault with missing --cacheinfo argument
Jeff King [Wed, 4 Jun 2014 07:11:11 +0000 (03:11 -0400)] 
update-index: fix segfault with missing --cacheinfo argument

Running "git update-index --cacheinfo" without any further
arguments results in a segfault rather than an error
message. Commit ec160ae (update-index: teach --cacheinfo a
new syntax "mode,sha1,path", 2014-03-23) added code to
examine the format of the argument, but forgot to handle the
NULL case.

Returning an error from the parser is enough, since we then
treat it as an old-style "--cacheinfo <mode> <sha1> <path>",
and complain that we have less than 3 arguments to read.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoFirst batch for 2.1
Junio C Hamano [Tue, 3 Jun 2014 19:08:37 +0000 (12:08 -0700)] 
First batch for 2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agoMerge branch 'sk/msvc-dynlink-crt'
Junio C Hamano [Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)] 
Merge branch 'sk/msvc-dynlink-crt'

* sk/msvc-dynlink-crt:
  MSVC: link dynamically to the CRT

10 years agoMerge branch 'ew/config-protect-mode'
Junio C Hamano [Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)] 
Merge branch 'ew/config-protect-mode'

* ew/config-protect-mode:
  config: preserve config file permissions on edits

10 years agoMerge branch 'bg/strbuf-trim'
Junio C Hamano [Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)] 
Merge branch 'bg/strbuf-trim'

* bg/strbuf-trim:
  api-strbuf.txt: add docs for _trim and _ltrim
  strbuf: use _rtrim and _ltrim in strbuf_trim

10 years agoMerge branch 'jk/commit-date-approxidate'
Junio C Hamano [Tue, 3 Jun 2014 19:06:46 +0000 (12:06 -0700)] 
Merge branch 'jk/commit-date-approxidate'

* jk/commit-date-approxidate:
  commit: accept more date formats for "--date"
  commit: print "Date" line when the user has set date
  pretty: make show_ident_date public
  commit: use split_ident_line to compare author/committer

10 years agoMerge branch 'ep/shell-command-substitution'
Junio C Hamano [Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)] 
Merge branch 'ep/shell-command-substitution'

Adjust shell scripts to use $(cmd) instead of `cmd`.

* ep/shell-command-substitution: (41 commits)
  t5000-tar-tree.sh: use the $( ... ) construct for command substitution
  t4204-patch-id.sh: use the $( ... ) construct for command substitution
  t4119-apply-config.sh: use the $( ... ) construct for command substitution
  t4116-apply-reverse.sh: use the $( ... ) construct for command substitution
  t4057-diff-combined-paths.sh: use the $( ... ) construct for command substitution
  t4038-diff-combined.sh: use the $( ... ) construct for command substitution
  t4036-format-patch-signer-mime.sh: use the $( ... ) construct for command substitution
  t4014-format-patch.sh: use the $( ... ) construct for command substitution
  t4013-diff-various.sh: use the $( ... ) construct for command substitution
  t4012-diff-binary.sh: use the $( ... ) construct for command substitution
  t4010-diff-pathspec.sh: use the $( ... ) construct for command substitution
  t4006-diff-mode.sh: use the $( ... ) construct for command substitution
  t3910-mac-os-precompose.sh: use the $( ... ) construct for command substitution
  t3905-stash-include-untracked.sh: use the $( ... ) construct for command substitution
  t1050-large.sh: use the $( ... ) construct for command substitution
  t1020-subdirectory.sh: use the $( ... ) construct for command substitution
  t1004-read-tree-m-u-wf.sh: use the $( ... ) construct for command substitution
  t1003-read-tree-prefix.sh: use the $( ... ) construct for command substitution
  t1002-read-tree-m-u-2way.sh: use the $( ... ) construct for command substitution
  t1001-read-tree-m-2way.sh: use the $( ... ) construct for command substitution
  ...

10 years agoMerge branch 'fc/rerere-conflict-style'
Junio C Hamano [Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)] 
Merge branch 'fc/rerere-conflict-style'

* fc/rerere-conflict-style:
  rerere: fix for merge.conflictstyle

10 years agoMerge branch 'dt/api-doc-setup-gently'
Junio C Hamano [Tue, 3 Jun 2014 19:06:45 +0000 (12:06 -0700)] 
Merge branch 'dt/api-doc-setup-gently'

* dt/api-doc-setup-gently:
  docs: document RUN_SETUP_GENTLY and clarify RUN_SETUP

10 years agoMerge branch 'fc/mergetool-prompt'
Junio C Hamano [Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)] 
Merge branch 'fc/mergetool-prompt'

mergetool.prompt used to default to 'true', always causing a confirmation
"do you really want to run the tool on this path" to be shown.

Among the two purposes the prompt serves, ignore the use case to
confirm that the user wants to view particular path with the named
tool, and make the prompt only to confirm the choice of the tool
made by autodetection and defaulting.  For those who configured the
tool explicitly, the prompt shown for the latter purpose is simply
annoying.

Strictly speaking, this is a backward incompatible change and the
users need to explicitly set the variable to 'true' if they want to
resurrect the now-ignored use case.

* fc/mergetool-prompt:
  mergetool: document the default for --[no-]prompt
  mergetool: run prompt only if guessed tool

10 years agoMerge branch 'mm/mediawiki-encoding-fix'
Junio C Hamano [Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)] 
Merge branch 'mm/mediawiki-encoding-fix'

* mm/mediawiki-encoding-fix:
  git-remote-mediawiki: fix encoding issue for UTF-8 media files
  git-remote-mediawiki: allow stop/start-ing the test server

10 years agoMerge branch 'sk/tag-contains-wo-recursion'
Junio C Hamano [Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)] 
Merge branch 'sk/tag-contains-wo-recursion'

* sk/tag-contains-wo-recursion:
  git tag --contains: avoid stack overflow

10 years agoMerge branch 'ef/send-email-absolute-path-to-the-command'
Junio C Hamano [Tue, 3 Jun 2014 19:06:44 +0000 (12:06 -0700)] 
Merge branch 'ef/send-email-absolute-path-to-the-command'

* ef/send-email-absolute-path-to-the-command:
  send-email: windows drive prefix (e.g. C:) appears only at the beginning
  send-email: recognize absolute path on Windows

10 years agoMerge branch 'jx/blame-align-relative-time'
Junio C Hamano [Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)] 
Merge branch 'jx/blame-align-relative-time'

"git blame" miscounted number of columns needed to show localized
timestamps, resulting in jaggy left-side-edge of the source code
lines in its output.

* jx/blame-align-relative-time:
  blame: dynamic blame_date_width for different locales
  blame: fix broken time_buf paddings in relative timestamp

10 years agoMerge branch 'lr/git-run-setup-gently'
Junio C Hamano [Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)] 
Merge branch 'lr/git-run-setup-gently'

* lr/git-run-setup-gently:
  git.c: treat RUN_SETUP_GENTLY and RUN_SETUP as mutually exclusive

10 years agoMerge branch 'fc/mergetools-vimdiff3'
Junio C Hamano [Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)] 
Merge branch 'fc/mergetools-vimdiff3'

* fc/mergetools-vimdiff3:
  mergetools: add vimdiff3 mode

10 years agoMerge branch 'fc/merge-default-to-upstream'
Junio C Hamano [Tue, 3 Jun 2014 19:06:43 +0000 (12:06 -0700)] 
Merge branch 'fc/merge-default-to-upstream'

"git merge" without argument, even when there is an upstream
defined for the current branch, refused to run until
merge.defaultToUpstream is set to true. Flip the default of that
configuration variable to true.

* fc/merge-default-to-upstream:
  merge: enable defaulttoupstream by default

10 years agoMerge branch 'jk/external-diff-use-argv-array'
Junio C Hamano [Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)] 
Merge branch 'jk/external-diff-use-argv-array'

Code clean-up (and a bugfix which has been merged for 2.0).

* jk/external-diff-use-argv-array:
  run_external_diff: refactor cmdline setup logic
  run_external_diff: hoist common bits out of conditional
  run_external_diff: drop fflush(NULL)
  run_external_diff: clean up error handling
  run_external_diff: use an argv_array for the environment

10 years agoMerge branch 'sk/svn-parse-datestamp'
Junio C Hamano [Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)] 
Merge branch 'sk/svn-parse-datestamp'

* sk/svn-parse-datestamp:
  SVN.pm::parse_svn_date: allow timestamps with a single-digit hour

10 years agoMerge branch 'rs/ref-update-check-errors-early'
Junio C Hamano [Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)] 
Merge branch 'rs/ref-update-check-errors-early'

* rs/ref-update-check-errors-early:
  commit.c: check for lock error and return early
  sequencer.c: check for lock failure and bail early in fast_forward_to

10 years agoMerge branch 'nd/index-pack-one-fd-per-thread'
Junio C Hamano [Tue, 3 Jun 2014 19:06:42 +0000 (12:06 -0700)] 
Merge branch 'nd/index-pack-one-fd-per-thread'

Enable threaded index-pack on platforms without thread-unsafe
pread() emulation.

* nd/index-pack-one-fd-per-thread:
  index-pack: work around thread-unsafe pread()

10 years agoMerge branch 'ym/fix-opportunistic-index-update-race'
Junio C Hamano [Tue, 3 Jun 2014 19:06:41 +0000 (12:06 -0700)] 
Merge branch 'ym/fix-opportunistic-index-update-race'

Read-only operations such as "git status" that internally refreshes
the index write out the refreshed index to the disk to optimize
future accesses to the working tree, but this could race with a
"read-write" operation that modify the index while it is running.
Detect such a race and avoid overwriting the index.

Duy raised a good point that we may need to do the same for the
normal writeout codepath, not just the "opportunistic" update
codepath.  While that is true, nobody sane would be running two
simultaneous operations that are clearly write-oriented competing
with each other against the same index file.  So in that sense that
can be done as a less urgent follow-up for this topic.

* ym/fix-opportunistic-index-update-race:
  read-cache.c: verify index file before we opportunistically update it
  wrapper.c: add xpread() similar to xread()

10 years agoMerge branch 'mh/ref-transaction'
Junio C Hamano [Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)] 
Merge branch 'mh/ref-transaction'

Update "update-ref --stdin [-z]" and then introduce a transactional
support for (multi-)reference updates.

* mh/ref-transaction: (27 commits)
  ref_transaction_commit(): work with transaction->updates in place
  struct ref_update: add a type field
  struct ref_update: add a lock field
  ref_transaction_commit(): simplify code using temporary variables
  struct ref_update: store refname as a FLEX_ARRAY
  struct ref_update: rename field "ref_name" to "refname"
  refs: remove API function update_refs()
  update-ref --stdin: reimplement using reference transactions
  refs: add a concept of a reference transaction
  update-ref --stdin: harmonize error messages
  update-ref --stdin: improve the error message for unexpected EOF
  t1400: test one mistake at a time
  update-ref --stdin -z: deprecate interpreting the empty string as zeros
  update-ref.c: extract a new function, parse_next_sha1()
  t1400: test that stdin -z update treats empty <newvalue> as zeros
  update-ref --stdin: simplify error messages for missing oldvalues
  update-ref --stdin: make error messages more consistent
  update-ref --stdin: improve error messages for invalid values
  update-ref.c: extract a new function, parse_refname()
  parse_cmd_verify(): copy old_sha1 instead of evaluating <oldvalue> twice
  ...

10 years agoMerge branch 'ks/tree-diff-nway'
Junio C Hamano [Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)] 
Merge branch 'ks/tree-diff-nway'

Instead of running N pair-wise diff-trees when inspecting a
N-parent merge, find the set of paths that were touched by walking
N+1 trees in parallel.  These set of paths can then be turned into
N pair-wise diff-tree results to be processed through rename
detections and such.  And N=2 case nicely degenerates to the usual
2-way diff-tree, which is very nice.

* ks/tree-diff-nway:
  mingw: activate alloca
  combine-diff: speed it up, by using multiparent diff tree-walker directly
  tree-diff: rework diff_tree() to generate diffs for multiparent cases as well
  Portable alloca for Git
  tree-diff: reuse base str(buf) memory on sub-tree recursion
  tree-diff: no need to call "full" diff_tree_sha1 from show_path()
  tree-diff: rework diff_tree interface to be sha1 based
  tree-diff: diff_tree() should now be static
  tree-diff: remove special-case diff-emitting code for empty-tree cases
  tree-diff: simplify tree_entry_pathcmp
  tree-diff: show_path prototype is not needed anymore
  tree-diff: rename compare_tree_entry -> tree_entry_pathcmp
  tree-diff: move all action-taking code out of compare_tree_entry()
  tree-diff: don't assume compare_tree_entry() returns -1,0,1
  tree-diff: consolidate code for emitting diffs and recursion in one place
  tree-diff: show_tree() is not needed
  tree-diff: no need to pass match to skip_uninteresting()
  tree-diff: no need to manually verify that there is no mode change for a path
  combine-diff: move changed-paths scanning logic into its own function
  combine-diff: move show_log_first logic/action out of paths scanning

10 years agoMerge branch 'jc/apply-ignore-whitespace'
Junio C Hamano [Tue, 3 Jun 2014 19:06:40 +0000 (12:06 -0700)] 
Merge branch 'jc/apply-ignore-whitespace'

"--ignore-space-change" option of "git apply" ignored the
spaces at the beginning of line too aggressively, which is
inconsistent with the option of the same name "diff" and "git diff"
have.

* jc/apply-ignore-whitespace:
  apply --ignore-space-change: lines with and without leading whitespaces do not match

10 years agoMerge branch 'as/grep-fullname-config'
Junio C Hamano [Tue, 3 Jun 2014 19:06:39 +0000 (12:06 -0700)] 
Merge branch 'as/grep-fullname-config'

Add a configuration variable to force --full-name to be default for
"git grep".

This may cause regressions on scripted users that do not expect
this new behaviour.

* as/grep-fullname-config:
  grep: add grep.fullName config variable

10 years agodir.c:trim_trailing_spaces(): fix for " \ " sequence
Pasha Bolokhov [Mon, 2 Jun 2014 22:36:56 +0000 (15:36 -0700)] 
dir.c:trim_trailing_spaces(): fix for " \ " sequence

Discard the unnecessary 'nr_spaces' variable, remove 'strlen()' and
improve the 'if' structure.  Switch to pointers instead of integers
to control the loop.

Slightly more rare occurrences of 'text  \    ' with a backslash
in between spaces are handled correctly.  Namely, the code in
7e2e4b37 (dir: ignore trailing spaces in exclude patterns, 2014-02-09)
does not reset 'last_space' when a backslash is encountered and the above
line stays intact as a result.

Add a test at the end of t/t0008-ignores.sh to exhibit this behavior.

Signed-off-by: Pasha Bolokhov <pasha.bolokhov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agomailinfo: use strcmp() for string comparison
RenĂ© Scharfe [Sun, 1 Jun 2014 09:00:40 +0000 (11:00 +0200)] 
mailinfo: use strcmp() for string comparison

The array header is defined as:

static const char *header[MAX_HDR_PARSED] = {
     "From","Subject","Date",
};

When looking for the index of a specfic string in that array, simply
use strcmp() instead of memcmp().  This avoids running over the end of
the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of
magic string length constants.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agofix brown paper bag breakage in t5150-request-pull.sh
Johannes Sixt [Mon, 2 Jun 2014 07:06:56 +0000 (09:06 +0200)] 
fix brown paper bag breakage in t5150-request-pull.sh

The recent addition to the test case 'pull request format' interrupted
the single-quoted text, effectively adding a third argument to the
test_expect_success command. Since we do not have a prerequisite named
"pull request format", the test is skipped, no matter what. Additionally,
the file name argument to the grep command is missing. Fix both issues.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agosideband.c: do not use ANSI control sequence on non-terminal
Michael Naumov [Wed, 28 May 2014 03:12:15 +0000 (03:12 +0000)] 
sideband.c: do not use ANSI control sequence on non-terminal

Diagnostic messages received on the sideband #2 from the server side
are sent to the standard error with ANSI terminal control sequence
"\033[K" that erases to the end of line appended at the end of each
line.

However, some programs (e.g. GitExtensions for Windows) read and
interpret and/or show the message without understanding the terminal
control sequences, resulting them to be shown to their end users.
To help these programs, squelch the control sequence when the
standard error stream is not being sent to a tty.

NOTE: I considered to cover the case that a pager has already been
started. But decided that is probably not worth worrying about here,
though, as we shouldn't be using a pager for commands that do network
communications (and if we do, omitting the magic line-clearing signal
is probably a sane thing to do).

Thanks-to: Erik Faye-Lund <kusmabite@gmail.com>
Thanks-to: Jeff King <peff@peff.net>
Signed-off-by: Michael Naumov <mnaoumov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
10 years agocompat/bswap.h: fix endianness detection
Ben Walton [Fri, 30 May 2014 15:22:40 +0000 (16:22 +0100)] 
compat/bswap.h: fix endianness detection

The changes to make detection of endianness more portable had a bug
that breaks on (at least) Solaris x86.

The bug appears to be a simple copy/paste typo. It checks for
_BIG_ENDIAN and not _LITTLE_ENDIAN for both the case where we would
decide the system is big endian and little endian. Instead, the
second test should be for _LITTLE_ENDIAN and not _BIG_ENDIAN.

Two fixes were possible:

 1. Change the negation order of the conditions in the second test.
 2. Reverse the order of the conditions in the second test.

Use the second option so that the condition we expect is always a
positive check.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>