SwissDataScienceCenter / renku-notebooks

An API service to provide jupyter notebooks for the Renku platform.
https://renkulab.io
Apache License 2.0
6 stars 7 forks source link

Add git pull method to session sidecar #1196

Open olevski opened 2 years ago

olevski commented 2 years ago

This would actually be two methods:

  1. Method just to check if the session can be fast forwarded to a newer commit from the remote
  2. Method to actually do git fetch and git pull in case the session can be fast forwarded
ciyer commented 2 years ago

The first method should do:

- git fetch
- git status --porcelain --branch

The second command will tell us if we are 1. up-to-date 2. a ff behind master or 3. diverged from origin.

The second method will run the first and, if we are an ff behind master run:

- git pull