Package: fai-client
Version: 4.0.8~deb7u1
Severity: wishlist

When getting config from git, the config space is checked out from
origin/$gitbranch and git complains about it:

> Note: checking out 'origin/BRANCH'.
> 
> You are in 'detached HEAD' state. You can look around, make experimental
> changes and commit them, and you can discard any commits you make in this
> state without impacting any branches by performing another checkout.
>
> If you want to create a new branch to retain commits you create, you may
> do so (now or later) by using -b with the checkout command again. Example:
>
>   git checkout -b new_branch_name
>
> HEAD is now at 6ea2b55... Description

I think it is better to checkout a local branch and merge it with upstream.

diff --git a/lib/get-config-dir-git b/lib/get-config-dir-git
index f2a2285..8251003 100755
--- a/lib/get-config-dir-git
+++ b/lib/get-config-dir-git
@@ -34,7 +34,8 @@ export GIT_WORK_TREE="$FAI"
 export GIT_DIR="$FAI/.git"
 
 _git_checkout() {
-    git checkout -f "origin/$gitbranch"
+    git checkout -f "$gitbranch"
+    git merge "origin/$gitbranch"
     task_error 882 $?
     git clean -df
     task_error 882 $?

You can find the patch here:
https://github.com/paolomiotto/fai/commit/3390409a3510c5aa19ed18b01c175e5dfde06d02


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to