• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GIT related issues
#41
Regarding my comments to "git commit --all" - I have to apologize, i mixed it up with your "git push origin --all".

Your usage of that command may have been correct, if your intention was to clone your complete local repository onto github, i doubt that that was your intention.
Normally you want to push the changes of the branch you have worked on only.

I had to do it, as I had created an empty bare repository dummy.git on my github account.
Goto github.com/wo-rasp/dummy.git and check what that single line created.
I did that for two reasons:
1. To demonstrate how to clone a complete repository
2. To demonstrate how to change the setting for origin from your github account to mine
3. To demonstrate the following differences in the git log command:
Code:
* 181257a (HEAD, GPSprotocol) implementation of the General
Purpose Sensor protocol
https://forum.pilight.org/Thread-Proposol-General-Purpose-Sensor-Protocol
versus:
Code:
* 181257a (HEAD, origin/GPSprotocol, GPSprotocol) implementation of the General
Purpose Sensor protocol
https://forum.pilight.org/Thread-Proposol-General-Purpose-Sensor-Protocol

Why is this so important to watch out for ? Remember that previously we had to deal with a situation that git was complaing about the local repository falling behind the tip of origin and git recommended to use "git pull" to get out of it ?

There are three main reasons why your local tip has fallen behind origin's one:
1. You have reset your HEAD locally ("git pull" is the wrong choice)
2. Others have committed changes on origin and the HEAD moved on ("git pull" is the right choice)
3. You are using multiple local repositories and have not updated your "Slaves" (or unintentionally did not use your "Master" repository.

Please note that git reset is not the only command that will allow you to move your HEAD and fall behind.

I will attempt an analysis by respondign to your thread.
 
Reply
#42
You successfully created with commit (3d31205) the one you are looking for.
With the rebase command you moved GPSprotocol on top of the tip of your development branch.
(07-11-2016, 05:08 PM)TheWheel Wrote: I was impressed that the sha code of mine was exactly the same as your's (3d31205) but now I see its not. Don't know why though.. Probably because our eMail addresses differ..?
Yes, and your username, and the different time of the commit, and if you edit any of the files differently, ....

(07-11-2016, 05:08 PM)TheWheel Wrote: Still I'm stuck after two very extensive sets of instructions from you, for which I'm grateful, but I hoped the first would solve my problem (but did not) and this one does not lead me to the same status as you manage to accomplish in your setup...

It not only makes me feel quite stupid, but it takes a lot of your time too!
Well, you are quite on track. You are just having some difficulties to interpret the messages git is telling you.

"git status" is telling you that you have not yet accomplished all tasks.
"git log" is helping you to understand what is missing.

When you add the option --all to your "git log" command, you will see what is missing:
Code:
* d03c601 (HEAD, GPSprotocol) implementation of the General Purpose Sensor protocol https://forum.pilight.org/Thread-Proposol-General-Purpose-Sensor-Protocol
| *   9cdc7c1 (origin/GPSprotocol) implementation of the General Purpose Sensor protocol https://forum.pilight.org/Thread-Proposol-General-Purpose-Sensor-Protocol
| |\
| |/
|/|
* |   d2b181e (origin/development, development) Merge pull request #287
Not surprisingly origin/GPSprotocol is still at its old location, but the HEAD of GPSprotocol (e.q. your local HEAD) has diverged from that branch, note that there is no line between (9cdc7c1) and (d03c601).

This either happens if commits are pushed from a different repository (another one you have on another PI or from another developer), or you have done something unusual an another PI. GIT tries its best to ensure that no data is lost, thus git assumes someone else has pushed up data that you do need to pull. In our case GIT has to overwrite data and changes the history, thus you have to use the -f option and to enforce it.

Let us have a look at what follows the "git remote -v".

I have no write access to your repository, but i wanted to demonstrate the subject of "ORIGIN FALLING BEHIND". So I had to change the URL from your git repository to mine.

Now I push the GPSprotocol branch and i use "git log" to check that HEAD, the pointer to the local GPSprotocol branch, and the pointer to the remote GPSprotocol branch are all equal.

I used the "git push origin --all" as I had created an empty repository on my github account (you can check it, it is called dummy.git).

The usual "git push origin GPSdevelopment -f" should do the job for you.
 
Reply
#43
(07-11-2016, 10:34 PM)wo_rasp Wrote: The usual "git push origin GPSdevelopment -f" should do the job for you.
Code:
~/pilightGPS/pilight# git log --all --oneline --graph --decorate
* 3d31205 (HEAD, GPSprotocol) implementation of the General Purpose Sensor protocol https://forum.pi
| *   9cdc7c1 (origin/GPSprotocol) implementation of the General Purpose Sensor protocol https://for
| |\  
| |/  
|/|  
* |   d2b181e (origin/development, development) Merge pull request #287 from mrWheel/development
|\ \  
| | * 55df041 implementation of the General Purpose Sensor protocol https://forum.pilight.org/Thread
| | *   09296d2 Merge pull request #287 from mrWheel/development
| | |\  
| |/ /  
|/| /  
| |/    
| * 08e140e Change protocol Head, ID and Temperature conform specsheet. https://forum.pilight.org/Th
....
Code:
~/pilightGPS/pilight# git push origin GPSdevelopment -f
error: src refspec GPSdevelopment does not match any.
error: failed to push some refs to 'https://github.com/mrwheel/pilight.git'
Code:
~/pilightGPS/pilight# git branch
* GPSprotocol
 development
 master
Code:
~/pilightGPS/pilight# git remote -v
origin    https://github.com/mrwheel/pilight.git (fetch)
origin    https://github.com/mrwheel/pilight.git (push)

~/pilightGPS/pilight#
Shoot me!
 
Reply
#44
Sorry you do not need to push the development branch, as you changed nothing on development (was a bit late).

You do need to push the branch GPSprotocol.

Code:
git push -f origin GPSprotocol
 
Reply
#45
(07-12-2016, 10:49 AM)wo_rasp Wrote: Sorry you do not need to push the development branch, as you changed nothing on development (was a bit late).

You do need to push the branch GPSprotocol.

Code:
git push -f origin GPSprotocol
I should have seen that one myself!!!

Code:
~/pilightGPS/pilight# git push -f origin GPSprotocol
Counting objects: 24, done.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (13/13), 3.89 KiB, done.
Total 13 (delta 11), reused 7 (delta 6)
To https://github.com/mrwheel/pilight.git
 + 9cdc7c1...3d31205 GPSprotocol -> GPSprotocol (forced update)


~/pilightGPS/pilight# 


What really amazes me is the fact that I do this push on my RPI and it goes all through to the pilight PR I submitted six day's ago!!!


Incredible! But what a journeyConfused 


Just for my pease of mind:
I just checked the changes in the PR as it is now on the pilight github. I thínk I have lost one small change in gpsensor.c (have to look into that a bit further). But suppose I want to change the gpsensor.c file, I than have to git add the file and than "git commit --amend" and finally "git push -f origin GPSprotocol" .. right?

Thanks!!!
 
Reply
#46
Yes, that is correct, and in this situation i would use --amend myself as well.

During normal development, I do not recommend the use of the --amend option, but to use regular commits with a commit message clearly stating what was done and why it was done.

The question at which occaision you lost the change in gpsensor.c will most probably remain unanswered. (Perhaps it was edited on Machine A, later on work was done on Machine B, that repository got pushed sooner or later that repository made it to machine A .....)

Tracking of those issues is a bit easier when you do not use the --amend option. Even after you have squashed all your work into a single commit, you can use "git reflog" to get the various commit shas to access data that has been deleted ....
 
Reply
#47
I am having a problem with the compilation of the development branch. If everything is [*] then compilation goes through. But if I select only a few packages then I get an error that I do not understand
Code:
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for libssl - found (/usr/lib/arm-linux-gnueabihf/libssl.so)
-- Looking for libcrypto - found (/usr/lib/arm-linux-gnueabihf/libcrypto.so)
-- Looking for libz - found (/usr/lib/arm-linux-gnueabihf/libz.so)
-- Looking for libunwind - found (/usr/lib/arm-linux-gnueabihf/libunwind.so)
CMake Error at libs/pilight/protocols/network/CMakeInclude.txt:11 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  libs/pilight/protocols/network/CMakeLists.txt:7 (include)

Am I responsible for this? But I have not modified CMakeLists.txt nor CMakeInclude.txt? Setup.sh freezes after that.
 
Reply
#48
Seems to be a bug in one of the CMake files. Can you post your CMakeConfig.txt?
 
Reply
#49
Yes, i can confirm, that you do need to keep a certain number of protocols enabled. I think you need to keep about 10 protocols modules enabled.
 
Reply
#50
I had only four enabled. That explains it.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Config issues from development to stable 8.0 terrar 5 1,346 10-28-2017, 09:56 AM
Last Post: curlymo
  Some issues going from dev to nightly. psbest 4 3,923 01-02-2015, 10:19 PM
Last Post: psbest
  [Solved] Webgui issues in webkit browsers lvdp 7 4,928 02-19-2014, 09:51 PM
Last Post: curlymo

Forum Jump:


Browsing: 1 Guest(s)