Git Product home page Git Product logo

Comments (14)

goebish avatar goebish commented on July 17, 2024

I'm also having an issue with src/target/common/devo/msc2/lib/stm32f10x_flash.c since this commit. I tried to fix it but that just made things worse.

from deviation.

TheRealMoeder avatar TheRealMoeder commented on July 17, 2024

When I pulled in upstream for Extended-Audio builds GIT Auto corrected stm32f10x_flash.c for me (it has something to do with the line ends), but i cannot remember the exact message git merge gave me. Anyways, my next push updated the file, which can be found here. https://github.com/TheRealMoeder/deviation/blob/4ecf8a22bbb58c8b219b96eb9fc8d15fe023ebb6/src/target/common/devo/msc2/lib/stm32f10x_flash.c
I had no further issues after that (Linux build env)

from deviation.

F-D-R avatar F-D-R commented on July 17, 2024

Yes, that is because of the line ends.
Probably those files had CrLf line ends somewhere, and now git checks out everything with Lf only line ends, so it seems like it was changed.
If I remember well, I had to checkout those files...

from deviation.

F-D-R avatar F-D-R commented on July 17, 2024

Well, you need to reset the existing files to reflect the new line endings:

git rm -rf --cached .
git reset --hard HEAD

from deviation.

goebish avatar goebish commented on July 17, 2024

This is even worse now, I might better delete my repo and fork again ... but I'll lose my history and branches.

from deviation.

TheRealMoeder avatar TheRealMoeder commented on July 17, 2024

Why is it worse? What errors do you get?

from deviation.

goebish avatar goebish commented on July 17, 2024

I can't even switch branches now
error: Your local changes to the following files would be overwritten by checkout:
src/target/common/devo/msc2/lib/stm32f10x_flash.c
Please, commit your changes or stash them before you can switch branches.
Aborting

from deviation.

TheRealMoeder avatar TheRealMoeder commented on July 17, 2024

What has git diff to offer on this file?

from deviation.

TheRealMoeder avatar TheRealMoeder commented on July 17, 2024

In case of doubt
git add src/target/common/devo/msc2/lib/stm32f10x_flash.c and then git commit to fix things.
If only line endings changed this won't hurt anything.

from deviation.

goebish avatar goebish commented on July 17, 2024

That kinda works, but I've to do it every time I want to switch from this branch.
This is not the first time I'm having issues with line endings and git.
Oh well, I think I'll end up forking again, I already lost a couple of hours trying to fix the issue, I'm losing my nerves ;)

from deviation.

goebish avatar goebish commented on July 17, 2024

$ git diff
diff --git a/src/target/common/devo/msc2/lib/stm32f10x_flash.c b/src/target/common/devo/msc2/lib/stm32f10x_flaindex 31ca625..cdff9e9 100755
--- a/src/target/common/devo/msc2/lib/stm32f10x_flash.c
+++ b/src/target/common/devo/msc2/lib/stm32f10x_flash.c
@@ -710,7 +710,7 @@ FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data)
(__IO uint16_t) tmp = Data >> 16;

     /* Wait for last operation to be completed */
  •    status = FLASH_WaitForLastOperation(ProgramTimeout);
    
  •    status = FLASH_WaitForLastOperation(ProgramTimeout);
    
       /* Disable the PG Bit */
       FLASH->CR &= CR_PG_Reset;
    

warning: CRLF will be replaced by LF in src/target/common/devo/msc2/lib/stm32f10x_flash.c.
The file will have its original line endings in your working directory.

from deviation.

TheRealMoeder avatar TheRealMoeder commented on July 17, 2024

Well obviously the CRLF is wrong in the repository, so it makes sensing doing the add in your fork as well (if my voice alert pull request gets merged it will be fixed in upstream/master as well). Concerning the branches you work on, you should merge in your forks master afterwards to reflect the new file. But I agree this is annoying, but it is rather windows' than git's fault ;)

from deviation.

goebish avatar goebish commented on July 17, 2024

I think my last PR should fix it as well
#223

from deviation.

goebish avatar goebish commented on July 17, 2024

I confirm it's fixed on my side.
You might have to delete stm32f10x_flash.c in your local repo before chekout, it will be replaced with a version with proper line endings.

from deviation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.