Thread (3 messages) flat view 3 messages, 3 authors, 2016-06-15

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

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:53:28
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

On Wed, Apr 4, 2012 at 5:46 PM, Jeff King [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help