Merge branch 'cc/subprocess-handshake-missing-capabilities'
authorJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2017 06:24:06 +0000 (15:24 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Sep 2017 06:24:06 +0000 (15:24 +0900)
Finishing touches to a topic already in 'master'.

* cc/subprocess-handshake-missing-capabilities:
subprocess: loudly die when subprocess asks for an unsupported capability

1  2 
sub-process.c
diff --combined sub-process.c
index 6ccfaaba99c05c0e9112b142a2a0653dccda9eda,ec9a51b7b1c41824fdc38a21ae09f32c41d89b01..6dde5062bef388fcdd3db10d9af19f8ffc7f7d6f
@@@ -6,13 -6,10 +6,13 @@@
  #include "pkt-line.h"
  
  int cmd2process_cmp(const void *unused_cmp_data,
 -                  const struct subprocess_entry *e1,
 -                  const struct subprocess_entry *e2,
 +                  const void *entry,
 +                  const void *entry_or_key,
                    const void *unused_keydata)
  {
 +      const struct subprocess_entry *e1 = entry;
 +      const struct subprocess_entry *e2 = entry_or_key;
 +
        return strcmp(e1->cmd, e2->cmd);
  }
  
@@@ -184,8 -181,8 +184,8 @@@ static int handshake_capabilities(struc
                        if (supported_capabilities)
                                *supported_capabilities |= capabilities[i].flag;
                } else {
-                       warning("subprocess '%s' requested unsupported capability '%s'",
-                               process->argv[0], p);
+                       die("subprocess '%s' requested unsupported capability '%s'",
+                           process->argv[0], p);
                }
        }