Ignoring timestamp changes

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignoring timestamp changes

SmartGit mailing list
Hi everyone,

Does anyone know how to set up SmartGitHg to ignore files where the timestamp is different, but the contents of the file are the same.

At the moment it's including files with only a timestamp change when I go to do a Commit and I have to manually deselect them.

Any help would be greatly appreciated.




 

Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
> At the moment it's including files with only a timestamp change when I go to do a
> Commit and I have to manually deselect them.

If the timestamp has changed, SmartGit will do a content comparison. If the content is identical, the file won't show up as modified -- this is true for both, Git and Mercurial (which one are you using, btw?). Hence, if you see modified files, there must be actually something modified.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com


10/18/2014 09:10 - [hidden email] [smartgit] wrote:

> Hi everyone,
>
> Does anyone know how to set up SmartGitHg to ignore files where the timestamp is
> different, but the contents of the file are the same.
>
> At the moment it's including files with only a timestamp change when I go to do a
> Commit and I have to manually deselect them.
>
> Any help would be greatly appreciated.
>
>
>
>
>  
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
Hi Marc. Thanks for the reply.

I did a bit more testing and it's not the timestamp that's the issue, it's that there are carriage return differences between the two files - CRLF vs LF.

Am I able to set up SmartGitHg to ignore carriage return differences?

I'm using Git btw.
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
> I did a bit more testing and it's not the timestamp that's the issue, it's that
> there are carriage return differences between the two files - CRLF vs LF.

I guess you have CRLF in the repository and LF locally and core.autocrlf=true configured (default on Windows)? In this case, the modification is expected because the file should be stored with LF in the repository. I'd recommend to commit these changes.

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com


10/22/2014 08:20 - [hidden email] [smartgit] wrote:

> Hi Marc. Thanks for the reply.
>
> I did a bit more testing and it's not the timestamp that's the issue, it's that
> there are carriage return differences between the two files - CRLF vs LF.
>
> Am I able to set up SmartGitHg to ignore carriage return differences?
>
> I'm using Git btw.
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
In reply to this post by SmartGit mailing list
> I guess you have CRLF in the repository and LF locally

Yes that is correct.

> and core.autocrlf=true configured (default on Windows)?

I don't know what this means, but yeah my config should be the default.

I notice that when I commit actual changes, SmartGit pops up a warning about the CRLF or LF differences and - I think - it converts it to what it should be. I cant remember the specific warning message though. But I think these differences ultimately don't matter due to the conversion - correct me if I'm wrong here though.

And this is all fine. I'd just like to set it up so that it doesn't include the files with only CRLF vs LF differences when I click commit. It would save me a bit of time.
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
> > I guess you have CRLF in the repository and LF locally
>
> Yes that is correct.
>
> > and core.autocrlf=true configured (default on Windows)?
>
> I don't know what this means, but yeah my config should be the default.

If that's actually the case, the working tree is considered as modified (check "git status"), because the repository should only contain LF.

> And this is all fine. I'd just like to set it up so that it doesn't include the
> files with only CRLF vs LF differences when I click commit. It would save me a bit
> of time.

It would be wrong if SmartGit wouldn't indicate these differences. Why don't you want to correct your line endings in the repository by simply committing the changes?

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com



10/24/2014 07:40 - [hidden email] [smartgit] wrote:

> > I guess you have CRLF in the repository and LF locally
>
> Yes that is correct.
>
> > and core.autocrlf=true configured (default on Windows)?
>
> I don't know what this means, but yeah my config should be the default.
>
> I notice that when I commit actual changes, SmartGit pops up a warning about the
> CRLF or LF differences and - I think - it converts it to what it should be. I cant
> remember the specific warning message though. But I think these differences
> ultimately don't matter due to the conversion - correct me if I'm wrong here
> though.
>
> And this is all fine. I'd just like to set it up so that it doesn't include the
> files with only CRLF vs LF differences when I click commit. It would save me a bit
> of time.
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
In reply to this post by SmartGit mailing list
When I do a commit, I get the following message:

"LF will be replaced by CRLF in ..."

So my assumption here is that any local file I commit (using LF), will have that LF replaced by CRLF on commit. So if the only changes are carriage returns, the files will be identical after a commit anyway.

Or am I missing something here?

That said I could just commit them regardless, it's not like it's going to cause problems, but it's a large project with a number of developers and I'd prefer not to have entries in the log that say I've modified every file in the project.

Hope that all makes sense.

Thanks for all your help by the way :)
Reply | Threaded
Open this post in threaded view
|

Re: Ignoring timestamp changes

SmartGit mailing list
> When I do a commit, I get the following message:
>
> "LF will be replaced by CRLF in ..."
>
> So my assumption here is that any local file I commit (using LF), will have that
> LF replaced by CRLF on commit. So if the only changes are carriage returns, the
> files will be identical after a commit anyway.

This warning is about changing the working tree.

> That said I could just commit them regardless, it's not like it's going to cause
> problems, but it's a large project with a number of developers and I'd prefer not
> to have entries in the log that say I've modified every file in the project.

That won't happen, because the file isn't committed. Instead, your local working tree file will be changed from LF to CRLF after the commit.

You'll find some more details at:

http://stackoverflow.com/a/1967986

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com


11/11/2014 05:20 - [hidden email] [smartgit] wrote:

> When I do a commit, I get the following message:
>
> "LF will be replaced by CRLF in ..."
>
> So my assumption here is that any local file I commit (using LF), will have that
> LF replaced by CRLF on commit. So if the only changes are carriage returns, the
> files will be identical after a commit anyway.
>
> Or am I missing something here?
>
> That said I could just commit them regardless, it's not like it's going to cause
> problems, but it's a large project with a number of developers and I'd prefer not
> to have entries in the log that say I've modified every file in the project.
>
> Hope that all makes sense.
>
> Thanks for all your help by the way :)
>