esp-idf git tree becomes dirty after git pull latest code

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

esp-idf git tree becomes dirty after git pull latest code

Postby axellin » Thu Aug 20, 2020 10:50 am

I'm using git master tree, after 'git pull' and 'git submodule update' the tree becomes dirty.
Is there any thing wrong from the components/nghttp/nghttp2 upstream?

axel@phoenix:~/esp/esp-idf$ git describe --tags
v4.3-dev-907-g6c17e3a64c02

axel@phoenix:~/esp/esp-idf$ git diff
diff --git a/components/nghttp/nghttp2 b/components/nghttp/nghttp2
--- a/components/nghttp/nghttp2
+++ b/components/nghttp/nghttp2
@@ -1 +1 @@
-Subproject commit 8f7b008b158e12de0e58247afd170f127dbb6456
+Subproject commit 8f7b008b158e12de0e58247afd170f127dbb6456-dirty

axel@phoenix:~/esp/esp-idf$ cd components/nghttp/nghttp2/
axel@phoenix:~/esp/esp-idf/components/nghttp/nghttp2$ git status
HEAD detached at 8f7b008b158e
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: third-party/mruby (new commits)
modified: third-party/neverbleed (new commits)

no changes added to commit (use "git add" and/or "git commit -a")

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: esp-idf git tree becomes dirty after git pull latest code

Postby chegewara » Thu Aug 20, 2020 1:33 pm

axellin wrote:
Thu Aug 20, 2020 10:50 am
axel@phoenix:~/esp/esp-idf/components/nghttp/nghttp2$ git status
HEAD detached at 8f7b008b158e
You are not in master branch.

Code: Select all

git checkout master

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: esp-idf git tree becomes dirty after git pull latest code

Postby axellin » Thu Aug 20, 2020 1:47 pm

chegewara wrote:
Thu Aug 20, 2020 1:33 pm
axellin wrote:
Thu Aug 20, 2020 10:50 am
axel@phoenix:~/esp/esp-idf/components/nghttp/nghttp2$ git status
HEAD detached at 8f7b008b158e
You are not in master branch.
I'm sure I'm in esp-idf master.

https://github.com/espressif/esp-idf/tr ... nts/nghttp
It shows nghttp2 @ 8f7b008

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: esp-idf git tree becomes dirty after git pull latest code

Postby boarchuz » Thu Aug 20, 2020 1:56 pm

git submodule update --recursive

devanl
Posts: 14
Joined: Sat Jan 04, 2020 5:26 pm

Re: esp-idf git tree becomes dirty after git pull latest code

Postby devanl » Fri Aug 21, 2020 4:29 am

So, depending on how far you jumped when migrating to master, in some cases, the submodule dependencies of another submodule may have changed and left behind a submodule directory whose contents git suddenly no longer is tracking as a submodule.

That can lead to the behavior you see where you have properly done a

Code: Select all

git submodule update --init --checkout --recursive
And there are still unexpected changes deep down in one of the submodules.

You can see discussion on different approaches to cleaning up those submodules, including the somewhat scary option of doing a submodule recursive git clean with two -f flags to force it to really remove old submodules that are left behind:
https://gist.github.com/nicktoumpelis/11214362

Personally, I'm not so confident that I would actually do the submodule recursive git clean from the ESP IDF repo root. I would just do it from one of the submodules closer to the actual changed module where I'm less concerned about the likelihood of blowing away something important.

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: esp-idf git tree becomes dirty after git pull latest code

Postby axellin » Fri Aug 21, 2020 5:33 am

boarchuz wrote:
Thu Aug 20, 2020 1:56 pm
git submodule update --recursive
This works, thanks.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 77 guests