Merge branch 'jn/gitweb-unspecified-action' into maint-1.7.8

* jn/gitweb-unspecified-action:
  gitweb: Fix actionless dispatch for non-existent objects
Merge branch 'jc/advise-i18n' into maint-1.7.8

* jc/advise-i18n:
  i18n of multi-line advice messages
Merge branch 'ks/sort-wildcard-in-makefile' into maint-1.7.8

* ks/sort-wildcard-in-makefile:
  t/Makefile: Use $(sort ...) explicitly where needed
Merge branch 'maint-1.7.8' into maint

* maint-1.7.8:
  t/Makefile: Use $(sort ...) explicitly where needed
  gitweb: Fix actionless dispatch for non-existent objects
  i18n of multi-line advice messages
Merge branch 'maint'

* maint:
difftool: parse options using Getopt::Long

Replace custom option/argument parser with standard Getopt::Long
module.  This shortens the code and makes it easier to understand.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: exit(0) when usage is printed

Prior to this commit, the script exited with an error whenever the
usage string was printed, regardless of the reason it was done. In
cases where usage was printed due to a user request (e.g. '-h'
option), the script should exit without error (exit 0).

This commit adds an argument to the usage function that allows the
exit code to be specified when the function is called.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: remove explicit change of PATH

Adding the script directory to PATH is not needed. The script is
located at '$(git --exec-path)', which is already on the PATH.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: stop appending '.exe' to git

The system call to Git works the same whether or not ".exe" is
appended to "git". The extra code is not necessary.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: eliminate setup_environment function

Removing this function shortens the code and makes it easier to read.
Now all environment variables are set as part of procedural operation.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: replace system call with Git::command_noisy

The Git.pm module includes functions intended to standardize working
with Git repositories in Perl scripts. This commit teaches difftool
to use Git::command_noisy rather than a system call to run the diff
command.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: teach difftool to handle directory diffs

Prior to this commit, the difftool utility could only open files one
at a time.  The new '--dir-diff' option copies all the modified files
to a temporary location and runs a directory diff on them.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: teach dir-diff to copy modified files back to working tree

If the user runs a diff when there are modified files in the working copy,
they expect to be able to be edit the files in the diff viewer and save
the changes. When using difftool in file mode (i.e. diffing one file at
a time), this works as expected.  However, when using difftool in directory
diff mode, the changes are not saved.

This commit teaches the directory diff mode to copy changes from the diff
viewer back to the working copy.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: print list of valid tools with '--tool-help'

Since bc7a96a (mergetool--lib: Refactor tools into separate files,
2011-08-18), it is possible to add a new diff tool by creating a simple
script in the '$(git --exec-path)/mergetools' directory.  Updating the
difftool help text is still a manual process, and the documentation can
easily go out of sync.

Teach the command to read the list of valid tools from the 'mergetools'
directory and print them for the user when the '--tool-help' option is
given.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: remove unused SUBDIRECTORY_OK variable

This variable in used in 'git-sh-setup', but that shell script is never
sourced from difftool.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: fix error when building index files from a subdir

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: fix error when dealing with wc files when script called from subdir

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
difftool: do not allow mix of '--prompt' with '--no-prompt'

When difftool was changed to use Getopt::Long, it changed the way that
the '--prompt' and '--no-prompt' options are handled. Prior to the change,
if both options were given, then the last option was used.  After the
change, if both were given, then '--prompt' was always used.

This commit teaches difftool to exit with an error if both options are
given at the command line. t7800 was updated to match.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>