[Spice-devel] [PATCH spice-gtk] Update submodules using the --merge option

Christophe de Dinechin christophe at dinechin.org
Mon Jul 31 09:51:59 UTC 2017


> On 28 Jul 2017, at 12:19, Marc-André Lureau <marcandre.lureau at redhat.com> wrote:
> 
> Hi
> 
> ----- Original Message -----
>> From: Christophe de Dinechin <dinechin at redhat.com <mailto:dinechin at redhat.com>>
>> 
>> By default, subdmodules will be checked out in detached state.
>> This means that you may lose some work in progress.
> 
> Lose is a bit strong here.
> 
> If you have uncommitted changes, submodule update will fail.
> 
> If it's committed, it's in your reflog, and in which case you should have created a branch for your work.

git submodule update often places submodules in detached head state,
even if you had created a branch beforehand.

> 
>> 
>> Using the --merge option will also ensure that if there
>> are conflicts between your current submodule and the
>> version referenced by the parent, you get an opportunity
>> to resolve the conflicts instead of having your changes
>> silently wiped out.
>> 
>> Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
>> ---
>> autogen.sh | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/autogen.sh b/autogen.sh
>> index cc7bda3..3fbd5b3 100755
>> --- a/autogen.sh
>> +++ b/autogen.sh
>> @@ -7,7 +7,7 @@ test -z "$srcdir" && srcdir=.
>> 
>> (
>>     cd "$srcdir"
>> -    git submodule update --init --recursive
>> +    git submodule update --init --recursive --merge
> 
> I would rather use --rebase (to avoid accidental push of those update merges).

Why not. It will point out merge conflicts just the same.

> 
>>     gtkdocize
>>     autoreconf -v --force --install
>> )
>> --
>> 2.11.0 (Apple Git-81)
>> 
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org <mailto:Spice-devel at lists.freedesktop.org>
>> https://lists.freedesktop.org/mailman/listinfo/spice-devel <https://lists.freedesktop.org/mailman/listinfo/spice-devel>
>> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org <mailto:Spice-devel at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/spice-devel <https://lists.freedesktop.org/mailman/listinfo/spice-devel>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170731/72e1a963/attachment-0001.html>


More information about the Spice-devel mailing list