pretty: add %D format specifier

Add a new format specifier, '%D' that is identical in behaviour to '%d',
except that it does not include the ' (' prefix or ')' suffix provided
by '%d'.

Signed-off-by: Harry Jeffery <harry@exec64.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'hj/pretty-naked-decoration' into jch

* hj/pretty-naked-decoration:
  pretty: add %D format specifier

# Conflicts:
# 	log-tree.c
Merge branch 'sp/stream-clean-filter' into jch

Rerolled.  Comments & reviews?

* sp/stream-clean-filter:
  convert: stream from fd to required clean filter to reduce used address space
  copy_fd(): do not close the input file descriptor
  mmap_limit: introduce GIT_MMAP_LIMIT to allow testing expected mmap size
  memory_limit: use git_env_ulong() to parse GIT_ALLOC_LIMIT
  config.c: add git_env_ulong() to parse environment variable
  convert: drop arguments other than 'path' from would_convert_to_git()

# Conflicts:
# 	wrapper.c
Merge branch 'tr/remerge-diff' into jch

"log -p" output learns a new way to let users inspect a merge
commit by showing the differences between the automerged result
with conflicts the person who recorded the merge would have seen
and the final conflict resolution that was recorded in the merge.

Review comments sent.

* tr/remerge-diff:
  log --remerge-diff: show what the conflict resolution changed
  name-hash: allow dir hashing even when !ignore_case
  merge-recursive: allow storing conflict hunks in index
  merge_diff_mode: fold all merge diff variants into an enum
  combine-diff: do not pass revs->dense_combined_merges redundantly
  merge-recursive: -Xindex-only to leave worktree unchanged
  merge-recursive: internal flag to avoid touching the worktree
  merge-recursive: remove dead conditional in update_stages()

# Conflicts:
# 	merge-recursive.c
Merge branch 'da/rev-parse-verify-quiet' into jch

* da/rev-parse-verify-quiet:
  stash: prefer --quiet over shell redirection of the standard error stream
  refs: make rev-parse --quiet actually quiet
  t1503: use test_must_be_empty
  Documentation: a note about stdout for git rev-parse --verify --quiet
Merge branch 'da/include-compat-util-first-in-c' into jch

* da/include-compat-util-first-in-c:
  SQUASH???
  check-headers: add header usage checks for .c files
  Makefile: add check-headers target
  cleanups: ensure that git-compat-util.h is included first
Merge branch 'cc/interpret-trailers' into pu

A new filter to programatically edit the tail end of the commit log
messages.

Rerolled, with some review comments but not much; it seems that we
will see another reroll?

* cc/interpret-trailers:
  Documentation: add documentation for 'git interpret-trailers'
  trailer: add tests for commands in config file
  trailer: execute command from 'trailer.<name>.command'
  trailer: add tests for "git interpret-trailers"
  trailer: add interpret-trailers command
  trailer: put all the processing together and print
  trailer: parse trailers from file or stdin
  trailer: process command line trailer arguments
  trailer: read and process config information
  trailer: process trailers from input message and arguments
  trailer: add data structures and basic functions
Merge branch 'mh/lockfile' into pu

Rerolled, reviews in progress; it seems that we will see another reroll?

* mh/lockfile: (35 commits)
  get_locked_file_path(): new function
  lockfile.c: rename static functions
  lockfile: rename LOCK_NODEREF to LOCK_NO_DEREF
  commit_locked_index(): extract a function commit_lock_file_to()
  trim_last_path_component(): replace last_path_elm()
  resolve_symlink(): take a strbuf parameter
  resolve_symlink(): use a strbuf for internal scratch space
  struct lock_file: change the filename member into a strbuf
  commit_lock_file(): use a strbuf to manage temporary space
  try_merge_strategy(): use a statically-allocated lock_file object
  try_merge_strategy(): remove redundant lock_file allocation
  struct lock_file: declare some fields volatile
  lockfile: avoid transitory invalid states
  git_config_set_multivar_in_file(): avoid call to rollback_lock_file()
  dump_marks(): remove a redundant call to rollback_lock_file()
  api-lockfile: document edge cases
  commit_lock_file(): rollback lock file on failure to rename
  commit_lock_file(): if close fails, roll back
  commit_lock_file(): die() if called for unlocked lockfile object
  commit_lock_file(): inline temporary variable
  ...

# Conflicts:
# 	lockfile.c
# 	refs.c
Merge branch 'nd/multiple-work-trees' into pu

A replacement for contrib/workdir/git-new-workdir that does not
rely on symbolic links and make sharing of objects and refs safer
by making the borrowee and borrowers aware of each other.

Rerolled, reviews in progress; it seems that we will see another reroll?

* nd/multiple-work-trees: (32 commits)
  t2025: add a test to make sure grafts is working from a linked checkout
  checkout: don't require a work tree when checking out into a new one
  git_path(): keep "info/sparse-checkout" per work-tree
  count-objects: report unused files in $GIT_DIR/worktrees/...
  gc: support prune --worktrees
  gc: factor out gc.pruneexpire parsing code
  gc: style change -- no SP before closing parenthesis
  checkout: clean up half-prepared directories in --to mode
  checkout: reject if the branch is already checked out elsewhere
  prune: strategies for linked checkouts
  checkout: support checking out into a new working directory
  use new wrapper write_file() for simple file writing
  wrapper.c: wrapper to open a file, fprintf then close
  setup.c: support multi-checkout repo setup
  setup.c: detect $GIT_COMMON_DIR check_repository_format_gently()
  setup.c: convert check_repository_format_gently to use strbuf
  setup.c: detect $GIT_COMMON_DIR in is_git_directory()
  setup.c: convert is_git_directory() to use strbuf
  git-stash: avoid hardcoding $GIT_DIR/logs/....
  *.sh: avoid hardcoding $GIT_DIR/hooks/...
  ...

# Conflicts:
# 	builtin/gc.c
# 	builtin/receive-pack.c
# 	refs.c
# 	refs.h
# 	trace.c
# 	wrapper.c
Merge branch 'hv/submodule-config' into pu

Kicked back to 'pu' per request ($gmane/255610).

* hv/submodule-config:
  do not die on error of parsing fetchrecursesubmodules option
  use new config API for worktree configurations of submodules
  extract functions for submodule config set and lookup
  implement submodule config cache for lookup of submodule names
Merge branch 'jt/timer-settime' into pu

Reviewed, discussed and wanting for a reroll.

* jt/timer-settime:
  use timer_settime() for new platforms
  autoconf: check for timer_settime()
  autoconf: check for struct itimerspec
  autoconf: check for struct sigevent
  autoconf: check for struct timespec
  autoconf: check for timer_t
  autoconf: check for setitimer()
  autoconf: check for struct itimerval
  git-compat-util.h: add missing semicolon after struct itimerval
Merge branch 'jc/test-lazy-prereq' into pu

Test-script clean-up.

Comments & reviews?
Otherwise will merge to 'next'.

* jc/test-lazy-prereq:
  tests: drop GIT_*_TIMING_TESTS environment variable support
Merge branch 'mt/patch-id-stable' into pu

Teaches "git patch-id" to compute the patch ID that does not change
when the files in a single patch is reordered. As this new algorithm
is backward incompatible, the last bit to flip it to be the default
is left out of 'master' for now.

Nobody seems to be jumping up & down requesting this last step,
which makes the result somewhat backward incompatible.

* mt/patch-id-stable:
  patch-id: change default to stable
Merge branch 'cb/mergetool-difftool' into pu

Update the way the "difftool --help" shows the help message that is
shared with the "mergetool" to reduce one shell dependency.

* cb/mergetool-difftool:
  difftool: don't assume that default sh is sane
  mergetool: don't require a work tree for --tool-help
Merge branch 'po/everyday-doc' into pu

This may make the said command to emit something, but the source is
not meant to be formatted into a manual pages to begin with, and
also its contents are a bit stale.  It may be a good first step in
the right direction, but needs more work to at least get the
mark-up right before public consumption.

* po/everyday-doc:
  Make 'git help everyday' work

# Conflicts:
# 	Documentation/Makefile
Merge branch 'jk/pack-bitmap' into pu

Hold, waiting for Karsten's replacement.

* jk/pack-bitmap:
  pack-bitmap: do not use gcc packed attribute
Merge branch 'rr/mergetool-temporary-filename-tweak' into pu

* rr/mergetool-temporary-filename-tweak:
  Allow the user to change the temporary file name for mergetool
Merge branch 'rh/prompt-tests' into pu

to be broken with older zsh that are still in the field ($gmane/251231).

* rh/prompt-tests:
  t9904: new __git_ps1 tests for Zsh
  test-lib: make it possible to override how test code is eval'd
  lib-prompt-tests.sh: add variable for string that encodes percent in PS1
  lib-prompt-tests.sh: put all tests inside a function
  t9903: move prompt tests to a new lib-prompt-tests.sh file
  t9903: move PS1 color code variable definitions to lib-bash.sh
  t9903: include "Bash" in test names via new $shellname var
  t9903: run pc mode tests again with PS1 expansion disabled
  t9903: move test name prefix to a separate variable
  t9903: put the Bash pc mode prompt test cases in a function
  t9903: remove Zsh test from the suite of Bash prompt tests
Merge branch 'bg/rebase-off-of-previous-branch' into pu

Teach "git rebase -" to report the concrete name of the branch
(i.e. the previous one).

But it stops short and does not do the same for "git rebase @{-1}".

* bg/rebase-off-of-previous-branch:
  git-rebase: print name of rev when using shorthand
Merge branch 'rb/merge-prepare-commit-msg-hook' into pu

Expose more merge states (e.g. $GIT_DIR/MERGE_MODE) to hooks that
run during "git merge".  The log message stresses too much on one
hook, prepare-commit-msg, but it would equally apply to other hooks
like post-merge, I think.

* rb/merge-prepare-commit-msg-hook:
  merge: drop unused arg from abort_commit method signature
  merge: make prepare_to_commit responsible for write_merge_state
  t7505: ensure cleanup after hook blocks merge
  t7505: add missing &&

# Conflicts:
# 	builtin/merge.c
# 	t/t7505-prepare-commit-msg-hook.sh