diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-08-23 14:33:46 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-08-23 14:33:46 -0700 |
| commit | d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8 (patch) | |
| tree | 1ed0f2f407610d50b984a4fa9b95bb72eaa17c14 /commit.c | |
| parent | Merge branch 'rs/bswap-ubsan-fix' into maint (diff) | |
| parent | ls-files: don't try to prune an empty index (diff) | |
| download | git-d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8.tar.gz git-d3b7ee087e3ed409b943d62501bd7fb8dbd96dd8.zip | |
Merge branch 'rs/move-array' into maint
Code clean-up.
* rs/move-array:
ls-files: don't try to prune an empty index
apply: use COPY_ARRAY and MOVE_ARRAY in update_image()
use MOVE_ARRAY
add MOVE_ARRAY
Diffstat (limited to 'commit.c')
| -rw-r--r-- | commit.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -223,9 +223,8 @@ int unregister_shallow(const struct object_id *oid) if (pos < 0) return -1; if (pos + 1 < commit_graft_nr) - memmove(commit_graft + pos, commit_graft + pos + 1, - sizeof(struct commit_graft *) - * (commit_graft_nr - pos - 1)); + MOVE_ARRAY(commit_graft + pos, commit_graft + pos + 1, + commit_graft_nr - pos - 1); commit_graft_nr--; return 0; } |
