All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Roger Leigh <rleigh@codelibre.net>
Cc: Christian MICHON <christian.michon@gmail.com>, git@vger.kernel.org
Subject: Re: git and mtime
Date: Thu, 20 Nov 2008 16:37:05 +0100	[thread overview]
Message-ID: <49258421.5090308@op5.se> (raw)
In-Reply-To: <20081120151925.GE6023@codelibre.net>

Roger Leigh wrote:
> On Thu, Nov 20, 2008 at 03:50:49PM +0100, Andreas Ericsson wrote:
>> Roger Leigh wrote:
>>> On Thu, Nov 20, 2008 at 02:06:13PM +0100, Andreas Ericsson wrote:
>>>> Roger Leigh wrote:
>>>>> On Wed, Nov 19, 2008 at 05:18:16PM +0100, Christian MICHON wrote:
>>>>>> On Wed, Nov 19, 2008 at 12:37 PM, Roger Leigh <rleigh@codelibre.net> wrote:
>>>>>>> Would it be possible for git to store the mtime of files in the tree?
>>>>>>>
>>>>>>> This would make it possible to do this type of work in git, since it's
>>>>>>> currently a bit random as to whether it works or not.  This only
>>>>>>> started when I upgraded to an amd64 architecture from powerpc32,
>>>>>>> I guess it's maybe using high-resolution timestamps.
>>>>>>>
>>>> Caring about meta-data the way you mean it would mean that
>>>>
>>>>  git add foo.c; git commit -m "kapooie"; touch foo.c; git status
>>>>
>>>> would show "foo.c" as modified. How sane is that?
>>> I've never come close to suggesting we do anything so insane.
>>>
>>> What I am suggesting is that on add/commit, the inode metadata
>>> be recorded in the tree (like we already store perms), so that
>>> it can be (**optionally**) reused/restored on checkout.
>>>
>>> Whether it's stored in the tree or not is a separate concern from
>>> whether to *use* it or not.  For most situations, it won't be
>>> useful, as has been made quite clear from all of the replies, and I
>>> don't disagree with this.  However, for some, the ability to have
>>> this information to hand to make use of would be invaluable.
>>>
>> Then write a hook for it. You agree that for most users this will be
>> totally insane, and yet you request that it's added in a place where
>> everyone will have to pay the performance/diskspace penalty for it
>> but only a handful will get any benefits. That's patently absurd.
> 
> The cost is tiny.  The extra space would be smaller than a single
> SHA1 hash.
> 
>> Especially since there are such easy workarounds that you can put in
>> place yourself instead.
> 
> 
>>> There have been quite a few suggestions to look into using hooks,
>>> and I'll investigate this.  However, I do have some concerns
>>> about *where* I would store this "extended tree" data, since it
>>> is implicitly tied to a single tree object, and I wouldn't
>>> want to store it directly as content.
>> Store it as a blob targeted by a lightweight tag named
>> "metadata.$sha1" and you'll have the easiest time in the world when
>> writing the hooks. Also, the tags won't be propagated by default,
>> which is a good thing since your timestamps/uid's whatever almost
>> certainly will not work well on other developers repositories.
> 
> And yet the fact that it won't propagate makes it totally useless:
> all the other people using the repo won't get the extra metadata
> that will prevent build failures.  Having the extra data locally
> is nice, but not exactly what I'd call a solution.  The whole point
> of what I want is to have it as an integral part of the repo.
> 

Then make it signed tags and ship them along.

Or do this properly and simply put in your buildsystem that some
targets never need to be rebuilt. That's (by far) the simplest
solution.

On a sidenote, I fail to see how the pre-generated stuff can avoid
getting updated unless also the sources for that stuff was updated,
in which case either of the following is true:
a) You really do need to rebuild, because upstream fucked up.
b) The pre-generated stuff should *also* be checked out and get new
   timestamps.

Either way, to me it sounds like your buildsystem needs some love.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  parent reply	other threads:[~2008-11-20 15:38 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 11:37 git and mtime Roger Leigh
2008-11-19 12:22 ` Matthias Kestenholz
2008-11-20  8:38   ` Andreas Ericsson
2008-11-20 11:20     ` Roger Leigh
2008-11-20 12:48       ` Andreas Ericsson
2008-11-20 13:12         ` Andreas Ericsson
2008-11-19 12:31 ` Johannes Schindelin
2008-11-19 12:37 ` Arafangion
2008-11-19 14:54   ` Matthieu Moy
2008-11-20  8:39     ` Andreas Ericsson
2008-11-20 10:34     ` Johannes Schindelin
2008-11-20 10:53       ` Matthieu Moy
2008-11-19 13:29 ` Jakub Narebski
2008-11-19 16:18 ` Christian MICHON
2008-11-20 10:35   ` Johannes Schindelin
2008-11-20 11:27   ` Roger Leigh
2008-11-20 13:06     ` Andreas Ericsson
2008-11-20 14:15       ` Roger Leigh
2008-11-20 14:50         ` Andreas Ericsson
2008-11-20 15:19           ` Roger Leigh
2008-11-20 15:33             ` Kyle Moffett
2008-11-20 15:37             ` Andreas Ericsson [this message]
2008-11-20 18:36             ` Matthias Kestenholz
2008-11-20 13:11     ` Randal L. Schwartz
2008-11-20 13:40       ` Roger Leigh
2008-11-20 17:59     ` Daniel Barkalow
2008-11-20 19:24       ` Joey Hess
2008-11-20 13:21 ` martin f krafft
2008-11-20 13:35   ` Roger Leigh
2008-11-20 13:59     ` martin f krafft
2008-11-20 15:56       ` Samuel Tardieu
2008-11-20 14:07     ` Johannes Schindelin
2008-11-20 14:22       ` Roger Leigh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49258421.5090308@op5.se \
    --to=ae@op5.se \
    --cc=christian.michon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rleigh@codelibre.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.