The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Powershell scripts do not show changes in window

mantzas
April 2, 2014

Hi,

I have a modified powershell script.

Although it show on working copy changes windows, it show nothing in the diff window when i select it!

Any suggestions?

Regards,

S. Mantziaris

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Alan Warren
April 9, 2014

If you're using PowerGUI use the File->Encoding menu to choose UTF-8. PowerGUI's default encoding doesn't seem to work nicely in Git.

mantzas
April 9, 2014

Hi Alan,

changing the encoding had this result:

Before:

After:

Any suggestions? (TortoiseGit has no issue diffing the file)

Alan Warren
April 9, 2014

I'm sorry to hear that didn't work for you; I was feeling quite positive after I got it working on my system.

Is it possible you've modified your .gitattributes trying to fix this? A line like *.ps1 -text might be problematic (I'm no expert).

My .gitattributes contains:

*.ps1diff
*.ps1text

When I made the encoding change, I had to do a "garbage commit" -- my term for when a commit doesn't involve semantic change, but rather changes imposed by a tool. My diff looked like this:

My Diff After PowerGUI Encoding Change

The beginning of the diff also contains some funky characters, which I believe are referred to as the BOM by Unicode enthusiasts.

HTH,
Alan

mantzas
April 9, 2014

this did the trick.

many thanks.

0 votes
mantzas
April 2, 2014

no, the changes are significant.

is there a git config issue or is it sourcetree?

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
April 2, 2014

Are the changes whitespace only?

TAGS
AUG Leaders

Atlassian Community Events