From: Tay Ray Chuan Date: Wed, 04 Apr 2012 12:50:40 GMT Subject: Re: [PATCH] add -p: skip conflicted paths Message-ID: In-Reply-To: <20120404094618.GA13870@sigill.intra.peff.net> On Wed, Apr 4, 2012 at 5:46 PM, Jeff King wrote: > I do still think it would be nicer to pass the information out to the > caller instead of just filtering. So combining the two patches, we have > something like: Thanks Maestros! This has been bugging me for some time. I gave the combined patch a shot with a trivial conflict, and it gave me "Only binary files changed". Turns out this only happens with a tree that has a only conflicted files; with a tree that has a mixed of conflicted and modified paths, it doesn't show up. Below is a quick and dirty fix: -->8-- diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 28d36f7..96f12ca 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -1207,6 +1207,7 @@ sub patch_update_cmd { print colored $error_color, "ignoring unmerged: $_->{VALUE}\n" for grep { $_->{UNMERGED} } @mods; + @all_mods = grep { !$_->{UNMERGED} } @all_mods; @mods = grep { !$_->{UNMERGED} } @mods; if (!@mods) { -- -- Cheers, Ray Chuan