0
i was facing a issue  while trying to add a new Store Procedure from database .  update model from data base is showing extra line changes in all Store Procedure and showing in "Include Changes " in Visual studio . I am using Visual Studio 2015 , trying to add newly created store Procedure in Entity . any help will be appreciable ,it making me in trouble a lot .[![enter image description here][1]][1]

this screen getting after update from model . enter image description here this screen getting after comparing changes , enter image description here

please look the my setting that i am getting after run "git config -l --show-origin"enter image description here

Vivek Shukla
  • 1,535
  • 1
  • 13
  • 13
  • I have fallowed these steps :- a. Creating Store Procedure. b. Trying tool option " update model from data base". c. checked Store Procedure for updating . d. it showing all store procedure "Include Changes " section in Visual studio . e. i was trying to add single store procedure but showing now all changed . f. when i am comparing changes only showing one extra line with each Store Procedure . Let me know ,if more clarification needed . – Vivek Shukla Jun 25 '17 at 15:55
  • Did you check as discusses your git config -l for any core.autocrlf true? – VonC Jun 26 '17 at 04:32
  • yes ,everything is fine there . one core.autocrlf : true , below second core.autocrlf : false ,so i think last one overriding first one . How i can see you complete setting options . – Vivek Shukla Jun 26 '17 at 04:40
  • As I said: git config -l --show-origin – VonC Jun 26 '17 at 04:41
  • core.symlinks=false core.autocrlf=true core.fscache=true color.diff=auto color.status=auto color.branch=auto color.interactive=true help.format=html http.sslcainfo=C:/Program Files (x86)/Git/mingw32/ssl/certs/ca-bundle.crt diff.astextplain.textconv=astextplain rebase.autosquash=true filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.required=true – Vivek Shukla Jun 26 '17 at 04:42
  • mergetool.prompt=true mergetool.vsdiffmerge.cmd="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\vsdiffmerge.exe" "$REMOTE" "$LOCAL" "$BASE" "$MERGED" //m mergetool.vsdiffmerge.trustexitcode=true mergetool.vsdiffmerge.keepbackup=false core.autocrlf=false core.repositoryformatversion=0 core.filemode=false core.bare=false core.logallrefupdates=true core.symlinks=false core.ignorecase=true – Vivek Shukla Jun 26 '17 at 04:43
  • @VonC look above setting showing by running "git config -l " – Vivek Shukla Jun 26 '17 at 04:44
  • You can edit your question with this output: that will be easier to read. – VonC Jun 26 '17 at 04:45
  • @VonC i have Edited my question and attached 3 three screen shot . 1 , issue i am getting after taking update from model from Visual studio . 2. After making compare changes , showing new line at my end , you can see screen now . 3. configuration options that i am getting after run "git config -l --show-origin". Let me know , if more clarity needed . – Vivek Shukla Jun 27 '17 at 03:06

1 Answers1

1

I was facing a issue while trying to add a new Store Procedure from database:
update model from data base is showing extra line changes in all Store Procedure and showing in "Include Changes " in Visual studio .

Those extra lines are simply empty lines added between method declarations.
They have nothing to do with core.autocrlf and eol (end of line) characters.

Should you add/commit those changes, the next time you update your model, you should not see those extra lines again (because they would be already there).

So this is not an actual issue, just the way Visual Studio format that file by default. You can proceed with those changes as shown.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I got your point , but i can not commit on these changes , because it already on my Origin repository branch , and next time, i have to take checkout from same branch , from where i have taken now , these are all changes ,right now showing ,they already on my Checkout branch . here i have tried to add a single Store Procedure ,so why ,it showing changes ,in all files . this is actually making me concern . if i am adding/committing these changes , my client will cancel that Pull Request and will never merge these changes , because these changes are not supposed to be there. – Vivek Shukla Jun 27 '17 at 04:59
  • what i should do , please suggest – Vivek Shukla Jun 27 '17 at 05:02
  • @Vivek Hold one, I got to go to work ;) I'll comment there shortly. – VonC Jun 27 '17 at 05:17
  • "so why ,it showing changes ,in all files": probably because you have a Visual Studio "source formatting" setting which mandates to have an empty line between methods (done on formatting: https://stackoverflow.com/a/41533526/6309). Could be resharper too (https://stackoverflow.com/a/24861297/6309). Again, check your settings: https://stackoverflow.com/a/32459206/6309 – VonC Jun 27 '17 at 06:07
  • i think we are getting close to fix my issue , this is something should work for me , i will go through this one ,. https://stackoverflow.com/questions/32229830/how-to-disable-all-whitespace-autoformatting-in-visual-studio-2015/32459206#32459206 – Vivek Shukla Jun 27 '17 at 06:42
  • @ VonC my issue is still not fixed . i am still looking for solution to fix , i have gone above links . – Vivek Shukla Jul 02 '17 at 04:42
  • @Vivek DO you mean Visual Studio is still formatting your files? – VonC Jul 02 '17 at 04:44
  • yes , can you please help me any way , i can share my screen . – Vivek Shukla Jul 02 '17 at 07:27
  • @Vivek Hi Vivek. Sorry, I wasn't available more today. Basically, Git should not add extra-line by itself. So I would really double-check the formatting settings of Visual Studio. For instance: does the issue persists if you clone again the repo, and open a file with Notepad++? Does a `git status`/`git diff` shows you any file with changes *then*? – VonC Jul 02 '17 at 18:39
  • I will do and will update you soon , i am in big trouble with this issue . i have re cloned once but when update from model using EF took , problem still there . – Vivek Shukla Jul 03 '17 at 06:25
  • @Vivek Then the update process with EF is probably imposing this formatting. Is there any problem to add and commit with this format, and see if, going forward, only your subsequent diffs show up? – VonC Jul 03 '17 at 06:26
  • you are right , only problem with EF is probably imposing this formatting issue , Once i am running EF tool then facing this problem now . – Vivek Shukla Jul 03 '17 at 06:36
  • i have gone through changing many VS settings for this , but issue still there . – Vivek Shukla Jul 03 '17 at 06:38
  • @Vivek Is this code generated? (as in https://msdn.microsoft.com/en-us/library/jj613116(v=vs.113).aspx)? – VonC Jul 03 '17 at 07:13
  • yes this is exactly ,what i am using .i am using Data first technique . – Vivek Shukla Jul 03 '17 at 07:32
  • @Vivek Generally, you wouldn't version (put into a Git repo) generated code, because you can re-generate locally, it after a git clone – VonC Jul 03 '17 at 07:37
  • @Vivek See if you can remove it from the Git repo (git rm --cached -r theFolderWithGeneratedfiles), comit, push, and see on a new clone if you can re-generated those files. – VonC Jul 03 '17 at 08:00
  • it means ,i need to clear my catch files then need to do a re clone , right , i will do this same . here " theFolderWithGeneratedfiles" in above Command will be my Source Code folder name . – Vivek Shukla Jul 03 '17 at 08:05
  • @Viv, yes, only if that folder is indeed composed of *generated* files. – VonC Jul 03 '17 at 08:08