From: Stefan Beller <sbeller@google.com>
To: Fredrik Gustafsson <iveqy@iveqy.com>
Cc: Kevin Daudt <me@ikke.info>, Junio C Hamano <gitster@pobox.com>,
Roger Mendes <sproger1@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Please consider extending .gitignore to support setting of a file size limit
Date: Fri, 8 May 2015 15:13:59 -0700 [thread overview]
Message-ID: <CAGZ79kazifa82bob5RvL4gGarkKympb-aLDBmhT=y7ddTj-aTg@mail.gmail.com> (raw)
In-Reply-To: <20150508070906.GC8248@paksenarrion.iveqy.com>
On Fri, May 8, 2015 at 12:09 AM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:
> On Fri, May 08, 2015 at 08:54:59AM +0200, Kevin Daudt wrote:
>> My experience in #git is that people want to prevent other people
>> accidentelly adding large files, resulting in all sorts of problems,
>> which takes a lot of effort to fix if you're not an experienced user.
>
> I second this. In #git@freenode we often get people trying to reduce
> repo size since they or a collegue accidental added a huge binary file.
>
> They do a filter branch and remove that file. However then they need to
> do a forced push. And the person (the collegue) that didn't had enough
> git experience to understand why it was a mistake to add a big file, now
> ends up with having to sync with a rewritten remote.
>
> So I can really see that there's a demand for such a feature. However, I
> wonder if this shouldn't just be a pre-recieve hook?
>
> If we want to inform the user, we might just add a pre-commit hook for
> this.
>
> The problem with pre-commit hooks is distribution of them. As it is with
> making this a configuration option. There's really no good way to share
> configuration and hooks between git repos today as I know of. (Yes, I'm
> aware of this beeing a hard problem due to security concerns).
>
Any problem in computer science can be solved with another layer of indirection
they said. So:
Maybe we can just distribute some good defaults (or your internal distribution
for git can ship adapted versions of the default). And instead of just running
a hook, maybe the clone/fetch could tell the client to enable these
predefined hooks.
so maybe we'd need a fetch capability "recommended-hooks" which could look like
recommended-hooks=<name>,<sha1>
The name would indicate what hook you're interested in such as
.git/hooks/pre-commit-warn-huge-size.sample and the sha1 would be the
sha1 of that default hook to ensure nobody has tampered with that script.
I am not sure if we need the sha1, maybe that's overengineered. I mean trusting
a default script is as much as trusting the git binary on your system, isn't it?
next prev parent reply other threads:[~2015-05-08 22:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 21:14 Please consider extending .gitignore to support setting of a file size limit Roger Mendes
2015-05-07 21:31 ` Junio C Hamano
2015-05-08 6:44 ` Thomas Koch
2015-05-08 6:54 ` Kevin Daudt
2015-05-08 7:09 ` Fredrik Gustafsson
2015-05-08 22:13 ` Stefan Beller [this message]
2015-05-08 21:55 ` Philip Oakley
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='CAGZ79kazifa82bob5RvL4gGarkKympb-aLDBmhT=y7ddTj-aTg@mail.gmail.com' \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=iveqy@iveqy.com \
--cc=me@ikke.info \
--cc=sproger1@gmail.com \
/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).