Re: is it kosher for pre-commit to change what's staged?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]