From: Junio C Hamano <gitster@pobox.com>
To: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
Cc: <git@vger.kernel.org>
Subject: Re: Help understanding unexpected diff output
Date: Mon, 13 Jul 2020 08:12:11 -0700 [thread overview]
Message-ID: <xmqqsgdvo3ec.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <5F0C38BB020000A100039FF0@gwsmtp.uni-regensburg.de> (Ulrich Windl's message of "Mon, 13 Jul 2020 12:34:35 +0200")
"Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de> writes:
> I inspected some changes using "git diff", and it was hard to me
> to find the actual differences (see git-diff-png): I had to look a
> long time at those olcAccess lines to find any difference, so
> finally I pasted both blocks into separate Emacs files a and b
> (via PuTTY) and used "ediff-files" (see diff-emacs.png). Within
> there, the was only a part of one line changed!
With redactions and making them into two images, you did a good job
killing interested parties' willingness to help, as they made using
tools almost impossible.
So here is only based on eyeballing the images, and I probably have
missed what you wanted readers to find, but don't blame me ;-)
It seems that the file got 6 lines removed, that begins with
"olcAccess: {$n}" (0 <= n <= 6), at around 8th line of the file, and
then very similar 6 lines that are not identical to what got removed
at the end of the file. The ediff you showed tells me that the 6
lines removed from very early part of the file and 6 lines added to
the end of the file are similar but not identical. These two 6-line
blocks differ only by the 5th line (i.e. "olcAccess: {4}") having
",pwdGraceUseTime,pwdChangedTime" in the newer version, but not in
the older version.
Am I reading what you sent us correctly so far?
Now, if this change to the "olcAccess: {4}" line in the new file
weren't there, i.e. if the 6-line block that disappeared from the
early part of the file and the 6-line block that was added near the
end of the file were identical (in such a case, your ediff would
show no changes, I presume), then what would your desired output
from "git diff"?
I would imagine that the answer would still be a very similar looking
--- a/0/...
+++ b/0/...
@@ -5,12 +5,6 @@
olcDatabase: {1}hdb
olcDbDirectory: /var/lib/ldap
olcSuffix: dc=...
-olcAccess: {0} ...
-olcAccess: {1} ...
-olcAccess: {2} ...
-olcAccess: {3} ...
-olcAccess: {4} ...
-olcAccess: {5} ...
olcLimits: {0}dn.exact=....
olcRootDn: cn=Admin,dc=...
olcRootPW: {SSHA}yZ...
@@ -52,6 +46,12 @@
entryUUID: ...
creatorsName: cn=config
createTimestamp: ...
-entryCSN: ...
+olcAccess: {0} ...
+olcAccess: {1} ...
+olcAccess: {2} ...
+olcAccess: {3} ...
+olcAccess: {4} ...
+olcAccess: {5} ...
+entryCSN: ...
modifiersName: cn=config
-modifyTimestamp: ...
+modifyTimestamp: ...
with identical "olcAccess: {$n}" lines removed from earlier part the
file and added to the end of the file.
So I am not sure what you are asking. It would not be correct to show
something like
--- a/0/...
+++ b/0/...
@@ -52,6 +46,6 @@
entryUUID: ...
creatorsName: cn=config
createTimestamp: ...
-entryCSN: ...
+entryCSN: ...
modifiersName: cn=config
-modifyTimestamp: ...
+modifyTimestamp: ...
and pretend that the original "olcAccess: {$n}" lines did not get
moved from the earlier part of the file to the end of the file.
Perhaps you may be looking for "git diff --color-moved"? I dunno.
next prev parent reply other threads:[~2020-07-13 15:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 10:34 Help understanding unexpected diff output Ulrich Windl
2020-07-13 15:12 ` Junio C Hamano [this message]
2020-07-14 8:52 ` Antw: [EXT] " Ulrich Windl
2020-07-14 18:53 ` Junio C Hamano
2020-10-23 14:24 ` 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
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=xmqqsgdvo3ec.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=Ulrich.Windl@rz.uni-regensburg.de \
--cc=git@vger.kernel.org \
/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).