login
Header Space

 
 

Re: Cleaning up git user-interface warts

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Han-Wen Nienhuys <hanwen@...>
Cc: Junio C Hamano <junkio@...>, <git@...>
Date: Thursday, November 16, 2006 - 12:23 pm

On Thu, 16 Nov 2006, Han-Wen Nienhuys wrote:

Your example has nothing at all to do with "pull" vs "fetch", though.

Your example is about something totally _different_, namely that under 
git, "git init-db" is _only_ for creating a _new_ project.


Bzzt. This is where you went wrong, and you blamed "pull".

The way you do this in git is to NOT do "git init". Instead, you replace 
all the

	mkdir y
	cd ../y
	hg init
	hg pull ../x

with a simple

	git clone x y

and YOU ARE DONE.

Now, we could certainly _make_ "git pull" work on an empty git project, 
but that has _nothing_ to do with what people have been talking about.

In fact, the fact that "git fetch" kind of works is not exactly accidental 
(because "git fetch" _is_ meant to add new local branches too), but all 
the problems you have with it are due to the SAME issue. You started 
without any branch at all, because you started with an empty git repo, and 
you're simply not _supposed_ to do that.

So current rule (and this is not new, it's always been true): the ONLY 
time you use "git init-db" is when you are going to start a totally new 
project. Never _ever_ otherwise. If you want to track another project, use 
"git clone".


It's not that it isn't typical, it's that you are using the wrong model. 
Maybe it's not well documented, I can easily give you that, but ALL your 
problems come from that fundamental starting point: you shouldn't have 
used "git init-db" in the first place.

Somebody want to document it?

Alternatively, we certainly _could_ make "git pull" just accept an empty 
git repo, and make it basically create the current branch.

(And we probably should improve the error messahe)


The sane interface _exists_. It's called "git clone".

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Cleaning up git user-interface warts, Jakub Narebski, (Tue Nov 14, 5:30 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Tue Nov 14, 5:34 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Tue Nov 14, 6:56 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Tue Nov 14, 9:48 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Tue Nov 14, 10:10 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Wed Nov 15, 4:12 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 4:26 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 4:50 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 5:18 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 12:20 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 2:03 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Thu Nov 16, 12:30 am)
Re: Cleaning up git user-interface warts, Theodore Tso, (Wed Nov 15, 9:14 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 12:21 am)
Re: Cleaning up git user-interface warts, Theodore Tso, (Thu Nov 16, 12:07 pm)
Re: Cleaning up git user-interface warts , Sanjoy Mahajan, (Wed Nov 22, 7:21 pm)
Re: Cleaning up git user-interface warts, Theodore Tso, (Thu Nov 16, 12:49 pm)
Re: Cleaning up git user-interface warts, Alexandre Julliard, (Thu Nov 16, 7:34 am)
Re: Cleaning up git user-interface warts, Petr Baudis, (Thu Nov 16, 10:01 am)
Re: Cleaning up git user-interface warts, Alexandre Julliard, (Thu Nov 16, 11:48 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Wed Nov 15, 9:20 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 11:12 pm)
Re: Cleaning up git user-interface warts, Johannes Schindelin, (Thu Nov 16, 7:00 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 7:22 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 8:05 pm)
Re: Cleaning up git user-interface warts , Horst H. von Brand, (Wed Nov 22, 10:52 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Thu Nov 16, 9:34 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Fri Nov 17, 2:42 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 3:32 am)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Fri Nov 17, 9:24 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 8:39 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 8:52 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 8:13 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 9:25 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 8:37 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 8:27 pm)
Re: Cleaning up git user-interface warts, Petr Baudis, (Thu Nov 16, 8:35 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 6:45 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 12:23 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 12:42 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 1:17 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 2:13 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 1:57 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 2:28 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 3:47 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 3:53 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 2:27 pm)
Re: multi-project repos (was Re: Cleaning up git user-interf..., Johannes Schindelin, (Thu Nov 16, 6:21 pm)
Re: multi-project repos (was Re: Cleaning up git user-interf..., Johannes Schindelin, (Thu Nov 16, 7:36 pm)
Re: multi-project repos (was Re: Cleaning up git user-interf..., Johannes Schindelin, (Thu Nov 16, 9:22 pm)
Re: multi-project repos (was Re: Cleaning up git user-interf..., Johannes Schindelin, (Thu Nov 16, 10:16 pm)
Re: multi-project repos, Junio C Hamano, (Thu Nov 16, 6:44 pm)
Re: multi-project repos, Johannes Schindelin, (Thu Nov 16, 8:29 pm)
Re: multi-project repos, Junio C Hamano, (Fri Nov 17, 1:39 pm)
Re: multi-project repos, Shawn Pearce, (Sat Nov 18, 2:02 am)
Re: multi-project repos, Junio C Hamano, (Sat Nov 18, 3:31 am)
Re: multi-project repos, Shawn Pearce, (Sat Nov 18, 3:45 am)
Re: multi-project repos, Junio C Hamano, (Fri Nov 17, 4:24 pm)
Re: multi-project repos, Junio C Hamano, (Thu Nov 16, 2:33 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 7:11 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 9:03 am)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Thu Nov 16, 9:11 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 7:47 am)
Re: Cleaning up git user-interface warts , Horst H. von Brand, (Mon Nov 20, 3:44 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Mon Nov 20, 3:46 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 10:03 pm)
Re: Cleaning up git user-interface warts, Han-Wen Nienhuys, (Wed Nov 15, 10:30 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 11:27 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Thu Nov 16, 12:07 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 11:35 pm)
Re: Cleaning up git user-interface warts, Andy Parkins, (Wed Nov 15, 2:58 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 3:32 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 3:18 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Wed Nov 15, 3:39 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 4:09 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 4:21 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 4:40 pm)
Re: Cleaning up git user-interface warts, Theodore Tso, (Thu Nov 16, 12:26 am)
Re: Cleaning up git user-interface warts, Andreas Ericsson, (Thu Nov 16, 7:50 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 12:30 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 1:01 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Thu Nov 16, 1:30 pm)
Re: Cleaning up git user-interface warts, Sean, (Thu Nov 16, 1:44 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Wed Nov 15, 5:08 pm)
Re: Cleaning up git user-interface warts, Jerome Lovy, (Tue Nov 21, 9:25 am)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 5:45 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Wed Nov 15, 6:52 pm)
Re: Cleaning up git user-interface warts, Sean, (Wed Nov 15, 7:07 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 7:02 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 7:33 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 12:37 pm)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Thu Nov 16, 1:57 pm)
Re: Cleaning up git user-interface warts, Carl Worth, (Thu Nov 16, 2:23 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 4:41 am)
Re: Cleaning up git user-interface warts, Carl Worth, (Fri Nov 17, 5:18 am)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 7:29 am)
Re: Cleaning up git user-interface warts, Johannes Schindelin, (Fri Nov 17, 6:11 am)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Fri Nov 17, 12:58 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Fri Nov 17, 7:41 am)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Wed Nov 15, 11:02 pm)
Re: Cleaning up git user-interface warts, Andreas Ericsson, (Thu Nov 16, 7:35 am)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 8:08 pm)
Re: Cleaning up git user-interface warts, Linus Torvalds, (Wed Nov 15, 11:07 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 11:43 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 5:31 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 5:40 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 5:52 pm)
Re: Cleaning up git user-interface warts, Karl , (Fri Nov 17, 8:20 am)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 5:59 pm)
Re: Cleaning up git user-interface warts, Nicolas Pitre, (Wed Nov 15, 2:43 pm)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 2:49 pm)
Re: Cleaning up git user-interface warts, Marko Macek, (Wed Nov 15, 3:05 pm)
Re: Cleaning up git user-interface warts, Sean, (Wed Nov 15, 6:28 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 4:41 pm)
Re: Cleaning up git user-interface warts, Marko Macek, (Thu Nov 16, 2:07 am)
Re: Cleaning up git user-interface warts, Shawn Pearce, (Wed Nov 15, 6:07 pm)
Re: Cleaning up git user-interface warts, Junio C Hamano, (Wed Nov 15, 12:58 am)
Re: Cleaning up git user-interface warts, Michael K. Edwards, (Tue Nov 14, 10:27 pm)
speck-geostationary