• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Refactoring class names, Xcode and git.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Refactoring class names, Xcode and git.


  • Subject: Refactoring class names, Xcode and git.
  • From: Alex Zavatone <email@hidden>
  • Date: Wed, 13 May 2015 12:52:37 -0400

My current iOS project is one I've inherited that has required a large amount of refactoring partially due to no adherence to proper class and method naming conventions.

Many methods started with capital letters and many classes started with lowercase letters making the code pretty hard to read.

As a result, I went through the project in Xcode 6.x and refactored the class names to be properly cased while the project is SCCS controlled using Git.

It appears that I may have uncovered an issue with how Xcode deals with files refactored this way in Git.

To be clear, the class files are named the same, but the case of certain letters have been changed, that's it.

I just clicked on a class file which was refactored this way and went to click the Comparison view and an alert appeared that said "This file does not exist in the index."

Then I looked at others and the same thing happens.

So, I checked to see if it was imported i the initial commit and it is there with the improper lower case spelling of the class file.



Other classes that I've created and committed after refactoring like this are present in the Comparison viewer.

Other classes that did not have their class name refactored are also present in the Comparison viewer.

It only appears that those which have had their file names changed cause this problem.


I then took the refactored class and added a return to the .m and tried to commit it and was not allowed to.

Is it possible that these files who have had the cases of some of the characters in their file names changed will only appear in the in the history after the project.pbx is committed and pushed to the remote repo?


Just want to understand the behavior here so I understand why this happens.

Thanks in advance,
Alex Zavatone
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Refactoring class names, Xcode and git.
      • From: Jens Alfke <email@hidden>
    • Re: Refactoring class names, Xcode and git.
      • From: Marco S Hyman <email@hidden>
  • Prev by Date: How to distribute & use a dynamic framework for iOS?
  • Next by Date: Re: Refactoring class names, Xcode and git.
  • Previous by thread: Re: How to distribute & use a dynamic framework for iOS?
  • Next by thread: Re: Refactoring class names, Xcode and git.
  • Index(es):
    • Date
    • Thread