diff-index.c: unify handling of command line paths
commit3b069b1beba6d851401032260a8030448637ece5
authorJunio C Hamano <gitster@pobox.com>
Wed, 27 Jun 2012 19:05:52 +0000 (27 12:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jun 2012 23:09:40 +0000 (28 16:09 -0700)
tree86ac99cf74a29adf277db833ebec1a9c13028ab2
parentc20f592611c2760a14d37fa1780afd2093159aeb
diff-index.c: unify handling of command line paths

Regardless of where in the directory hierarchy you are, "-" on the
command line means the standard input.  The old code knew too much
about how the low level machinery uses paths to read from the
working tree and did not bother to have the same check for "-" when
the command is run from the top-level.

Unify the codepaths for subdirectory case and toplevel case into one
and make it clearer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c