-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
A few trivial fixes #17691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A few trivial fixes #17691
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #17691 +/- ##
=======================================
Coverage 98.41% 98.41%
=======================================
Files 171 171
Lines 22210 22210
=======================================
Hits 21857 21857
Misses 353 353 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code size report:
|
@@ -268,7 +268,7 @@ submodules: | |||
$(ECHO) "Updating submodules: $(GIT_SUBMODULES)" | |||
ifneq ($(GIT_SUBMODULES),) | |||
$(Q)cd $(TOP) && git submodule sync $(GIT_SUBMODULES) | |||
$(Q)cd $(TOP) && git submodule update --init --filter=blob:none $(GIT_SUBMODULES) || \ | |||
$(Q)cd $(TOP) && git submodule update --init --filter=blob:none $(GIT_SUBMODULES) 2>/dev/null || \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is an error, I think the stderr output would be useful to understand what went wrong.
@dlech, thanks for the comment. Here is what I got usually from master branch: $ git switch master
Switched to branch 'master'
Your branch is up to date with 'upstream/master'.
yf@r7:icropython$ make -C ports/unix submodules
make: Entering directory '/home/yf/Projects/micropython/ports/unix'
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Updating submodules: lib/mbedtls lib/berkeley-db-1.xx lib/micropython-lib
Synchronizing submodule url for 'lib/berkeley-db-1.xx'
Synchronizing submodule url for 'lib/mbedtls'
Synchronizing submodule url for 'lib/micropython-lib'
usage: git submodule [--quiet] [--cached]
or: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--[no-]single-branch] [--] [<path>...]
or: git submodule [--quiet] set-branch (--default|--branch <branch>) [--] <path>
or: git submodule [--quiet] set-url [--] <path> <newurl>
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
make: Leaving directory '/home/yf/Projects/micropython/ports/unix'
yf@r7:icropython$ And here is the output after the change: git switch pull-cosmetics
Switched to branch 'pull-cosmetics'
Your branch is up to date with 'origin/pull-cosmetics'.
yf@r7:icropython$
$ make -C ports/unix submodules
make: Entering directory '/home/yf/Projects/micropython/ports/unix'
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Updating submodules: lib/mbedtls lib/berkeley-db-1.xx lib/micropython-lib
Synchronizing submodule url for 'lib/berkeley-db-1.xx'
Synchronizing submodule url for 'lib/mbedtls'
Synchronizing submodule url for 'lib/micropython-lib'
make: Leaving directory '/home/yf/Projects/micropython/ports/unix' Note that the operation actually succeeds in my case, but it shows an error which may waste users' time. On the other hand, if there is really an error stopping git operations, then both operations will fail and stderr of the last use will still show. |
Ah, I missed the |
I still think the cure is more dangerous than the issue as it may/will hide other issues |
I think it is OK in this case since it essentially calls the same command again if the first one fails - the only difference being the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes.
This mutes usage error for blobless update from older `git` to reduce noise upon submodule updating. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This aligns the prefix string in L285 to that in L284 though the two strings have equal length. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
Summary
This contains some trivial fixes met during my learning journey.
Testing
Checked with UNIX port on Ubuntu 22.04.