diff-lib.c: don't strdup twice
commit4d3f4b80e49275c7eaf6ba0dbddd6180957926b9
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Sat, 7 Jul 2007 18:19:08 +0000 (7 20:19 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 7 Jul 2007 18:53:49 +0000 (7 11:53 -0700)
tree0e24145e4a92f33d95844c0509c0e95a95f1d9a3
parent34a3e695497ab2abbf2fc33a46380accaa8c7c15
diff-lib.c: don't strdup twice

The static function read_directory in diff-lib.c is only ever called
with struct path_list lists with .strdup_paths turned on, i.e.
path_list_insert will strdup the paths for us (again).  Let's take
advantage of that and stop doing it twice.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c