From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: Sebastian Schuberth <sschuberth@gmail•com>
Cc: "Torsten Bögershausen" <tboegi@web•de>, git@vger•kernel.org
Subject: Re: [PATCH v2] ls-files: Add eol diagnostics
Date: Sun, 01 Nov 2015 19:40:50 +0100 [thread overview]
Message-ID: <vpqmvuxzhot.fsf@anie.imag.fr> (raw)
In-Reply-To: <5635D0B1.9040800@gmail.com> (Sebastian Schuberth's message of "Sun, 1 Nov 2015 09:43:29 +0100")
Sebastian Schuberth <sschuberth@gmail•com> writes:
> However, the commit message says "to check if text files are stored
> normalized in the *repository*", yet the output refers to the index /
> cache. Is there a (potential) difference between line endings in the
> index and repo?
There is when you have staged changes that are not commited yet.
> Any I find it a bit confusing to refer to the index where, as e.g. for
> a freshly cloned repo the index should be empty,
No it is not. The index is a complete snapshot of your working tree.
When you have no uncommited staged changes, the index contains all files
that are in HEAD. Most commands show you _changes_ in the index (wrt
HEAD or wrt the working tree), but the index itself contain all files.
> Long story short, how about consistently talking about line endings in
> the repo, and also using "repo" instead of "ca" here?
I don't think this is a good idea. One typical use-case for the feature
would probably be:
1) wtf, there's something wrong with my line endings, let's fix this.
2) tweak .gitattributes, try to get everything right
3) prepare a commit to apply the new settings to the repository, play
with "git add", "dos2unix" and friends.
4) check that it's OK
5) "git commit"
At stage 4), you really want to see the content of the index, because
your HEAD is still broken.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2015-11-01 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 10:12 [PATCH v2] ls-files: Add eol diagnostics Torsten Bögershausen
2015-10-31 10:25 ` Matthieu Moy
2015-11-01 8:43 ` Sebastian Schuberth
2015-11-01 18:40 ` Matthieu Moy [this message]
2015-11-01 20:17 ` Sebastian Schuberth
2015-11-01 18:22 ` Junio C Hamano
2015-11-01 18:41 ` Matthieu Moy
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=vpqmvuxzhot.fsf@anie.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
--cc=sschuberth@gmail$(echo .)com \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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