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

Re: Git checkout preserve timestamp?

From
Theodore Tso <tytso@mit.edu>
Date
Mar 6, 2007, 00:21 UTC
Message-ID
<20070306002125.GB19634@thunk.org>
In-Reply-To
<17900.43487.947400.649777@lisa.zopyra.com>
On Mon, Mar 05, 2007 at 05:38:07PM -0600, Bill Lear wrote:
Show 5 quoted lines
> 
> No, I think you missed my point.  There are two xyz.o's:
> 
> One in .master/xyz.o, and one in .branchX/xyz.o.  So, you're example
> becomes:

Are you assuming that the makefile will automatically figure out which branch you are on, and then redirect the .o to the right <.branch-name> directory? That's the only thing that makes sense, since if you are using VPATH and depending on the developer being cd'ed into .master when the current branch is master, and cd'ed into .branchX when the current branch is branchX, and the developer types make at when they are in the .master directory but the current branch is branchX, the result will be a huge, confusing mess.

But of course, the Makefile is under source control itself, and if at a previous point in time the Makefile didn't have the magic .git directives, then you could do the build and have the the wrong thing happen.

So it seems to be a very fragile solution compared to using multiple working directories, or using ccache. It could be a tad bit more efficient than using ccache or multiple directories, but the real question is whether it really is worth the effort, and potential support difficulties if some confused user turns on this feature with the proper git magic in their makefiles, and then the git mailing list gets the support burden.

That being said, I have often wished that there was some way I could use all of those autogenerated html and man pages to spead up the "make doc" process in git. Ccache doesn't work because it doesn't understand asciidoc or xmlto, and there are all of these conveniently generated output files in the origin/man and origin/html, but unless we are building exactly the same git release as described in the log message in the origin/man or origin/html branch.

What would be really cool would be some way of generating some kind of database that mapped the SHA1 hash of the SHA1 hash of the dependencies of a particular output file to the SHA1 hash of the glob of the generated output file as found in origin/man and origin/html. This would basically be a way of integrating ccache functionality into git, but for the HTML and man page outputs, which delta compress nicely and therefore makes a lot of sense to include in a git repository like Junio is doing already. I'm not sure how much sense this would make for storing the .o globs in the git repository (although there are some SCM's, like Clearcase who do this), but in theory it could be used for that as well. The case is much more compelling with the generated documentation files, though.

					- Ted
Previous: Martin LanghoffNext: Matthieu Moy
Message 39 of 51 in “Git checkout preserve timestamp?”
  1. Bill LearMar 1, 2007
  2. Alex RiesenMar 1, 2007
  3. Johannes SchindelinMar 1, 2007
  4. Linus TorvaldsMar 1, 2007
  5. Johannes SchindelinMar 1, 2007
  6. Karl HasselströmMar 2, 2007
  7. Bill LearMar 2, 2007
  8. Bart TrojanowskiMar 2, 2007
  9. Johannes SchindelinMar 2, 2007
  10. Karl HasselströmMar 2, 2007
  11. Johannes SchindelinMar 2, 2007
  12. Karl HasselströmMar 5, 2007
  13. Johannes SchindelinMar 5, 2007
  14. Karl HasselströmMar 5, 2007
  15. Bill LearMar 5, 2007
  16. Johannes SchindelinMar 5, 2007
  17. Bill LearMar 5, 2007
  18. Johannes SchindelinMar 5, 2007
  19. Bill LearMar 5, 2007
  20. Linus TorvaldsMar 5, 2007
  21. Matthieu MoyMar 5, 2007
  22. Bill LearMar 5, 2007
  23. Linus TorvaldsMar 5, 2007
  24. Bill LearMar 5, 2007
  25. Johannes SchindelinMar 5, 2007
  26. Bill LearMar 5, 2007
  27. Johannes SchindelinMar 5, 2007
  28. Michael PooleMar 6, 2007
  29. Johannes SchindelinMar 6, 2007
  30. Michael PooleMar 6, 2007
  31. Johannes SchindelinMar 6, 2007
  32. Junio C HamanoMar 6, 2007
  33. Sergio CallegariMar 6, 2007
  34. Jakub NarebskiMar 6, 2007
  35. Bill LearMar 6, 2007
  36. Johannes SchindelinMar 6, 2007
  37. Bill LearMar 6, 2007
  38. Martin LanghoffMar 6, 2007
  39. Theodore TsoMar 6, 2007
  40. Matthieu MoyMar 5, 2007
  41. Johannes SchindelinMar 5, 2007
  42. Bill LearMar 5, 2007
  43. Johannes SchindelinMar 5, 2007
  44. Bill LearMar 5, 2007
  45. Andy ParkinsMar 5, 2007
  46. Karl HasselströmMar 5, 2007
  47. Andy ParkinsMar 5, 2007
  48. Karl HasselströmMar 5, 2007
  49. Bill LearMar 5, 2007
  50. Andy ParkinsMar 5, 2007
  51. Bill LearMar 5, 2007

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.