git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git pull fails

From
RSRadoslaw Szkodzinski <astralstorm@o2.pl>
Date
Mar 28, 2006, 15:00 UTC
Message-ID
<200603281700.17233.astralstorm@o2.pl>
In-Reply-To
<20060328173827.3d64d91e.tihirvon@gmail.com>
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
Previous: Timo HirvonenNext: Petr Baudis
Message 4 of 10 in “git pull fails”
  1. Timo HirvonenMar 28, 2006
  2. Ralf BaechleMar 28, 2006
  3. Timo HirvonenMar 28, 2006
  4. Radoslaw SzkodzinskiMar 28, 2006
  5. Petr BaudisMar 28, 2006
  6. Timo HirvonenMar 29, 2006
  7. Junio C HamanoMar 29, 2006
  8. Petr BaudisMar 29, 2006
  9. Junio C HamanoMar 29, 2006
  10. Petr BaudisMar 29, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.