wpCloud / wp-upstream

4 stars 1 forks source link

Strange "remote.origin.url" Loop #10

Closed andypotanin closed 9 years ago

andypotanin commented 9 years ago

image

andypotanin commented 9 years ago

I thought it would stop after I manually pushed updates.. image

But it didnt.

felixarntz commented 9 years ago

I cannot replicate how that happens. Might it have to do with WP CLI?

The thing is, the function that runs the code above (https://github.com/wpCloud/wp-upstream/blob/v0.1/inc/WPUpstream/Git.php#L338) is only executed once on pageload during configuration of the Git class. Since it is a private method only run in the constructor of a singleton class, it can only be executed once at all. So I suppose for some reason multiple page loads are triggered.