diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-12 09:47:39 -0700 |
commit | dd610aeda684e42d3933a719cbd59ffbcdfdbcaa (patch) | |
tree | 3001212a96785e66a7d82e18116badd5007bc0ef /patch-ids.h | |
parent | 3787e3c16ced0e3a614766dfbb55f8cbd70762c1 (diff) | |
parent | b3dfeebb92630c54db1e4f03dbcff0e05208c4c1 (diff) | |
download | git-dd610aeda684e42d3933a719cbd59ffbcdfdbcaa.tar.gz |
Merge branch 'kw/patch-ids-optim'
When "git rebase" tries to compare set of changes on the updated
upstream and our own branch, it computes patch-id for all of these
changes and attempts to find matches. This has been optimized by
lazily computing the full patch-id (which is expensive) to be
compared only for changes that touch the same set of paths.
* kw/patch-ids-optim:
rebase: avoid computing unnecessary patch IDs
patch-ids: add flag to create the diff patch id using header only data
patch-ids: replace the seen indicator with a commit pointer
patch-ids: stop using a hand-rolled hashmap implementation
Diffstat (limited to 'patch-ids.h')
-rw-r--r-- | patch-ids.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/patch-ids.h b/patch-ids.h index eeb56b307f..0f34ea11ea 100644 --- a/patch-ids.h +++ b/patch-ids.h @@ -2,19 +2,18 @@ #define PATCH_IDS_H struct patch_id { - unsigned char patch_id[20]; - char seen; + struct hashmap_entry ent; + unsigned char patch_id[GIT_SHA1_RAWSZ]; + struct commit *commit; }; struct patch_ids { + struct hashmap patches; struct diff_options diffopts; - int nr, alloc; - struct patch_id **table; - struct patch_id_bucket *patches; }; int commit_patch_id(struct commit *commit, struct diff_options *options, - unsigned char *sha1); + unsigned char *sha1, int); int init_patch_ids(struct patch_ids *); int free_patch_ids(struct patch_ids *); struct patch_id *add_commit_patch_id(struct commit *, struct patch_ids *); |