Op 21 aug. 2012, om 10:47 heeft Martin Jansa <martin.ja...@gmail.com> het 
volgende geschreven:

> Signed-off-by: Martin Jansa <martin.ja...@gmail.com>
> ---
> scripts/layerman |   13 ++++++++++++-
> 1 files changed, 12 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/layerman b/scripts/layerman
> index 60b1588..87400fa 100755
> --- a/scripts/layerman
> +++ b/scripts/layerman
> @@ -28,11 +28,22 @@ function check_layer() {
>       cd ${LAYERDIR}
>       CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')"
>       CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')"
> +     CURRENTURI="$(git config remote.origin.url)"
> 
> +     if [ "${CURRENTURI}" != "${LAYERURI}" ] ; then
> +             echo "WARNING!!!!"
> +             echo "WARNING: ${LAYERNAME} is using a different uri 
> '${CURRENTURI}' than configured in layers.txt '${LAYERURI}'"
> +             echo "WARNING: Changing uri to: '${LAYERURI}'"
> +             echo "WARNING!!!!"
> +             git remote set-url origin ${LAYERURI}
> +             git remote update
> +     fi

The above part of the patch is awesome!

>       if [ "${CURRENTBRANCH}" != "${BRANCH}" ] ; then
>               echo "WARNING!!!!"
> -             echo "WARNING: ${LAYERNAME} is using a different branch than 
> configured in layers.txt"
> +             echo "WARNING: ${LAYERNAME} is using a different branch 
> '${CURRENTBRANCH}' than configured in layers.txt '${BRANCH}'"
> +             echo "WARNING: Changing branch to: '${BRANCH}'"
>               echo "WARNING!!!!"
> +             git checkout origin/${BRANCH} -b ${BRANCH} >/dev/null || git 
> checkout ${BRANCH}
>       fi

But this breaks the intention. The general idea is to allow people to add their 
own commits to a custom branch, but remove changes otherwise. The current 
implementation is inconsitent and non-obvious, so I'd welcome suggestions. 
Whatever we turn out to do, it will get documented in the README to lessen the 
surprise.

Do you want me to commit only the top part?

regards,

Koen
_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to