Re: [PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Patryk Obara
> Patches 1 and 2 should be sent separately though.

I hoped they could be piggy-backed, but since there will be v3 of this patch
series... I'll wait for Junio's opinion.

> I look forward to seeing you deal with the object reading part …

Yeah, even reading of loose objects does not work on my test branch yet.

Turns out some functions (*) depend on each other during conversion to oid -
so they are either refactored together in one BIG commit or I need to deploy
some temporary hacks to make it possible to split work into smaller batches.

(*) refactor of sha1_object_info transitively depends on lookup_replace_object
and the other way around. verify_object and verify_tag will also cause some
problems.

-- 
| ← Ceci n'est pas une pipe
Patryk Obara


Re: [PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Duy Nguyen
On Mon, Jan 22, 2018 at 12:04:23PM +0100, Patryk Obara wrote:
>  sha1_file.c   | 100 
> ++

You have started the invasion to sha1_file.c. Victory is near! (*)
2018 will be the year of something-other-shan-sha1 :)

I've read through the series quickly. It looks good. Patches 1 and 2
should be sent separately though.

(*) Technically the hashing part is still easy. I look forward to
seeing you deal with the object reading part, especially from pack
files. It's fun ;-)
--
Duy


[PATCH v2 00/14] Some fixes and bunch of object_id conversions

2018-01-22 Thread Patryk Obara
Compared to v1:

Following brian's suggestion I renamed following functions and struct
names to indicate, that they are no longer intended for sha1 algorithm
only:

struct sha1_stat -> struct oid_stat
pretend_sha1_file-> pretend_object_file
write_sha1_file  -> write_object_file
hash_sha1_file   -> hash_object_file
hash_sha1_file_literally -> hash_object_file_literally

Added two more patches converting some more functions to struct object_id
and one with pure function rename.

Patryk Obara (14):
  http-push: improve error log
  clang-format: adjust penalty for return type line break
  sha1_file: convert pretend_sha1_file to object_id
  dir: convert struct sha1_stat to use object_id
  sha1_file: convert hash_sha1_file to object_id
  cache: clear whole hash buffer with oidclr
  match-trees: convert splice_tree to object_id
  commit: convert commit_tree* to object_id
  notes: convert combine_notes_* to object_id
  notes: convert write_notes_tree to object_id
  sha1_file: convert write_sha1_file to object_id
  sha1_file: convert force_object_loose to object_id
  sha1_file: convert write_loose_object to object_id
  sha1_file: rename hash_sha1_file_literally

 .clang-format |   2 +-
 Documentation/technical/api-object-access.txt |   2 +-
 apply.c   |  12 ++--
 blame.c   |   2 +-
 builtin/am.c  |   4 +-
 builtin/checkout.c|   3 +-
 builtin/commit-tree.c |   4 +-
 builtin/commit.c  |   5 +-
 builtin/hash-object.c |   3 +-
 builtin/index-pack.c  |   5 +-
 builtin/merge.c   |   8 +--
 builtin/mktag.c   |   6 +-
 builtin/mktree.c  |  10 +--
 builtin/notes.c   |   8 +--
 builtin/pack-objects.c|   2 +-
 builtin/receive-pack.c|  11 +--
 builtin/replace.c |   4 +-
 builtin/tag.c |   2 +-
 builtin/unpack-objects.c  |  11 +--
 cache-tree.c  |  16 ++---
 cache.h   |  25 ---
 commit.c  |  15 ++--
 commit.h  |  11 +--
 convert.c |   6 +-
 diffcore-rename.c |   4 +-
 dir.c |  56 +++
 dir.h |  12 ++--
 http-push.c   |   4 ++
 log-tree.c|   2 +-
 match-trees.c |  42 ++-
 merge-recursive.c |   5 +-
 notes-cache.c |   8 +--
 notes-merge.c |   9 ++-
 notes-utils.c |   9 +--
 notes-utils.h |   3 +-
 notes.c   |  63 
 notes.h   |  29 
 read-cache.c  |   6 +-
 sha1_file.c   | 100 ++
 t/helper/test-dump-untracked-cache.c  |   4 +-
 40 files changed, 279 insertions(+), 254 deletions(-)


base-commit: 59c276cf4da0705064c32c9dba54baefa282ea55
-- 
2.14.3