change: decode resurrectzombies, addroot, delroot

laumann
Jul 3, 2023, 8:02 PM
7WA2F6RSQBGJJE5MZGQGAYJOWYEKQUWVI2MTZ4AMICEEQFENXANQC

Dependencies

  • [2] 2LYNPDBT change: decode and print solve/unsolve name conflicts
  • [*] JAGXXSR7 change: initial work on decoding hunks
  • [*] JVU3TTT5 all: switch away from typedefing anonymous structs
  • [*] ZKAOPMCH change: Implement decoding of edits, atoms, positions, among others
  • [*] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [*] NEORNIZE change: decode and print file moves
  • [*] 33ZXTRXR change: decode and print file deletions
  • [*] XTVLIC24 change: refactor to print_change()

Change contents

  • edit in hunk.h at line 84
    [2.124]
    [5.899]
    };
    struct resurrectzombies {
    struct atom change;
    struct local local;
    str encoding;
  • edit in hunk.h at line 92
    [4.1120]
    [5.903]
    struct addroot {
    struct atom name;
    struct atom inode;
    };
    struct delroot {
    struct atom name;
    struct atom inode;
    };
  • edit in hunk.h at line 115
    [2.221]
    [6.417]
    struct resurrectzombies resurrectzombies;
    struct addroot addroot;
    struct delroot delroot;
  • edit in change.c at line 399
    [2.661]
    [8.442]
    break;
    case RESURRECT_ZOMBIES:
    change_decode_atom(
    binstat, &bhunk->resurrectzombies.change
    );
    change_decode_local(
    binstat, &bhunk->resurrectzombies.local
    );
    change_decode_encoding(
    binstat, &bhunk->resurrectzombies.encoding
    );
    break;
    case ADD_ROOT:
    change_decode_atom(binstat, &bhunk->addroot.name);
    change_decode_atom(binstat, &bhunk->addroot.inode);
    break;
    case DEL_ROOT:
    change_decode_atom(binstat, &bhunk->delroot.name);
    change_decode_atom(binstat, &bhunk->delroot.inode);
  • edit in change.c at line 804
    [2.963]
    [9.438]
    break;
    }
    case RESURRECT_ZOMBIES: {
    struct resurrectzombies *z = &hunk->resurrectzombies;
    printf(" in %s:%lu\n", z->local.path, z->local.line);
  • edit in change.c at line 811
    [9.452]
    [10.1789]
    case ADD_ROOT: {
    struct addroot *r = &hunk->addroot;
    printf(" start = %lu\n", r->name.newvertex.start);
    break;
    }
    case DEL_ROOT: {
    struct delroot *r = &hunk->delroot;
    printf("name: ");
    print_atom(&r->name, contents);
    printf("inode: ");
    print_atom(&r->inode, contents);
    break;
    }