contrib / coccinelle / object_id.coccion commit Merge branch 'nd/status-refresh-progress' (4d87b38)
   1@@
   2expression E1;
   3@@
   4- is_null_sha1(E1.hash)
   5+ is_null_oid(&E1)
   6
   7@@
   8expression E1;
   9@@
  10- is_null_sha1(E1->hash)
  11+ is_null_oid(E1)
  12
  13@@
  14expression E1;
  15@@
  16- sha1_to_hex(E1.hash)
  17+ oid_to_hex(&E1)
  18
  19@@
  20identifier f != oid_to_hex;
  21expression E1;
  22@@
  23  f(...) {<...
  24- sha1_to_hex(E1->hash)
  25+ oid_to_hex(E1)
  26  ...>}
  27
  28@@
  29expression E1, E2;
  30@@
  31- sha1_to_hex_r(E1, E2.hash)
  32+ oid_to_hex_r(E1, &E2)
  33
  34@@
  35identifier f != oid_to_hex_r;
  36expression E1, E2;
  37@@
  38   f(...) {<...
  39- sha1_to_hex_r(E1, E2->hash)
  40+ oid_to_hex_r(E1, E2)
  41  ...>}
  42
  43@@
  44expression E1;
  45@@
  46- hashclr(E1.hash)
  47+ oidclr(&E1)
  48
  49@@
  50identifier f != oidclr;
  51expression E1;
  52@@
  53  f(...) {<...
  54- hashclr(E1->hash)
  55+ oidclr(E1)
  56  ...>}
  57
  58@@
  59expression E1, E2;
  60@@
  61- hashcmp(E1.hash, E2.hash)
  62+ oidcmp(&E1, &E2)
  63
  64@@
  65identifier f != oidcmp;
  66expression E1, E2;
  67@@
  68  f(...) {<...
  69- hashcmp(E1->hash, E2->hash)
  70+ oidcmp(E1, E2)
  71  ...>}
  72
  73@@
  74expression E1, E2;
  75@@
  76- hashcmp(E1->hash, E2.hash)
  77+ oidcmp(E1, &E2)
  78
  79@@
  80expression E1, E2;
  81@@
  82- hashcmp(E1.hash, E2->hash)
  83+ oidcmp(&E1, E2)
  84
  85@@
  86expression E1, E2;
  87@@
  88- hashcpy(E1.hash, E2.hash)
  89+ oidcpy(&E1, &E2)
  90
  91@@
  92identifier f != oidcpy;
  93expression E1, E2;
  94@@
  95  f(...) {<...
  96- hashcpy(E1->hash, E2->hash)
  97+ oidcpy(E1, E2)
  98  ...>}
  99
 100@@
 101expression E1, E2;
 102@@
 103- hashcpy(E1->hash, E2.hash)
 104+ oidcpy(E1, &E2)
 105
 106@@
 107expression E1, E2;
 108@@
 109- hashcpy(E1.hash, E2->hash)
 110+ oidcpy(&E1, E2)
 111
 112@@
 113expression E1, E2;
 114@@
 115- oidcmp(E1, E2) == 0
 116+ oideq(E1, E2)
 117
 118@@
 119identifier f != hasheq;
 120expression E1, E2;
 121@@
 122  f(...) {<...
 123- hashcmp(E1, E2) == 0
 124+ hasheq(E1, E2)
 125  ...>}
 126
 127@@
 128expression E1, E2;
 129@@
 130- oidcmp(E1, E2) != 0
 131+ !oideq(E1, E2)
 132
 133@@
 134identifier f != hasheq;
 135expression E1, E2;
 136@@
 137  f(...) {<...
 138- hashcmp(E1, E2) != 0
 139+ !hasheq(E1, E2)
 140  ...>}