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

Re: [PATCH] cherry: cache patch-ids to avoid repeating work

From
Johan Herland <johan@herland.net>
Date
Jul 16, 2008, 07:22 UTC
Message-ID
<200807160922.30275.johan@herland.net>
In-Reply-To
<7vod4yztf5.fsf@gitster.siamese.dyndns.org>
On Wednesday 16 July 2008, Junio C Hamano wrote:
Show 19 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > Okay, it seems like I never have time to review this, so I'll just
> >
> > take a few minutes to comment on some aspects:
> >> @@ -1094,6 +1104,8 @@ int cmd_cherry(int argc, const char **argv,
> >> const char *prefix)
> >>  	const char *limit = NULL;
> >>  	int verbose = 0;
> >>
> >> +	git_config(git_cherry_config, NULL);
> >> +
> >>  	if (argc > 1 && !strcmp(argv[1], "-v")) {
> >>  		verbose = 1;
> >>  		argc--;
> >
> > Is this really purely for cherry, and not at all for "log
> > --cherry-pick"? Maybe it should be "cache.patchIds" to begin with.
>
> What other things would we want caches for?
This should be fairly obvious:
- git-notes (uses sha1-to-sha1 cache for storing commit-to-note
  relationship)
- integrated bug trackers (uses sha1-to-sha1 cache for storing
  commit-to-bugreport (or similar) relationships)
- ...any other mechanism that want to quickly map from a git object to some
  associated data
There are probably plenty more ideas and use cases if people start looking.
AFAICS, each different use case would keep its cache in a separate file.

For local-repo-only caches the cache is kept within $GIT_DIR, and for shared caches (IF that makes sense in any of the use cases) the cache could be located in the working tree (either as a .git_foo file on relevant branches, or as a file on a separate domain-specific branch).

Have fun! :)
...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Karl Hasselström
Message 21 of 21 in “cherry: cache patch-ids to avoid repeating work”
  1. 1/3 cherry: cache patch-ids to avoid repeating workGeoffrey Irving, Jul 9, 2008
  2. Junio C HamanoJul 9, 2008
  3. Geoffrey IrvingJul 9, 2008
  4. Junio C HamanoJul 9, 2008
  5. Johannes SchindelinJul 9, 2008
  6. cherry: cache patch-ids to avoid repeating workGeoffrey Irving, Jul 10, 2008
  7. Geoffrey IrvingJul 10, 2008
  8. Johannes SchindelinJul 10, 2008
  9. Geoffrey IrvingJul 10, 2008
  10. Johannes SchindelinJul 10, 2008
  11. Junio C HamanoJul 11, 2008
  12. Geoffrey IrvingJul 11, 2008
  13. Johannes SchindelinJul 11, 2008
  14. Geoffrey IrvingJul 11, 2008
  15. Johannes SchindelinJul 11, 2008
  16. Geoffrey IrvingJul 13, 2008
  17. cherry: cache patch-ids to avoid repeating workGeoffrey Irving, Jul 15, 2008
  18. Johannes SchindelinJul 15, 2008
  19. Junio C HamanoJul 15, 2008
  20. Karl HasselströmJul 16, 2008
  21. Johan HerlandJul 16, 2008

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.