Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error syncing with cyanogenmod repo

I have followed the instructions here to get the cynogenmod source on my system.

i was able to do the build successfully. I didn't do any local source changes. Now when i try to get the latest source using repo sync command, I am getting the following errors

error: Your local changes to the following files would be overwritten by checkout:
    Android.mk
    extendedcommands.c
    flashutils/Android.mk
    flashutils/flashutils.c
    flashutils/flashutils.h
    mounts.c
    mounts.h
    nandroid.c
    roots.c
Please, commit your changes or stash them before you can switch branches.
Aborting
error: Your local changes to the following files would be overwritten by checkout:
    encore.mk
    init.encore.rc
Please, commit your changes or stash them before you can switch branches.
Aborting
<few more errors like this.........>
error: bootable/recovery/: CyanogenMod/android_bootable_recovery checkout 50822991460cbee65757e9de12b29e39238d6386 
error: device/bn/encore/: CyanogenMod/android_device_bn_encore checkout f6586ab41f0e3f5acfa16b43f9b17008e9bb0524 

I have tried repo forall -c git reset --hard HEAD without success. Any suggestions on how i can resolve these errors?

like image 725
Nimesh Madhavan Avatar asked Jun 09 '11 16:06

Nimesh Madhavan


1 Answers

Apparently I was facing this issue because I had the repository on an NTFS partition. NTFS was not storing the permissions on the file properly and Git was seeing that as a change.
You can force Git to ignore the permissions on the file while looking for changes by using the following command:
repo forall -c git config core.filemode false

(Not sure if this has any side effect. If there is, please let me know!)

like image 92
Nimesh Madhavan Avatar answered Sep 22 '22 09:09

Nimesh Madhavan