Documentation/CodingGuidelines: spell out more shell guidelines

In earlier days, "imitate the style in the neibouring code" was
sufficient to keep the coherent style, but over time some parts of
the codebase have drifted enough to make it ineffective.

Spell some of the guidelines out.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon: --access-hook option

The --access-hook option to "git daemon" specifies an external
command to be run every time a client connects, with

 - service name (e.g. "upload-pack", etc.),
 - path to the repository,
 - hostname (%H),
 - canonical hostname (%CH),
 - ip address (%IP),
 - tcp port (%P)

as its command line arguments.  The external command can decide to
decline the service by exiting with a non-zero status (or to allow it
by exiting with a zero status).  It can also look at the $REMOTE_ADDR
and $REMOTE_PORT environment variables to learn about the requestor
when making this decision.

The external command can optionally write a single line to its
standard output to be sent to the requestor as an error message when
it declines the service.

Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
rev-list docs: clarify --topo-order description

It was unclear what "--topo-order" was really about in the
documentation.  It is not just about "children before parent", but
also about "don't mix lineages".

Reword the description for both "--date-order" and "--topo-order",
and add an illustration to it.

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 (non regression).

* 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 (non regression).

* da/difftool-updates:
  Add Code Compare v2.80.4 as a merge / diff tool for Windows
  mergetool,difftool: Document --tool-help consistently
  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 (non regression).

* jc/test-prereq:
  fixup! t3910: use the UTF8_NFD_TO_NFC test prereq
  t3910: use the UTF8_NFD_TO_NFC 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 'jc/maint-config-exit-status' into jch

The exit status code from "git config" was way overspecified while
being incorrect.  Update the implementation to give the documented
status for a case that was documented, and introduce a new code for
"all other errors".

Not urgent (non regression).

* jc/maint-config-exit-status:
  config: "git config baa" should exit with status 1

Conflicts:
	builtin/config.c
Merge branch 'jk/maint-null-in-trees' into jch

We do not want a link to 0{40} object stored anywhere in our objects.

Not urgent (non regression).

* jk/maint-null-in-trees:
  fsck: detect null sha1 in tree entries
  do not write null sha1s to on-disk index
  diff: do not use null sha1 as a sentinel value

Conflicts:
	diff-no-index.c
	read-cache.c
Merge branch 'jc/maint-t7406-rev-parse-max-count-huh' into jch

Test clean-up, with no behaviour change.
Not urgent (non regression).

* jc/maint-t7406-rev-parse-max-count-huh:
  t7406: fix misleading "rev-parse --max-count=1 HEAD"
Merge branch 'pg/maint-apply-remove-unused-variable' into jch

Remove unused field.
Not urgent (non regression).

* pg/maint-apply-remove-unused-variable:
  apply: delete unused deflate_origlen from patch struct
Merge branch 'nd/index-errno' into jch

Assignments to errno before calling system functions that used to
matter in the old code were left behind after the code structure
changed sufficiently to make them useless.

Not urgent (non regression).

* nd/index-errno:
  read_index_from: remove bogus errno assignments
Merge branch 'mk/test-seq' into jch

Add a compatibility/utility function to the test framework.

Not urgent (non regression).

* mk/test-seq:
  tests: Introduce test_seq
Merge branch 'ab/diff-write-incomplete-line' into jch

The output from "git diff -B" for a file that ends with an
incomplete line did not put "\ No newline..." on a line of its own.

Not urgent (non regression).

* ab/diff-write-incomplete-line:
  Fix '\ No newline...' annotation in rewrite diffs
Merge branch 'bc/receive-pack-stdout-protection' into jch

When "git push" triggered the automatic gc on the receiving end, a
message from "git prune" that said it was removing cruft leaked to
the standard output, breaking the communication protocol.

Not urgent (non regression).

* bc/receive-pack-stdout-protection:
  receive-pack: do not leak output from auto-gc to standard output
  t/t5400: demonstrate breakage caused by informational message from prune
Merge branch 'jc/maint-sane-execvp-notdir' into jch

"git foo" errored out with "Not a directory" when the user had a non
directory on $PATH, and worse yet it masked an alias "foo" to run.

Not urgent (non regression).

* jc/maint-sane-execvp-notdir:
  sane_execvp(): ignore non-directory on $PATH
Merge branch 'jc/sanitize-nkd-lazy-iconv-open' into jch

Teach the code that works around NKD/NKC gotcha on MacOS to call
iconv_open() only when it is necessary, in the hope of avoiding
set-up overhead.

Not urgent (non regression).

* jc/sanitize-nkd-lazy-iconv-open:
  macos: lazily initialize iconv
Merge branch 'tr/maint-send-email-2047' into jch

"git send-email" did not unquote encoded words that appear on the
header correctly, and lost "_" from strings.

Not urgent (non regression).

* tr/maint-send-email-2047:
  send-email: improve RFC2047 quote parsing
Merge branch 'cw/cherry-pick-allow-empty-message' into jch

"git cherry-pick" by default stops when it sees a commit without any
log message.  The "--allow-empty-message" option can be used to
silently proceed.

Not urgent (non regression).

* cw/cherry-pick-allow-empty-message:
  cherry-pick: add --allow-empty-message option