From: Junio C Hamano <gitster@pobox.com>
To: Gerrit Pape <pape@smarden.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-pull: don't complain about branch merge config if only fetching tags
Date: Fri, 21 Dec 2007 08:35:13 -0800 [thread overview]
Message-ID: <7v8x3oatvi.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071221124400.20725.qmail@db93e79e204cd8.315fe32.mid.smarden.org> (Gerrit Pape's message of "Fri, 21 Dec 2007 12:44:00 +0000")
Gerrit Pape <pape@smarden.org> 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@smarden.org>
> ---
> 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?
next prev parent reply other threads:[~2007-12-21 16:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-21 12:44 [PATCH] git-pull: don't complain about branch merge config if only fetching tags Gerrit Pape
2007-12-21 16:35 ` Junio C Hamano [this message]
2007-12-27 9:30 ` Gerrit Pape
2007-12-27 10:39 ` Junio C Hamano
2007-12-27 14:46 ` [PATCH] git-pull: warn if only fetching tags with the -t switch Gerrit Pape
2007-12-28 6:37 ` Junio C Hamano
2007-12-28 7:19 ` Junio C Hamano
2007-12-28 17:32 ` Daniel Barkalow
2007-12-28 21:58 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v8x3oatvi.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=pape@smarden.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).