Skip to content

Conversation

@SteveL-MSFT
Copy link
Member

Some of the cleanup work from #4761

  • add ending newline to files missing it
  • update .gitattributes to enforce autocrlf on all text files (this means some of the files show broader changes because it had CRLF on the repo side, but should just be LF)
  • added missing opening element
  • fix mis-encoded character to apostrophe
  • fix copyright symbol where it didn't show up correctly in vscode (although it shows up fine here, it's using the unicode symbol instead of the extended ascii one)

cc @mklement0 @markekraus

@markekraus
Copy link
Contributor

Just to state the obvious, but, the hashes in the tests will need to be updated for the files which were modified.

updated file hashes in the test
@SteveL-MSFT SteveL-MSFT force-pushed the file-cleanup branch 3 times, most recently from 0fc3fd6 to 08c4e00 Compare September 25, 2017 03:07
@SteveL-MSFT
Copy link
Member Author

SteveL-MSFT commented Sep 25, 2017

Not sure why the FileCatalog test is failing on AppVeyor. Passing on my WS2016 and WS2012R2 boxes.

Figured it out, resaving it locally with just LF EOL I get the same hash as on AppVeyor. So I'm resaving the test file as LF so it should be consistent everywhere.

updated testfile hash due to change on EOL
changed tests that were always skipping to pending
resaved TestFileCatalog.txt with LF EOL to be consistent with behavior on AppVeyor
GUID = '41486F7D-842F-40F1-ACE4-8405F9C2ED9B'
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="(c) Microsoft Corporation. All rights reserved."
Copy link
Collaborator

@iSazonov iSazonov Sep 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we use defferent "c"? I see:

  • Copyright (c)
  • Copyright (C)
  • Copyright ©

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vaguely recall (c) is completely wrong, (C) has no legal weight, and that © should be used unless the intended process or system cannot parse it (in which case fall back to (C). But I can't find a source.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IANAL, but doing a search tells me the Berne Convention says none of those symbols are actually needed. Let me follow up with our legal team to see what they recommend so we have consistency. Based on prior experience, I don't expect them to get back to me very quickly, so I suggest we have this as a separate issue #4917

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can look CoreFX experience.

@@ -1 +1,3 @@
CHANGELOG.md merge=union
* text=auto
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my reading of the docs, this will only work if the files are not committed CRLF.

When text is set to "auto", the path is marked for automatic end-of-line conversion. If Git decides that the content is text, its line endings are converted to LF on checkin. When the file has been committed with CRLF, no conversion is done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://www.git-scm.com/docs/gitattributes:

If you want to ensure that text files that any contributor introduces to the repository have their line endings normalized, you can set the text attribute to "auto" for all files.

*	text=auto

The actual conversion of files that have CRLF (or worse mixed EOL) will be part of #4910 which we'll do after 6.0.0 final since it touches so many files.

@TravisEz13
Copy link
Member

@SteveL-MSFT Do you want to wait for the copyright issue to be resolved before merging?

@SteveL-MSFT
Copy link
Member Author

@TravisEz13 no, I created a separate issue for it #4917

@daxian-dbw
Copy link
Member

@SteveL-MSFT quick question, I noticed that some © has been changed to (c) and some are not (e.g. https://github.com/PowerShell/PowerShell/pull/4912/files?w=1#diff-fd6789ade5008bce347f09499cd96bf5R3). Is that intentional?

@SteveL-MSFT
Copy link
Member Author

@daxian-dbw I only changed the ones that were using the Unicode version that doesn't show up in VSCode (easy to search for). I left the ones that use extended ascii. So intentional.

@daxian-dbw daxian-dbw merged commit 901a61b into PowerShell:master Sep 25, 2017
@SteveL-MSFT SteveL-MSFT deleted the file-cleanup branch October 26, 2018 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants