author | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Jun 2009 19:49:50 +0000 (12:49 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 13 Jun 2009 19:49:50 +0000 (12:49 -0700) |
* 'ph/submodule-rebase' (early part):
Rename submodule.<name>.rebase to submodule.<name>.update
git-submodule: add support for --rebase.
Conflicts:
Documentation/git-submodule.txt
git-submodule.sh
Rename submodule.<name>.rebase to submodule.<name>.update
git-submodule: add support for --rebase.
Conflicts:
Documentation/git-submodule.txt
git-submodule.sh
1 | 2 | |||
---|---|---|---|---|
Documentation/git-submodule.txt | patch | | diff1 | | diff2 | | blob | history |
git-submodule.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-submodule.txt
index 14256c695b3817014be8ba4f45a62a2cd588939c,f993469dc642d6fc84a07826c3782b8e22e3e223..cd8e861ce4ae33b25928a16aa213933d2a38a155
SYNOPSIS
--------
[verse]
-'git submodule' [--quiet] add [-b branch] [--] <repository> <path>
+'git submodule' [--quiet] add [-b branch]
+ [--reference <repository>] [--] <repository> <path>
'git submodule' [--quiet] status [--cached] [--] [<path>...]
'git submodule' [--quiet] init [--] [<path>...]
- 'git submodule' [--quiet] update [--init] [-N|--no-fetch]
-'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--] [<path>...]
++'git submodule' [--quiet] update [--init] [-N|--no-fetch] [--rebase]
+ [--reference <repository>] [--] [<path>...]
'git submodule' [--quiet] summary [--summary-limit <n>] [commit] [--] [<path>...]
'git submodule' [--quiet] foreach <command>
'git submodule' [--quiet] sync [--] [<path>...]
This option is only valid for the update command.
Don't fetch new objects from the remote site.
+ --rebase::
+ This option is only valid for the update command.
+ Rebase the current branch onto the commit recorded in the
+ superproject. If this option is given, the submodule's HEAD will not
+ be detached. If a a merge failure prevents this process, you will have
+ to resolve these failures with linkgit:git-rebase[1].
+ If the key `submodule.$name.update` is set to `rebase`, this option is
+ implicit.
+
+--reference <repository>::
+ This option is only valid for add and update commands. These
+ commands sometimes need to clone a remote repository. In this case,
+ this option will be passed to the linkgit:git-clone[1] command.
++
+*NOTE*: Do *not* use this option unless you have read the note
+for linkgit:git-clone[1]'s --reference and --shared options carefully.
+
<path>...::
Paths to submodule(s). When specified this will restrict the command
to only operate on the submodules found at the specified paths.
diff --cc git-submodule.sh
index ab1ed02a663b7e6252fe33f5224cb9653bcd50f2,f384c6b2b4953110ab0f892aabdbb826ac2263da..19a3a840fdc7eed4994741e13306b71a3ffd2ada
--- 1/git-submodule.sh
--- 2/git-submodule.sh
+++ b/git-submodule.sh
command=
branch=
quiet=
+reference=
cached=
nofetch=
+ update=
#
# print stuff on stdout unless -q was specified
shift
nofetch=1
;;
+ -r|--rebase)
+ shift
+ update="rebase"
+ ;;
+ --reference)
+ case "$2" in '') usage ;; esac
+ reference="--reference=$2"
+ shift 2
+ ;;
+ --reference=*)
+ reference="$1"
+ shift
+ ;;
--)
shift
break