commit 19332e6de6ff3f51e60c6e32716235833b2c6085 from: Stefan Sperling date: Mon May 13 15:05:56 2019 UTC avoid undefined behaviour (comparison with string literal) commit - d5bea53959deb7a1dd486dce9bca4f295c12589b commit + 19332e6de6ff3f51e60c6e32716235833b2c6085 blob - 3f36aa40237c2d0e4882f875245fa2ff09640633 blob + b6a44c48e939a16889c4bde6c791760cf4b4faf5 --- lib/worktree.c +++ lib/worktree.c @@ -991,7 +991,8 @@ get_modified_file_content_status(unsigned char *status } if (strncmp(line, markers[i], strlen(markers[i])) == 0) { - if (markers[i] == GOT_DIFF_CONFLICT_MARKER_END) + if (strcmp(markers[i], GOT_DIFF_CONFLICT_MARKER_END) + == 0) *status = GOT_STATUS_CONFLICT; else i++;