[Folio 100 Android Development] mblaster:
First things first: I see a lot of development on github atm (mainly DerArtem and nopy). Thanks for that. I really hope to see a functional CM7 soon on my folio.

The reason I am writing here is DerArtems latest commit on github. You kind of merged in nopys patches. I think it is a good idea to habe one repository where all the patches are combined, but i think there is a more common way to do this that has some advanteges:

Credidts are taken care of automatically, as the original commiter stays the same

The overview of the repository is better, as the individual patches are visible (not just a patch saying 'I merged quite everything from here')

It will be easier for nopy to keep in sync with your repository

So I thought I just tell you a little git-fu:

The proper way to do such a merge is using 'git fetch' and 'git merge'. Lets start fresh without your latest commit:

git clone git://github.com/DerArtem/android-device-betelgeuse.git
cd android-device-betelgeuse/
git revert 7cf53d4c0c8bb122b1a2eab84eada235d741730e

To get in nopy's gingerbread branch just do:

git remote add nopy git://github.com/nopy/android-device-betelgeuse.git
git fetch nopy
git merge nopy/gingerbread

Unfortunately the merge is not clean and reports a conflict:

Auto-merged BoardConfig.mk
CONFLICT (content): Merge conflict in BoardConfig.mk
Auto-merged device_betelgeuse.mk
Auto-merged extract-files.sh
Auto-merged setup-makefiles.sh
Automatic merge failed; fix conflicts and then commit the result.

So lets fix this. Open BoardConfig.mk in your favourite editor. You will notice two blocks starting with '<<<<<<< HEAD:BoardConfig.mk' end ending with '>>>>>>> nopy/gingerbread:BoardConfig.mk':

<<<<<<< HEAD:BoardConfig.mk
=======
TARGET_USES_OLD_LIBSENSORS_HAL := true
TARGET_SENSORS_NO_OPEN_CHECK:=true

# custom recovery ui
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/nvidia/betelgeuse/recovery/recovery_ui.c
>>>>>>> nopy/gingerbread:BoardConfig.mk

and

<<<<<<< HEAD:BoardConfig.mk
#WPA_SUPPLICANT_VERSION := VER_0_6_X
=======
WPA_SUPPLICANT_VERSION := VER_0_5_X
>>>>>>> nopy/gingerbread:BoardConfig.mk

The '=======' line divedes the content of the current head and the file that should be merged. Git does not know what to do with this code, as the pach you want to merge has a different base to start from. E.g. the second conflict comes from the fact, that the patch wants to apply this change:

-WPA_SUPPLICANT_VERSION := VER_0_6_X
+WPA_SUPPLICANT_VERSION := VER_0_5_X

to this line:

#WPA_SUPPLICANT_VERSION := VER_0_6_X

Note the '#' symbol, that is not expected by the patch.

So change the whole conlict block to just the line you would like to keep:

<<<<<<< HEAD:BoardConfig.mk
#WPA_SUPPLICANT_VERSION := VER_0_6_X
=======
WPA_SUPPLICANT_VERSION := VER_0_5_X
>>>>>>> nopy/gingerbread:BoardConfig.mk

changes to

WPA_SUPPLICANT_VERSION := VER_0_5_X

Respectively resolve the firest block to:

TARGET_SENSORS_NO_OPEN_CHECK:=true

as the rest of the lines is already present in other parts of the file.

Exit the editor and do a 'git add BoardConfig.mk' followed by a 'git commit'.

Try a 'git log' and see the merged patches in the list. Then just 'git push origin master' and everything is fine on github.

I hope this little tutorial is kind of useful and not misunderstood as a nagging of someone who has not yet commited anything useful to this project.

mblaster