git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Radoslaw Szkodzinski <astralstorm@o2.pl>
To: git@vger.kernel.org
Cc: Timo Hirvonen <tihirvon@gmail.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: git pull fails
Date: Tue, 28 Mar 2006 16:00:11 +0100	[thread overview]
Message-ID: <200603281700.17233.astralstorm@o2.pl> (raw)
In-Reply-To: <20060328173827.3d64d91e.tihirvon@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

On Tuesday 28 March 2006 16:38, Timo Hirvonen wrote yet:
> Thanks, but forcing everyone to edit their git/remotes/origin file
> is not very nice solution.  I think git-fetch should update refs for the
> other non-'broken' branches and leave "pu" and "next" refs untouched.

How do you know a non-broken branch from something weird?
All git knows is that the history is non-linear. You can do at least three 
things:
- discard older history
- merge older history with newer
- add another branch

Or instead provide a more useful error message, like what is attached.
(I hope kmail doesn't mangle the tabs.)

diff --git a/git-fetch.sh b/git-fetch.sh
index 0346d4a..88df7f4 100755
--- a/git-fetch.sh
+++ b/git-fetch.sh
@@ -172,13 +172,15 @@ fast_forward_local () {
 		;;
 	    esac || {
 		echo >&2 "* $1: does not fast forward to $3;"
+		echo >&2 "  If the branch is known to roll back often,"
+		echo >&2 "  add + before the branch name in $GIT_DIR/$1."
 		case ",$force,$single_force," in
 		*,t,*)
-			echo >&2 "  forcing update."
+			echo >&2 "  Forcing update."
 			git-update-ref "$1" "$2" "$local"
 			;;
 		*)
-			echo >&2 "  not updating."
+			echo >&2 "  Not updating."
 			;;
 		esac
 	    }

-- 
GPG Key id:  0xD1F10BA2
Fingerprint: 96E2 304A B9C4 949A 10A0  9105 9543 0453 D1F1 0BA2

AstralStorm

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-03-28 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28 13:28 git pull fails Timo Hirvonen
2006-03-28 14:11 ` Ralf Baechle
2006-03-28 14:38   ` Timo Hirvonen
2006-03-28 15:00     ` Radoslaw Szkodzinski [this message]
2006-03-28 22:48       ` Petr Baudis
2006-03-29  0:11         ` Timo Hirvonen
2006-03-29  0:22           ` Junio C Hamano
2006-03-29  0:24           ` Petr Baudis
2006-03-29  0:40             ` Junio C Hamano
2006-03-29  0:57               ` Petr Baudis

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200603281700.17233.astralstorm@o2.pl \
    --to=astralstorm@o2.pl \
    --cc=git@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=tihirvon@gmail.com \
    /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.
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 NNTP newsgroup(s).