Re: [PATCH] git-pull: don't complain about branch merge config if only fetching tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerrit Pape <pape@xxxxxxxxxxx> writes:

> When running git pull with the -t switch, it properly fetches tags, but
> complains about missing information on how to merge.  Since there's
> nothing to merge, make git-pull simply exit after fetching the tags.
>
> The problem has been reported by Joey Hess through
>  http://bugs.debian.org/456035
>
> Signed-off-by: Gerrit Pape <pape@xxxxxxxxxxx>
> ---
>  git-pull.sh |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/git-pull.sh b/git-pull.sh
> index 698e82b..43be0bd 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -112,6 +112,11 @@ case "$merge_head" in
>  	     exit 1;;
>  	  *) exit $?;;
>  	esac
> +	# exit if only tags have been fetched
> +	not_for_merge=$(sed -e '/	not-for-merge	tag/d' \
> +			"$GIT_DIR"/FETCH_HEAD)
> +	test "$not_for_merge" != '' || exit 0
> +
>  	curr_branch=${curr_branch#refs/heads/}
>  
>  	echo >&2 "You asked me to pull without telling me which branch you"

I've seen this patch on this list in the past, but isn't "git
pull -t" a user-error?
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux