Giter Site home page Giter Site logo

Breaks git after running about synx HOT 22 OPEN

Mark2xv avatar Mark2xv commented on July 20, 2024
Breaks git after running

from synx.

Comments (22)

MattMorgis avatar MattMorgis commented on July 20, 2024 2

Is this project still maintained? This is still an issue.

from synx.

jonzhan avatar jonzhan commented on July 20, 2024 1

Managed to get this to reproduce reliably, after a particularly terrifying afternoon.

Works with XCode Version 7.2 (7C68)

  1. Create a new project (I used the template for iOS Single View Application)
  2. Make it into a git repo
  3. Create a storyboard file in the project
  4. Remove the storyboard file reference from XCode
  5. Move the storyboard file into a subfolder at the same level as the .xcodeproj (the name does not appear to matter. I got this bug because I had a storyboard in a "Base.lproj" folder but the bug can be reproduced with a name like "Potato" as well
  6. Drag the storyboard file back into XCode, and don't copy it
  7. git status --> A-OK 👌
  8. synx projectname.xcodeproj
  9. git status --> EVERYTHING BURNS 🌏🔥🔥🔥🔥🔥🔥💀💀💀💀💀💀

@nunogoncalves @Mark2xv I guess it's been a long time since you guys have had this problem, but just FYI it seemed to work for me after this: I moved the offending files out of the project structure, removed references in XCode, then dragged them into the project and let xcode put them wherever it wants.

from synx.

noordawod avatar noordawod commented on July 20, 2024 1

Since I don't know Ruby, I opted to fix these issues using a shell script. You can grab a copy here:

https://gist.github.com/noordawod/ea1a5fc1fb5654fcba509f6e5862a4eb

from synx.

marklarr avatar marklarr commented on July 20, 2024

After running synx, the .git folder seems to get destroyed. It is still there, but git does not recognize it as such.

What does this mean exactly? What makes it seem like it was destroyed? What is not working?

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

The folder is still there, but git does not recognize it as a repository.

Steps taken:

synx /Users/mark/touch/touch.xcodeproj

Wait for it to finish..
Finishes without any errors.

Afterwards, check git status:

fatal: Not a git repository (or any of the parent directories): .git

I'll check tomorrow what's actually changing in the .git directory to try and figure out what's changing.

from synx.

marklarr avatar marklarr commented on July 20, 2024

That's weird... does it look like anything is missing from .git?

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

Yes, some things are definitely missing.

A diff -r touch/.git backupSynxedGit shows this:

Only in touch/.git: FETCH_HEAD
Only in touch/.git: HEAD
Only in touch/.git: config
Only in touch/.git: index
Only in touch/.git/logs: HEAD

and a whole lot more such as the contents of .git/modules.

I also spotted this in the output of synx:

Syncing files that are not included in Xcode project..
  Localizable.strings/
    .git
      COMMIT_EDITMSG
      config
      FETCH_HEAD
      HEAD
      index
      logs
        HEAD
        refs
          heads
            develop
            feature
              -featurenameredacted-
              -featurenameredacted-
            hotfix
              2.5.5
            master
          remotes
            origin
              feature
                -featurenameredacted-
                -featurenameredacted-
              HEAD
              hotfix
                2.5.5
      modules
        touch

And basically the entire contents of .git.
Why is it putting it as if it's 'under' Localizable.strings? It is most surely not located there.

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

Why not just completely ignore any directory called .git and any file called .gitmodules or .gitignore? I can't think of any circumstance where you would want to change the location of those.

from synx.

marklarr avatar marklarr commented on July 20, 2024

Synx creates another directory in a temporary location on your computer, builds the synced up version of your project there, and then moves it over to replace the original. So, because it works this way, synx can't just ignore things like .git -- it needs to bring them over to the synced up version.

I've never heard of this issue before, so I'm assuming that there is something unique with the way your project is setup. Mostly people's .git directory lives alongside their project directory. IE,

└── YourClonedRepo
    ├── .git
    ├── YourProject

It seems like yours is more like

└── YourProject
    ├── .git

which is why Synx needs to tamper with the .git directory.

As far as why it's not moving your .git directory correctly, I'm not sure. It doesn't seem like it should be treating it any differently than any other directory. It's hard to diagnose without having the project.

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

For a number of reasons I can't show you the project, and absolutely under no circumstance share the files themselves.
What would you need to try and figure out what's going on?

from synx.

kylef avatar kylef commented on July 20, 2024

@Mark2xv Would you be able to create a similar project which can be used to reproduce the issues? Steps to reproduce, or an example project you can run with Synx to reproduce would help figuring out the problem.

from synx.

marklarr avatar marklarr commented on July 20, 2024

what @kylef said

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

Alright, I'll see if I can recreate the same scenario.

from synx.

marklarr avatar marklarr commented on July 20, 2024

@Mark2xv any luck?

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

Haven't really had the chance to investigate/reproduce this issue as of yet. I'll try to do so this weekend.

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

Having a really hard time figuring out what is the cause of this is...
None of my reproduction cases seem to have any effect.

On a sidenote:
I noticed that in another issue (#65) that the -e option does not do what I thought it does. Not that it has/had any effect though, including exclusion options or not, it still seems to delete roughly 2/3rds of my folders contents. (Goes from 550MB to 200MB).

Is there no way of making sure it absolutely ignores any folder that is a submodule? So that it completely copies it over, exactly as it was, to the newly synced folder?

from synx.

nunogoncalves avatar nunogoncalves commented on July 20, 2024

I have the same issue. I'm still trying to figure this one out and came here to see if anybody as the same problem.

from synx.

Mark2xv avatar Mark2xv commented on July 20, 2024

I haven't had much time lately to try and figure out what's causing all of this.
Unfortunately, I can not give any more information regarding our project structure either...

I really hope this issue will get solved as this would save a lot of time!

from synx.

nunogoncalves avatar nunogoncalves commented on July 20, 2024

Thanks for the info @jonzhan . On a company project I was doing also had translations (therefor the Base.lproj folder). In that project I always remove the .git files before I run synx. This is dangerous because it's not automated, and I guess it's just a matter of time before I make a wrong copy paste and have to checkout the whole project all over again :)

from synx.

kumamotone avatar kumamotone commented on July 20, 2024

I am facing the same problem.
I tried the code of #104 but I couldn't resolve the problem.

from synx.

Damnum avatar Damnum commented on July 20, 2024

Any news on this? I'm having the same problem

from synx.

noordawod avatar noordawod commented on July 20, 2024

Burned up my .git directory as well 👎 In the log I can definitely see synx handling .git folder. Why on earth should it do that? I think all hidden directories (aka, starts with a .) should be ignored.

Plus, the Pods directory...

Well, there should be an option to let me decide which directories to ignore altogether -- not just only an option to ignore groups.

from synx.

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.