add-interactive: handle unborn branch in patch mode
commit954312a3ff76652a954b730ae69a031f98293a99
authorJeff King <peff@peff.net>
Fri, 25 Oct 2013 06:52:30 +0000 (25 02:52 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Oct 2013 21:54:17 +0000 (25 14:54 -0700)
tree188a014d9f51b994950797e73d46450adf886de0
parent3d092bfc6f2d9a998967979f926c661e9762601c
add-interactive: handle unborn branch in patch mode

The list_modified function already knows how to handle an
unborn branch by diffing against the empty tree. However,
the diff we perform to get the actual hunks does not. Let's
use the same logic for both diffs.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl