From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Ignacio Taranto <ignacio.taranto@eclypsium.com>, git@vger.kernel.org
Subject: Re: About git reporting missing newline for symlinks
Date: Thu, 13 Oct 2022 21:33:28 +0200 [thread overview]
Message-ID: <221013.8635brldj4.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqtu47fti9.fsf@gitster.g>
On Thu, Oct 13 2022, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>>>> \ The filename pointed to by the symlink does not end in a newline
>>>
>>> While I do not think it would break anybody, I doubt it would give
>>> us much value. One line above that output is a line that any user,
>>> who is vaguely familiar with the contents being compared, can
>>> recognize as giving a pathname, the contents of the symbolic link.
>>
>> Clearly it confused the initial reporter upthread :)
>
> But to such a user, I highly suspect that the rephased message above
> still looks like a warning, and will result in the same reaction.
>
> IOW, you want to explain why "does not end in a newline" is worth
> expressing in the output. Saying "does not end in a newline" alone
> would tell the user what they already know (i.e. the symlink stores
> the target filename without an extra LF at the end).
Yes, but isn't the point of the report/confusion that we're inserting
what looks like the warning you get when you forget a \n at the end of a
source file, so a user might wonder why they're seeing it at all.
Whereas what we're *really* doing there is not really about that at all,
but just inserting a bit of magic so that the diff format & its
consumers grok that this line we're inserting there isn't supposed to
have a \n, as we're working with a filename.
Maybe e.g.:
diff --git a/RelNotes b/RelNotes
index d505db645be..758368388a4 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.38.0.txt
\ No newline at end of file
+Documentation/RelNotes/2.39.0.txt
\ No newline at end of file
Would, for those users, be less confusing as:
diff --git a/RelNotes b/RelNotes
index d505db645be..758368388a4 120000
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes/2.38.0.txt
\ The symlink above has no trailing NL in its filename
+Documentation/RelNotes/2.39.0.txt
\ The symlink above has no trailing NL in its filename
*dunno* :)
next prev parent reply other threads:[~2022-10-13 19:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 21:17 About git reporting missing newline for symlinks Ignacio Taranto
2022-10-12 21:31 ` Junio C Hamano
2022-10-12 21:42 ` Ignacio Taranto
2022-10-13 13:11 ` Ævar Arnfjörð Bjarmason
2022-10-13 16:02 ` Junio C Hamano
2022-10-13 16:57 ` Ævar Arnfjörð Bjarmason
2022-10-13 18:50 ` Junio C Hamano
2022-10-13 19:33 ` Ævar Arnfjörð Bjarmason [this message]
2022-10-13 20:06 ` Junio C Hamano
2022-10-13 20:34 ` Philip Oakley
2022-10-13 22:01 ` Erik Cervin Edin
2022-10-12 21:32 ` brian m. carlson
2022-10-12 21:34 ` Junio C Hamano
2022-10-12 21:42 ` brian m. carlson
2022-10-13 2:17 ` Taylor Blau
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=221013.8635brldj4.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ignacio.taranto@eclypsium.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.