Set TEST_DIRECTORY

Set TEST_DIRECTORY to the main git test area.  This allows the
git-subtree out-of-tree tests to run correctly.

Signed-off-by: David A. Greene <greened@obbligato.org>
Remove unnecessary git-subtree files

Remove various files that simply duplicate functionality already
provided by the main project files.

Signed-off-by: David A. Greene <greened@obbligato.org>
Use project config files

Use project-wide files to process documentation for git-subtree.

Signed-off-by: David A. Greene <greened@obbligato.org>
Use configure settings for git-subtree

Include config.make.autogen in the git-subtree contrib area to pick up
settings for prefix and other such things.

Signed-off-by: David A. Greene <greened@obbligato.org>
Install git-subtree from contrib

Build git-subtree in its contrib directory and install from there.
The main Makefile no longer discovers subcommands build in the main
build area so we cannot count on it to install git-subtree.  The user
should make && make install in contrib/subtree to install git-subtree.

Change the rule to install the git-subtree manpage.  The main
Documentation area doesn't directly support installing documentation
from other directories so the user will have to do that from within
contrib/subtree for now.

Signed-off-by: David A. Greene <greened@obbligato.org>
Add subtree test Makefile

Add a Makefile to run subtree tests.  This is largely copied
from the standard test suite with irrelevant targets removed
and some paths altered to account for where subtree tests live.

Signed-off-by: David A. Greene <greened@obbligato.org>
Use git-subtree test Makefile

Use the Makefile in contrib/subtree/t to run git-subtree tests.

Signed-off-by: David A. Greene <greened@obbligato.org>
Fix git-subtree install instructions

Update the install instructions to reflect the changes for an
integrated git-subtree.

Signed-off-by: David A. Greene <greened@obbligato.org>
Collected subtree updates

These include:
 * a .gittrees file with meta data
 * new sub commands (push-all, pull-all, from-submodule, prune, diff, list)
 * Documentation updates

Contributers from the git log on https://github.com/helmo/git-subtree
bibendi <bibendi@bk.ru>
Carl Fürstenberg <carl@blockmastersecurity.com>
Francesco Delfino <delfinof@gmail.com>
helmo <rink@initfour.nl>
Herman van Rink <rink@initfour.nl>
James Roper <jroper@vz.net>
John Yani <vanuan@gmail.com>
Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
mhart <michael@adslot.com>
mhoffman <matt.hoffman@quantumretail.com>
Nate Jones <nate@endot.org>
Paul Cartwright <paul.cartwright@ziilabs.com>
Peter Jaros <pjaros@pivotallabs.com>
rentzsch <jwr.git@redshed.net>
sun <sun@unleashedmind.com>
Thomas Van Doren <thomas@cozi.com>
Vanya at notebook <vanuan@gmail.com>
Collected subtree updates

These include:
 * a .gittrees file with meta data
 * new sub commands (push-all, pull-all, from-submodule, prune, diff, list)
 * Documentation updates

Contributers from the git log on https://github.com/helmo/git-subtree
bibendi <bibendi@bk.ru>
Carl Fürstenberg <carl@blockmastersecurity.com>
Francesco Delfino <delfinof@gmail.com>
helmo <rink@initfour.nl>
Herman van Rink <rink@initfour.nl>
James Roper <jroper@vz.net>
John Yani <vanuan@gmail.com>
Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
mhart <michael@adslot.com>
mhoffman <matt.hoffman@quantumretail.com>
Nate Jones <nate@endot.org>
Paul Cartwright <paul.cartwright@ziilabs.com>
Peter Jaros <pjaros@pivotallabs.com>
rentzsch <jwr.git@redshed.net>
sun <sun@unleashedmind.com>
Thomas Van Doren <thomas@cozi.com>
Vanya at notebook <vanuan@gmail.com>
git-subtree: ignore git-subtree executable

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-subtree: fix typo in manpage

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: remove test number comments

Delete the comments indicating test numbers as it causes maintenance
headaches.  t*.sh -i will help us find any broken tests and these
numbers are not helping us anyway.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: use %B for split subject/body

Use %B to format the commit message and body to avoid an extra newline
if a commit only has a subject line.

Signed-off-by: Techlive Zheng <techlivezheng@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: better error handling for 'subtree add'

Check refspecs for validity before passing them on to other commands.
This lets us generate more helpful error messages.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: fix synopsis

Fix the documentation of add to show that a repository can be
specified along with a commit.

Suggested by Yann Dirson <dirson@bertin.fr>.

Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: honor DESTDIR

Teach git-subtree's Makefile to honor DESTDIR.

Signed-off-by: Adam Tkac <atkac@redhat.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/subtree: make the manual directory if needed

Before install git-subtree documentation, make sure the manpage
directory exists.

Signed-off-by: Jesper L. Nielsen <lyager@gmail.com>
Signed-off-by: David A. Greene <greened@obbligato.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'dg/subtree-fixes'

contrib/subtree updates, but here are only the ones that looked
ready.  The remainder of the patches will have another day.

* dg/subtree-fixes:
  contrib/subtree: make the manual directory if needed
  contrib/subtree: honor DESTDIR
  contrib/subtree: fix synopsis
  contrib/subtree: better error handling for 'subtree add'
  contrib/subtree: use %B for split subject/body
  contrib/subtree: remove test number comments
contrib/subtree: fix spelling of accidentally

Noticed with Lucas De Marchi's codespell tool.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>