From: "Σταύρος Ντέντος" <stdedos@gmail.com>
To: git <git@vger.kernel.org>
Cc: Taylor Blau <me@ttaylorr.com>, Junio C Hamano <gitster@pobox.com>,
Philip Oakley <philipoakley@iee.email>
Subject: Re: Git does not recognise directory named '${sys:DATA_ROOT_DIR}'
Date: Tue, 3 Sep 2019 22:55:25 +0300 [thread overview]
Message-ID: <CAHMHMxX192aM5owHjvi3s06ZykcQAHsVneBsfv9YvbeYM-XTXA@mail.gmail.com> (raw)
In-Reply-To: <xmqqa7bltcyu.fsf@gitster-ct.c.googlers.com>
> Makes me wonder if git status could maybe warn about empty trees as 'untracked'?
Well, I "suppose" git-add could warn you that you are adding an empty
tree (and I'd like if that happened, implicit vs explicit action i.e.
ignoring).
However, I assume the no-empty-tree case was a design decision; hence,
it's been 2.2# versions without such warning.
I doubt it would be considered to be added now.
On Tue, Sep 3, 2019 at 10:08 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Taylor Blau <me@ttaylorr.com> writes:
>
> > If you wish to keep this directory "empty", but stored in Git, a common
> > convention is to create an empty '.gitkeep' file in the directory. This
> > file is not special in any way to Git, rather it serves as _a_ file to
> > keep the directory non-empty.
>
> Hmph, I thought the common convention was to create a ".gitignore"
> file in the directory with catch-all pattern, so that no matter what
> cruft you had there "git add" will not add anything from it, if you
> wish to keep this directory "empty".
I believe Taylor is talking about explicitly keeping a directory
empty, that may or may not, in the future, contain files (that will be
tracked) [1].
You are infering that, regardless if there are files or will be added
in the future, you don't want to check anything in.
While [1] is a very niche corner case (and maybe it doesn't make sense
to the most of us, true), there is a "debian-equivalent" behavior
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812223
(I cannot find the definition of this behavior, but you can see an
example usecase)
prev parent reply other threads:[~2019-09-03 19:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 12:44 Git does not recognise directory named '${sys:DATA_ROOT_DIR}' Σταύρος Ντέντος
2019-09-03 13:34 ` Taylor Blau
2019-09-03 14:11 ` Σταύρος Ντέντος
2019-09-03 16:45 ` Philip Oakley
2019-09-03 19:08 ` Junio C Hamano
2019-09-03 19:55 ` Σταύρος Ντέντος [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHMHMxX192aM5owHjvi3s06ZykcQAHsVneBsfv9YvbeYM-XTXA@mail.gmail.com \
--to=stdedos@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=philipoakley@iee.email \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).