All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Roger Mendes <sproger1@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Please consider extending .gitignore to support setting of a file size limit
Date: Thu, 07 May 2015 14:31:12 -0700	[thread overview]
Message-ID: <xmqqy4l0m5wf.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAC+AdWRpJnt2PN1YcB7VoHcKsO86_DhE1mOB5Ls9bWaEd_XKXQ@mail.gmail.com> (Roger Mendes's message of "Thu, 7 May 2015 17:14:26 -0400")

Roger Mendes <sproger1@gmail.com> writes:

> Allow .gitignore to support setting a file size limit so that all
> files over a certain size will by automatically ignored when
> performing git add, commit -a...;

No.

I would not say that it would not make sense to have a method to
tell your Git to reject an attempt to add certain files to the
index, but .gitignore is make that decision based on paths and
is a bad place to do any other decision, so take the above "No"
as "No, we do not consider butchering .gitignore for that", not
as "No, you shouldn't base your decision on file size".

Also, once the path is tracked, then "git add" will keep tracking it
unless and until you "git rm --cached" it.  So you may "git add" a
1kB file, grow the file to 500MB and then the next "git add" should
register the updated contents to the index.  Whatever you do when
designing that new feature, you should need to take that into
account.

Having said all that, why is it that you do not want to track
certain files that happen to be large?  Don't the existing large
file support facility work for you (or perhaps you are not using
them)?  It might be that your time is better spent on improving
that, instead of working around the issue, no?

  reply	other threads:[~2015-05-07 21:31 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 [this message]
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
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=xmqqy4l0m5wf.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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 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.