diff options
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | 2006-12-09 02:28:26 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-12-08 18:13:31 -0800 |
commit | 62b339a544b1fa5199de7571c460d770cb286e65 (patch) | |
tree | 6c82f20b50bacb40f8a55ac48ac2aac3cc27f2d2 /git-parse-remote.sh | |
parent | 2cdf87ebd9976d98d544669d94b111fea731d2ba (diff) | |
download | git-62b339a544b1fa5199de7571c460d770cb286e65.tar.gz git-62b339a544b1fa5199de7571c460d770cb286e65.tar.xz |
Add branch.*.merge warning and documentation update
This patch clarifies the meaning of the branch.*.merge option.
Previously, if branch.*.merge was specified but did not match any
ref, the message "No changes." was not really helpful regarding
the misconfiguration. This patch adds a warning for this.
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-parse-remote.sh')
-rwxr-xr-x | git-parse-remote.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh index da064a53f..6ae534bf8 100755 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -134,6 +134,8 @@ canon_refs_list_for_fetch () { # or the first one otherwise; add prefix . to the rest # to prevent the secondary branches to be merged by default. merge_branches= + found_mergeref= + curr_branch= if test "$1" = "-d" then shift ; remote="$1" ; shift @@ -171,6 +173,10 @@ canon_refs_list_for_fetch () { dot_prefix= && break done fi + if test -z $dot_prefix + then + found_mergeref=true + fi case "$remote" in '') remote=HEAD ;; refs/heads/* | refs/tags/* | refs/remotes/*) ;; @@ -191,6 +197,11 @@ canon_refs_list_for_fetch () { fi echo "${dot_prefix}${force}${remote}:${local}" done + if test -z "$found_mergeref" -a "$curr_branch" + then + echo >&2 "Warning: No merge candidate found because value of config option + \"branch.${curr_branch}.merge\" does not match any remote branch fetched." + fi } # Returns list of src: (no store), or src:dst (store) |