git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCHv2 0/6] pickaxe refactorings and a new mode to find blobs (WAS: diffcore: add a pickaxe option to find a specific blob)

From
Stefan Beller <sbeller@google.com>
Date
Jan 4, 2018, 22:50 UTC
Message-ID
<20180104225044.191220-1-sbeller@google.com>
In-Reply-To
<20180103004624.222528-1-sbeller@google.com>
v2:
Thanks Junio and Jacob for review!
* fixed up the last patch to rephrase the error message to contain an 'and'
* use HAS_MULTI_BITS as well
* a bonus patch that uses HAS_MULTI_BITS for the existing code, too.

v1 After some discussion [1], we're convinced that the original approach for adding in just another pickaxe mode to find blobs was too hacky.

So I went the less hacky way and did some refactoring first (patches 1-3), Then we'll have the new pickaxe mode to find blobs in patch 4. It grew slightly larger as it had issues with the setup (we neither have a regex nor a KWS to init) in this new world, so there are a few more lines in there.

The last patch is just the cherry on the cake, helping to keep users sane by warning when they try to use different pickaxe modes at the same time.

Thanks, Stefan

[1] https://public-inbox.org/git/CAGZ79kaB0G9zetF6QtC45+ZGLM3gOsYWV7e+gkCe2yKOhb0Ssg@mail.gmail.com/
Stefan Beller (6):
  diff.h: Make pickaxe_opts an unsigned bit field
  diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bit
  diff: introduce DIFF_PICKAXE_KINDS_MASK
  diffcore: add a pickaxe option to find a specific blob
  diff: properly error out when combining multiple pickaxe options
  diff: use HAS_MULTI_BITS instead of counting bits manually
 Documentation/diff-options.txt | 10 +++++++
 builtin/log.c                  |  4 +--
 combine-diff.c                 |  2 +-
 diff.c                         | 43 ++++++++++++++++++--------
 diff.h                         | 13 ++++++--
 diffcore-pickaxe.c             | 48 ++++++++++++++++-------------
 revision.c                     |  7 +++--
 t/t4064-diff-oidfind.sh        | 68 ++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 155 insertions(+), 40 deletions(-)
 create mode 100755 t/t4064-diff-oidfind.sh
-- 
2.16.0.rc0.223.g4a4ac83678-goog
Previous: Junio C HamanoNext: Stefan Beller
Message 13 of 19 in “pickaxe refactorings and a new mode to find blobs (WAS: diffcore: add a pickaxe option to find a specific blob)”
  1. 0/5 pickaxe refactorings and a new mode to find blobs (WAS: diffcore: add a pickaxe option to find a specific blob)Stefan Beller, Jan 3, 2018
  2. 1/5 diff.h: Make pickaxe_opts an unsigned bit fieldStefan Beller, Jan 3, 2018
  3. Junio C HamanoJan 3, 2018
  4. 2/5 diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bitStefan Beller, Jan 3, 2018
  5. 4/5 diffcore: add a pickaxe option to find a specific blobStefan Beller, Jan 3, 2018
  6. 4/5 diffcore: add a pickaxe option to find a specific blobStefan Beller, Jan 3, 2018
  7. 5/5 diff: properly error out when combining multiple pickaxe optionsStefan Beller, Jan 3, 2018
  8. Jacob KellerJan 3, 2018
  9. Junio C HamanoJan 3, 2018
  10. Stefan BellerJan 3, 2018
  11. 3/5 diff: introduce DIFF_PICKAXE_KINDS_MASKStefan Beller, Jan 3, 2018
  12. Junio C HamanoJan 3, 2018
  13. 0/6 pickaxe refactorings and a new mode to find blobs (WAS: diffcore: add a pickaxe option to find a specific blob)Stefan Beller, Jan 4, 2018
  14. 1/6 diff.h: Make pickaxe_opts an unsigned bit fieldStefan Beller, Jan 4, 2018
  15. 3/6 diff: introduce DIFF_PICKAXE_KINDS_MASKStefan Beller, Jan 4, 2018
  16. 4/6 diffcore: add a pickaxe option to find a specific blobStefan Beller, Jan 4, 2018
  17. 5/6 diff: properly error out when combining multiple pickaxe optionsStefan Beller, Jan 4, 2018
  18. 2/6 diff: migrate diff_flags.pickaxe_ignore_case to a pickaxe_opts bitStefan Beller, Jan 4, 2018
  19. 6/6 diff: use HAS_MULTI_BITS instead of counting bits manuallyStefan Beller, Jan 4, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.