Re: [PATCH] add -p: skip conflicted paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 4, 2012 at 5:46 PM, Jeff King <peff@xxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]