]> git.proxmox.com Git - libgit2.git/blobdiff - tests/status/status_helpers.c
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / status / status_helpers.c
index 902b65c4f3e69d50816c1b16847dd2a159f2f4df..5d13caa9a0da8317eae72bc1815a4b18afef3438 100644 (file)
@@ -9,20 +9,13 @@ int cb_status__normal(
        if (counts->debug)
                cb_status__print(path, status_flags, NULL);
 
-       if (counts->entry_count >= counts->expected_entry_count) {
+       if (counts->entry_count >= counts->expected_entry_count)
                counts->wrong_status_flags_count++;
-               goto exit;
-       }
-
-       if (strcmp(path, counts->expected_paths[counts->entry_count])) {
+       else if (strcmp(path, counts->expected_paths[counts->entry_count]))
                counts->wrong_sorted_path++;
-               goto exit;
-       }
-
-       if (status_flags != counts->expected_statuses[counts->entry_count])
+       else if (status_flags != counts->expected_statuses[counts->entry_count])
                counts->wrong_status_flags_count++;
 
-exit:
        counts->entry_count++;
        return 0;
 }
@@ -89,6 +82,9 @@ int cb_status__print(
        if (status_flags & GIT_STATUS_IGNORED) {
                wstatus = 'I'; wcount++;
        }
+       if (status_flags & GIT_STATUS_WT_UNREADABLE) {
+               wstatus = 'X'; wcount++;
+       }
 
        fprintf(stderr, "%c%c %s (%d/%d%s)\n",
                        istatus, wstatus, path, icount, wcount,