Merge branch 'maint' into bc/master-diff-hunk-header-fix
* maint: (41 commits) Clarify commit error message for unmerged files Use strchrnul() instead of strchr() plus manual workaround Use remove_path from dir.c instead of own implementation Add remove_path: a function to remove as much as possible of a path git-submodule: Fix "Unable to checkout" for the initial 'update' Clarify how the user can satisfy stash's 'dirty state' check. Remove empty directories in recursive merge Documentation: clarify the details of overriding LESS via core.pager Update release notes for 1.6.0.3 checkout: Do not show local changes when in quiet mode for-each-ref: Fix --format=%(subject) for log message without newlines git-stash.sh: don't default to refs/stash if invalid ref supplied maint: check return of split_cmdline to avoid bad config strings builtin-prune.c: prune temporary packs in <object_dir>/pack directory Do not perform cross-directory renames when creating packs Use dashless git commands in setgitperms.perl git-remote: do not use user input in a printf format string make "git remote" report multiple URLs Start draft release notes for 1.6.0.3 git-repack uses --no-repack-object, not --no-repack-delta. ... Conflicts: RelNotes
This commit is contained in:
@ -194,7 +194,7 @@ cmd_add()
|
||||
else
|
||||
|
||||
module_clone "$path" "$realrepo" || exit
|
||||
(unset GIT_DIR; cd "$path" && git checkout -q ${branch:+-b "$branch" "origin/$branch"}) ||
|
||||
(unset GIT_DIR; cd "$path" && git checkout -f -q ${branch:+-b "$branch" "origin/$branch"}) ||
|
||||
die "Unable to checkout submodule '$path'"
|
||||
fi
|
||||
|
||||
@ -340,8 +340,13 @@ cmd_update()
|
||||
|
||||
if test "$subsha1" != "$sha1"
|
||||
then
|
||||
force=
|
||||
if test -z "$subsha1"
|
||||
then
|
||||
force="-f"
|
||||
fi
|
||||
(unset GIT_DIR; cd "$path" && git-fetch &&
|
||||
git-checkout -q "$sha1") ||
|
||||
git-checkout $force -q "$sha1") ||
|
||||
die "Unable to checkout '$sha1' in submodule path '$path'"
|
||||
|
||||
say "Submodule path '$path': checked out '$sha1'"
|
||||
|
Reference in New Issue
Block a user