git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: tvie@ivision.de, git@vger.kernel.org
Subject: Re: end-of-line diff checkout direction dependence problem
Date: Mon, 6 Jul 2015 08:53:20 +0200	[thread overview]
Message-ID: <559A25E0.1090908@web.de> (raw)
In-Reply-To: <559543E9.5040706@ivision.de>

On 2015-07-02 16.00, Thomas Vieten wrote:
[]
> see the file attachend to the end of this message
Thanks for the info
>
>> It may be, that you need to "nornalize" your repo:
>>
> in principle we know all this.
> What is remarkable that we are able to checkout a version of master which is
> not consistent with the repo, and more, dependent from the checkout direction
> (if the direction is the positive or negative history in time). And on the
> other hand we can checkout a version of master which is in sync with the master.
>
> Normally such conflicts with not normalised repos appear immediately also in
> positive history direction. And then it is possible to detect them.
> The other way around - negative history and diffs - it causes a big questionmark.
>
> On the other hand this would lead to the mandatory work flow advice: "Always
> normalize the repository after changes within the gitattributes file"
Yes, I think this sounds reasonable, and I think the documentations says this.
But it is a manual step, which is typically done only once.
It there anything which can be improved here ?
> And then: Should this then not be automatically be done somehow in the
> background by git ?
This could make sense, but the word "background" should mean visible to the user ?
Recently we got the "untracked cache" into Git, which keeps track about the
.gitignore files
A similar logic can be used to keep track of the .gitattributes file(s) (There
can be more than one)
Patches are welcome.
>
> Reasoning: if the "git machine" is causing this behaviour systematically,
> shouldn't the machine itself have compensation, correction?
>
Question 1: The documentation should be clear enough:
 Whenever someone "introduces .gitattributes," the repo should be normalized.

> Depending on your point of view this could be seen as a bug.
I have run into this myself, but never in a reproducable way.
The day I can reproduce it, I may send a patch.
Or, somebody else sends a patch before that day.
>
> There is also a big question open: will normalisation really help ? Because
> there must be one commit with the new gitattributes and then you normalize.
To my experience it does.
 Normalizing means one single commit (not 2), including the .gitattributes and
the normalized files.
Question 2:
Is there something in the documentation that could be improved.
> But the "wrong diff" is in the repo and will cause the problem when going back
> to master in the negative direction.
> This is how understand it up to now.
>
> But at this point git is complex and we are not really the experts.
>
> best regards
>
> Thomas V.
>
Thanks for the report(s)

      reply	other threads:[~2015-07-06  6:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 14:12 end-of-line diff checkout direction dependence problem Thomas Vieten
2015-06-30 14:41 ` Torsten Bögershausen
     [not found] ` <5593F73E.60305@ivision.de>
2015-07-02 14:00   ` Thomas Vieten
2015-07-06  6:53     ` Torsten Bögershausen [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=559A25E0.1090908@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=tvie@ivision.de \
    /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).