From: Jan Hudec <bulb@ucw.cz>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: Joey Hess <joey@kitenet.net>, git@vger.kernel.org
Subject: Re: is it kosher for pre-commit to change what's staged?
Date: Thu, 11 Nov 2010 20:26:49 +0100 [thread overview]
Message-ID: <20101111192648.GE30870@efreet.light.src> (raw)
In-Reply-To: <AANLkTi=W_hwU=3PTTqE4R8Cg5T=GMdMfBsKQ1YE0HWRe@mail.gmail.com>
On Thu, Nov 11, 2010 at 01:17:04 +0300, Dmitry Potapov wrote:
> On Wed, Nov 10, 2010 at 11:45 PM, Joey Hess <joey@kitenet.net> wrote:
> >
> > That said, since git commit stages the whole large file into the index,
> > which is the kind of expensive operation git-annex exists to avoid,
> > it's still not very practical to intercept the commit like that. What
> > I ideally need is a hook that is run before git commit stages anything.
>
> Then maybe you should look at git smudge&clean filters. They perform
> conversation between the working tree and the index. Though I am not
> sure how well they work with big files.
The problem point is not big files, but whether they can change the file mode
associated with the entry, since in this case the tree contains a file, but
index should contain a symlink. Looking at the documentation, there does not
seem to be a way to do it.
It might be worth adding support for it now we have a use-case.
--
Jan 'Bulb' Hudec <bulb@ucw.cz>
next prev parent reply other threads:[~2010-11-11 19:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 17:08 is it kosher for pre-commit to change what's staged? Joey Hess
2010-11-10 19:57 ` Junio C Hamano
2010-11-10 20:06 ` Jonathan Nieder
2010-11-10 20:45 ` Joey Hess
2010-11-10 22:17 ` Dmitry Potapov
2010-11-11 19:26 ` Jan Hudec [this message]
2010-11-11 20:46 ` Joey Hess
2010-11-11 22:03 ` Junio C Hamano
2010-11-11 22:06 ` Kevin Ballard
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=20101111192648.GE30870@efreet.light.src \
--to=bulb@ucw.cz \
--cc=dpotapov@gmail.com \
--cc=git@vger.kernel.org \
--cc=joey@kitenet.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).