пн, 24 дек. 2018 г. в 16:16, Оля Тележная <olyatelezhnaya@xxxxxxxxx>: > > пт, 9 нояб. 2018 г. в 10:37, Оля Тележная <olyatelezhnaya@xxxxxxxxx>: > > > > Add formatting options %(objectsize:disk) and %(deltabase), as in > > cat-file command. > > > > I can not test %(deltabase) properly (I mean, I want to have test with > > meaningful deltabase in the result - now we have only with zeros). I > > tested it manually on my git repo, and I have not-null deltabases > > there. We have "t/t1006-cat-file.sh" with similar case, but it is > > about blobs. ref-filter does not work with blobs, I need to write test > > about refs, and I feel that I can't catch the idea (and it is hard for > > me to write in Shell). > > > > Finally, I want to remove formatting logic in cat-file and use > > functions from ref-filter (we are almost there, so many work was done > > for this). I had an idea to make this migration in this patch (and > > stop worrying about bad tests about deltabase: we already have such > > test for cat-file and hopefully that could be enough). But I have > > another question there. cat-file has one more formatting option: > > "rest" [1]. Do we want such formatting option in ref-filter? It's > > easier for me to support that in ref-filter than to leave it only > > specifically for cat-file. > > Updates since previous version: > 1. Fix type cast not to generate warnings/errors in other system > platforms (travis CI says that everything is OK now) > 2. Add check for negative object size (BUG if it is negative) > 3. Update documentation (thanks to Junio for better wording) Just fixed 1 cast from (intmax_t) to (uintmax_t). > > > > > Thank you! > > > > [1] https://git-scm.com/docs/git-cat-file#git-cat-file-coderestcode