xdiff: add hunk_func()

Add a way to register a callback function that is gets passed the
start line and line count of each hunk of a diff.  Only standard
types are used.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
blame: use hunk_func(), part 1

Use blame_chunk_cb() directly as hunk_func() callback, without detour
through xdi_diff_hunks().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
blame: use hunk_func(), part 2

Use handle_split_cb() directly as hunk_func() callback, without going
through xdi_diff_hunks().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
blame: factor out helper for calling xdi_diff()

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff: remove emit_func() and xdi_diff_hunks()

The functions are unused now, remove them.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff: remove unused functions

The functions xdl_cha_first(), xdl_cha_next() and xdl_atol() are not used
by us.  While removing them increases the difference to the upstream
version of libxdiff, it only adds a bit to the more than 600 differing
lines in xutils.c (mmfile_t management was simplified significantly when
the library was imported initially).  Besides, if upstream modifies these
functions in the future, we won't need to think about importing those
changes, so in that sense it makes tracking modifications easier.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'lp/diffstat-with-graph' into maint

"log --graph" was not very friendly with "--stat" option and its output
had line breaks at wrong places.

By Lucian Poston (5) and Zbigniew Jędrzejewski-Szmek (3)
* lp/diffstat-with-graph:
  t4052: work around shells unable to set COLUMNS to 1
  test-lib: skip test with COLUMNS=1 under mksh
  Prevent graph_width of stat width from falling below min
  t4052: Test diff-stat output with minimum columns
  t4052: Adjust --graph --stat output for prefixes
  Adjust stat width calculations to take --graph output into account
  Add output_prefix_length to diff_options
  t4052: test --stat output with --graph
Merge branch 'jc/rerere-train' into maint

A contrib script "rerere-train" did not work out of the box unless user
futzed with her $PATH.

* jc/rerere-train:
  contrib/rerere-train: use installed git-sh-setup
Merge branch 'jk/maint-push-progress' into maint

"git push" over smart-http lost progress output a few releases ago.

By Jeff King
* jk/maint-push-progress:
  t5541: test more combinations of --progress
  teach send-pack about --[no-]progress
  send-pack: show progress when isatty(2)
Merge branch 'bw/submodule-sed-solaris' into maint

By Ben Walton
* bw/submodule-sed-solaris:
  Avoid bug in Solaris xpg4/sed as used in submodule
Merge branch 'nl/rebase-i-cheat-sheet' into maint

* nl/rebase-i-cheat-sheet:
  rebase -i: remind that the lines are top-to-bottom
Merge branch 'jk/http-backend-keep-committer-ident-env' into maint

By Jeff King
* jk/http-backend-keep-committer-ident-env:
  http-backend: respect existing GIT_COMMITTER_* variables

Conflicts:
	t/t5541-http-push.sh
Merge branch 'bw/test-fix-grep-gnuism' into maint

* bw/test-fix-grep-gnuism:
  t9400: fix gnuism in grep
Merge branch 'cc/fix-missing-va-end-in-revert' into maint

By Christian Couder
* cc/fix-missing-va-end-in-revert:
  revert: add missing va_end
Merge branch 'mm/include-userpath' into maint

By Jeff King
* mm/include-userpath:
  config: expand tildes in include.path variable
Update draft release notes to 1.7.10.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'maint'
Merge branch 'mh/ref-api-lazy-loose'

Refs API is updated to lazily read sub-hierarchies of refs/ namespace,
so that we do not have to grab everything from the filesystem when we
are only interested in listing branches, for example.

By Michael Haggerty (17) and Junio C Hamano (1)
* mh/ref-api-lazy-loose:
  refs: fix find_containing_dir() regression
  refs: read loose references lazily
  read_loose_refs(): eliminate ref_cache argument
  struct ref_dir: store a reference to the enclosing ref_cache
  search_for_subdir(): return (ref_dir *) instead of (ref_entry *)
  get_ref_dir(): add function for getting a ref_dir from a ref_entry
  read_loose_refs(): rename function from get_ref_dir()
  refs: wrap top-level ref_dirs in ref_entries
  find_containing_dir(): use strbuf in implementation of this function
  bisect: copy filename string obtained from git_path()
  do_for_each_reflog(): use a strbuf to hold logfile name
  do_for_each_reflog(): return early on error
  get_ref_dir(): take the containing directory as argument
  refs.c: extract function search_for_subdir()
  get_ref_dir(): require that the dirname argument ends in '/'
  get_ref_dir(): rename "base" parameter to "dirname"
  get_ref_dir(): use a strbuf to hold refname
  get_ref_dir(): return early if directory cannot be read
Merge branch 'nd/stream-to-archive'

Stream large blobs directly out to archive files without slurping
everything in memory first.

By René Scharfe (6) and Nguyễn Thái Ngọc Duy (4)
* nd/stream-to-archive:
  t5000: rationalize unzip tests
  archive-zip: streaming for deflated files
  archive-zip: streaming for stored files
  archive-zip: factor out helpers for writing sizes and CRC
  archive-zip: remove uncompressed_size
  archive-tar: stream large blobs to tar file
  archive: delegate blob reading to backend
  archive-tar: unindent write_tar_entry by one level
  archive-tar: turn write_tar_entry into blob-writing only
  streaming: void pointer instead of char pointer
Merge branch 'jc/install-no-hardlinks'

Your build platform may support hardlinks but you may prefer not to use
them, e.g. when installing to DESTDIR to make a tarball and untarring on
a filesystem that has poor support for hardlinks.

The Makefile in git-gui project may need to learn to honor the same
setting; it unconditionally creates git-citool by hardlinking git-gui.

* jc/install-no-hardlinks:
  Makefile: NO_INSTALL_HARDLINKS