* Re: GIT vs Other: Need argument
2007-04-18 16:07 ` Linus Torvalds
@ 2007-04-18 16:31 ` Nicolas Pitre
2007-04-18 16:49 ` Bill Lear
` (4 subsequent siblings)
5 siblings, 0 replies; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-18 16:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Marcin Kasperski, git
On Wed, 18 Apr 2007, Linus Torvalds wrote:
> Actually, at this stage, I really think cogito just *complicates* git
> usage. It hasn't been well-supported lately, and asking for help with
> cogito means that a lot of people can't help you. And you still end up
> using git commands for anything fancier.
Maybe someone should nuke the prominent mention of Cogito at the top of
http://www.kernel.org/git/ then, and replace it with the appropriate Git
equivalent.
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 16:07 ` Linus Torvalds
2007-04-18 16:31 ` Nicolas Pitre
@ 2007-04-18 16:49 ` Bill Lear
2007-04-18 17:43 ` Matthieu Moy
2007-04-18 20:08 ` Guilhem Bonnefille
` (3 subsequent siblings)
5 siblings, 1 reply; 120+ messages in thread
From: Bill Lear @ 2007-04-18 16:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Marcin Kasperski, git
On Wednesday, April 18, 2007 at 09:07:55 (-0700) Linus Torvalds writes:
>...
>Actually, at this stage, I really think cogito just *complicates* git
>usage. ...
As a relative newbie to git, I agree. At our company, we did not even
seriously consider using cogito. Just easier to jump right in to the
frosty waters.
>What _is_ true is that git is simply different from CVS. I don't think
>it's necessarily harder to understand or use (in fact, I would argue that
>git is a lot _easier_ to understand), but it is *different*, and it has a
>ton more capabilities.
Well, differences can lead to difficulties.
Here are a few of the differential difficulties we have faced:
1) There seems to be an innate desire on our part to just "update this
branch from that one on that repository". We have been caught several
times pulling onto the wrong branch, pushing onto the wrong one,
because we assumed the behavior of push/pull was "update this branch,
the one I am on right now, and ONLY this branch", but what we got was
a cross-branch merge. Coming from a CVS background, and there not
having "undo" very easy, this caused severe stress. Easy enough to
undo, once we understood, but does not obviate the stress.
2) Addressing of branches. When to use bare 'git pull/push', when to
use 'git pull/push branch' when to use 'git pull/push branch:branch',
have been continually confusing to us.
3) Funkiness of non-bare repos ---- we really got stung trying to push
into one. Seemed like it took us days to figure out what was going
on.
4) Near disaster using git with ssh to push to our company repo. In
our company, we have a very loosy-goosy IT group. We started using
git with ssh and had serious permissions problems. If we had used the
git protocol from the start, that would have avoided this mess, but
support for that came too late.
Git has gotten much better than when we started with it just at the
beginning of this year. Remote support, branch tracking, lots of
stuff has gotten much, much better.
I could go on and on about the good things, but it is important to
caution --- not frighten --- newbies with tales from others who have
been stung.
Bill
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 16:49 ` Bill Lear
@ 2007-04-18 17:43 ` Matthieu Moy
2007-04-18 17:50 ` Nicolas Pitre
2007-04-18 20:57 ` Theodore Tso
0 siblings, 2 replies; 120+ messages in thread
From: Matthieu Moy @ 2007-04-18 17:43 UTC (permalink / raw)
To: git
Bill Lear <rael@zopyra.com> writes:
> On Wednesday, April 18, 2007 at 09:07:55 (-0700) Linus Torvalds writes:
>>...
>>Actually, at this stage, I really think cogito just *complicates* git
>>usage. ...
>
> As a relative newbie to git, I agree. At our company, we did not even
> seriously consider using cogito. Just easier to jump right in to the
> frosty waters.
Same for me.
As a beginner, I went to http://git.or.cz/, clicked "crash courses",
and since I didn't find "git from scratch", I clicked "git for CVS
users" (I know CVS, but haven't used it for a long time, I'm mostly a
bzr user converted from GNU Arch).
There, the commands are not "git something", but "cg something". Well,
not always, at least. Indeed, there's still a "git blame", a reference
to "git-rev-parse manpage".
Then, I can't even find it in the tutorial, but somewhere, it should
be mentionned to say who I am in ~/.gitconfig.
So, Cogito can not be seen as "a revision control, using git as a
back-end". It's definitely an additional layer, not hiding all of git.
And then, comming to the mailing list, and looking at other websites,
I can see git commands here and there. I started to manage branches
using cogito, tried git commands related to branches, and realized
that they used a totally different interface.
So, cogito has probably been of a real use at the beginning, where git
was said to be almost unuseable without anything else (I didn't try
git at that time), but I don't think it's the case anymore.
--
Matthieu
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 17:43 ` Matthieu Moy
@ 2007-04-18 17:50 ` Nicolas Pitre
2007-04-19 13:16 ` Matthieu Moy
2007-04-18 20:57 ` Theodore Tso
1 sibling, 1 reply; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-18 17:50 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
On Wed, 18 Apr 2007, Matthieu Moy wrote:
> Then, I can't even find it in the tutorial, but somewhere, it should
> be mentionned to say who I am in ~/.gitconfig.
One of the very first thing you can find in Documentation/tutorial.txt
is:
It is a good idea to introduce yourself to git with your name and
public email address before doing any operation. The easiest
way to do so is:
------------------------------------------------
$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com
------------------------------------------------
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 17:50 ` Nicolas Pitre
@ 2007-04-19 13:16 ` Matthieu Moy
2007-04-19 18:44 ` Petr Baudis
0 siblings, 1 reply; 120+ messages in thread
From: Matthieu Moy @ 2007-04-19 13:16 UTC (permalink / raw)
To: git
Nicolas Pitre <nico@cam.org> writes:
> On Wed, 18 Apr 2007, Matthieu Moy wrote:
>
>> Then, I can't even find it in the tutorial, but somewhere, it should
>> be mentionned to say who I am in ~/.gitconfig.
I was talking about the "Git for CVS users" crash course, which is the
one I was naturally pointed to looking for documentation.
> One of the very first thing you can find in Documentation/tutorial.txt
> is:
This tutorial should _really_ be advertized better on
http://git.or.cz/. Probably in the frame "crash courses", and on
http://git.or.cz/course/index.html
Indeed, most of the content of http://git.or.cz/#documentation should
also appear on http://git.or.cz/course/index.html IMHO.
That's a detail, but once you've clicked "Git crash course", the
tutorial is not reachable anymore.
(all that said, I think the documentation has already greatly improved
since I started a few weeks ago. Continue the good job!)
--
Matthieu
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 13:16 ` Matthieu Moy
@ 2007-04-19 18:44 ` Petr Baudis
2007-04-20 9:04 ` Matthieu Moy
0 siblings, 1 reply; 120+ messages in thread
From: Petr Baudis @ 2007-04-19 18:44 UTC (permalink / raw)
To: git
On Thu, Apr 19, 2007 at 03:16:32PM CEST, Matthieu Moy wrote:
> Nicolas Pitre <nico@cam.org> writes:
> > One of the very first thing you can find in Documentation/tutorial.txt
> > is:
>
> This tutorial should _really_ be advertized better on
> http://git.or.cz/. Probably in the frame "crash courses", and on
> http://git.or.cz/course/index.html
>
> Indeed, most of the content of http://git.or.cz/#documentation should
> also appear on http://git.or.cz/course/index.html IMHO.
>
> That's a detail, but once you've clicked "Git crash course", the
> tutorial is not reachable anymore.
I have added the tutorial to the crash course section, but it should
somehow integrated to the website... I wonder if that's easily possible
without getting out of sync. I've also clearly labelled the CVS/SVN
crash courses to be Cogito-focused. I'll wait for list feedback in order
to decide what to do with them further.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 17:43 ` Matthieu Moy
2007-04-18 17:50 ` Nicolas Pitre
@ 2007-04-18 20:57 ` Theodore Tso
1 sibling, 0 replies; 120+ messages in thread
From: Theodore Tso @ 2007-04-18 20:57 UTC (permalink / raw)
To: git
On Wed, Apr 18, 2007 at 07:43:05PM +0200, Matthieu Moy wrote:
> As a beginner, I went to http://git.or.cz/, clicked "crash courses",
> and since I didn't find "git from scratch", I clicked "git for CVS
> users" (I know CVS, but haven't used it for a long time, I'm mostly a
> bzr user converted from GNU Arch).
>
> There, the commands are not "git something", but "cg something". Well,
> not always, at least. Indeed, there's still a "git blame", a reference
> to "git-rev-parse manpage".
>
> Then, I can't even find it in the tutorial, but somewhere, it should
> be mentionned to say who I am in ~/.gitconfig.
Yeah, one of the biggest source of confusion is that a lot of the
resources available on http://git.or.cz refers very heavily to cg, but
most of the discussion on the git mailing list doesn't involve using
cg, and as some have argued, it's not clear cg is very useful; at this
point, given the advances in git's usability in the 1.5 series.
So what I normally tell new users is to *not* look at
http://git.or.cz, since more than once people have taken off points on
git's usability because of the fact that some of the tutorials (in
particular the "git for CVS users") are really talkinga about cogito,
not git, and this gets highly confusing for many new users.
Instead, I tell people they should look at this:
http://www.kernel.org/pub/software/scm/git/docs/
... and reference the tutorials off of this site. It seems to me that
the documentation and tutorials on this site tends to get update much
more frequently and religiously than the resources on http://git.or.cz
--- although there is still some good stuff there that isn't
elsewhere. But unfortunately, for a new user, the fact that they have
to filter out information that might be out of date, or
cogito-specific, from what is relevant, makes it such that I can't
really recommend that site to new users.
> So, cogito has probably been of a real use at the beginning, where git
> was said to be almost unuseable without anything else (I didn't try
> git at that time), but I don't think it's the case anymore.
Yep; and unfortunately, at this point, using cg probably is more
confusing compared to just simply using raw git all by itself.
- Ted
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 16:07 ` Linus Torvalds
2007-04-18 16:31 ` Nicolas Pitre
2007-04-18 16:49 ` Bill Lear
@ 2007-04-18 20:08 ` Guilhem Bonnefille
2007-04-18 20:19 ` Linus Torvalds
` (2 more replies)
2007-04-19 9:24 ` Johannes Schindelin
` (2 subsequent siblings)
5 siblings, 3 replies; 120+ messages in thread
From: Guilhem Bonnefille @ 2007-04-18 20:08 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Marcin Kasperski, git
On 4/18/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> What _is_ true is that git is simply different from CVS. I don't think
> it's necessarily harder to understand or use (in fact, I would argue that
> git is a lot _easier_ to understand), but it is *different*, and it has a
> ton more capabilities.
Yes, but I think that, as Git has ton more capabilities, user has to
understand more things than with CVS.
I don't know lot of corporate teams, but here, our developers are
REALLY not motivated by VCS. It's only a way to share work. And I'm
not talking about concurrent modification: lot of people in my office
really think that the better model is the locked one.
These people won't be the guy who set up the repo. These people only
expect a system to:
- retrieve and merge the job done by other people
- archive their job for other people.
Nothing more. No interest for topic branches (they are simple minded
;-)), no interest for data integrity (it's "not their job"),
interested in problem with connected system ("hey, CVS server is down,
would you like a coffee while waiting IT detects that ?")...
So for such people, I really think raw Git is much more complicated
than CVS/SVN.
--
Guilhem BONNEFILLE
-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com
-=- mailto:guilhem.bonnefille@gmail.com
-=- http://nathguil.free.fr/
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 20:08 ` Guilhem Bonnefille
@ 2007-04-18 20:19 ` Linus Torvalds
2007-04-18 21:45 ` Daniel Barkalow
2007-04-18 21:21 ` Michael K. Edwards
2007-04-19 8:37 ` Johannes Schindelin
2 siblings, 1 reply; 120+ messages in thread
From: Linus Torvalds @ 2007-04-18 20:19 UTC (permalink / raw)
To: Guilhem Bonnefille; +Cc: Johannes Schindelin, Marcin Kasperski, git
On Wed, 18 Apr 2007, Guilhem Bonnefille wrote:
>
> Yes, but I think that, as Git has ton more capabilities, user has to
> understand more things than with CVS.
I do agree.
The whole "branch" thing is something you can ignore in CVS, but it's
simply very hard to ignore in git, because even *if* you just follow
another repository, git kind of forces you to be aware of the difference
between "local branch" and "remote tracking branch".
I think that's fairly fundamental to being distributed, though.
> I don't know lot of corporate teams, but here, our developers are
> REALLY not motivated by VCS. It's only a way to share work. And I'm
> not talking about concurrent modification: lot of people in my office
> really think that the better model is the locked one.
Sure. At one level they may even be right. It's just that the locked model
obviously doesn't work past a certain scenario. But explaining that to
somebody who doesn't even think outside his own scenario is pointless.
So no question: git has a level of abstraction and perhaps requires a
higher-level view than RCS and CVS do. And I can well imagine that it is
seen as more "difficult" because of that.
I just haev to say that I worked with CVS at a commercial company for
seven years, and I *did* do things like branches and merges etc, and
despite workign with it at that level (not that I was the expert by any
means: we had a person who came in with the main job literally being the
tools around CVS to make branching more convenient etc), I seriously feel
that CVS was a *lot* harder to get into than it is to get into git.
> So for such people, I really think raw Git is much more complicated
> than CVS/SVN.
I do wonder what we could do about that. I think you can use git in the
"SVN tracker only" model, and I really thought it was pretty damn simple,
but ...
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 20:19 ` Linus Torvalds
@ 2007-04-18 21:45 ` Daniel Barkalow
0 siblings, 0 replies; 120+ messages in thread
From: Daniel Barkalow @ 2007-04-18 21:45 UTC (permalink / raw)
To: Linus Torvalds
Cc: Guilhem Bonnefille, Johannes Schindelin, Marcin Kasperski, git
On Wed, 18 Apr 2007, Linus Torvalds wrote:
> On Wed, 18 Apr 2007, Guilhem Bonnefille wrote:
> >
> > Yes, but I think that, as Git has ton more capabilities, user has to
> > understand more things than with CVS.
>
> I do agree.
>
> The whole "branch" thing is something you can ignore in CVS, but it's
> simply very hard to ignore in git, because even *if* you just follow
> another repository, git kind of forces you to be aware of the difference
> between "local branch" and "remote tracking branch".
>
> I think that's fairly fundamental to being distributed, though.
I actually disagree here. CVS users are obviously familiar with "how far
have I updated from the server". With CVS the "local branch" and "remote
tracking branch" are qualitatively different, and with git they're
qualitatively the same, but the user doesn't have to care. Particularly
with the new refs layout, it's pretty easy to ignore, as long as the
upstream repository isn't using branches for anything this particular user
cares about.
You can just tell people, "Before you merge upstream changes, you have to
commit, so that if the merge gets screwed up you don't lose your work."
And they say, "Oh. That's useful." And they don't need to know the
technical reasons this is both possible and necessary.
(Of course, branches are really helpful once you have a need for them, but
there's no reason to learn about them before that point.)
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 20:08 ` Guilhem Bonnefille
2007-04-18 20:19 ` Linus Torvalds
@ 2007-04-18 21:21 ` Michael K. Edwards
2007-04-19 8:37 ` Johannes Schindelin
2 siblings, 0 replies; 120+ messages in thread
From: Michael K. Edwards @ 2007-04-18 21:21 UTC (permalink / raw)
To: Guilhem Bonnefille
Cc: Linus Torvalds, Johannes Schindelin, Marcin Kasperski, git
Suppose I were dealing with career software developers, backed by real
money, who also happened to be intelligent, thoughtful people, and I
wanted to make the case for git vs. CVS/SVN. I'd start by handing
them copies of the O'Reilly Perforce book and suggesting that they
read it cover to cover. Focus on the chapters on how well organized
development and release branches, and good tracking of feature/fix
propagation among them, can help you cope with the vagaries of
real-life software development.
Then I'd explain the relative merits of Perforce and git -- on one
hand, availability and quality of documentation, training, tech
support, and Windows versions; on the other hand, a genuinely
distributed design, which means that you don't need psychic powers to
arrive at a sane branch structure. Specifically, git's design makes
private branches ultra-cheap for the developers that use them and
zero-impact on the release infrastructure, and the integrity of
_content_ and _history_ doesn't rely on any resemblance between my
branch layout and yours. Speed, scalability, zero license cost, and
the hypothetical ability to hack on it yourself are nice too, but
they're basically fringe issues unless you're so big that you can't
just throw money at the problem -- in which case they're still fringe
issues because you're the enterprise-customer tail that wags the
vendor dog. (If you're big _and_ cash-poor, or if you're stuck on a
VC system so badly designed that no amount of money thrown at the
problem will help, you have a different problem.)
If you do this right, it should be clear that CVS is in the dust on
all fronts and SVN doesn't (AFAICT) have any advantage over Perforce
that git doesn't have more of. You might also mention that git was
designed by Linus to systematically not suck, and has been
successfully handed over to a strong maintenance/enhancement team that
works in public view. And Linus is still here policing to keep
suckage from creeping in. ;-) The hypothetical smart developers will
then agree to go with either Perforce or git, depending on which the
people who have to do the hard work -- release managers and the IT
Morlocks -- are most comfortable with.
If you take this route, be prepared to wind up with Perforce. It's
got its weaknesses, and I prefer git myself, but you could certainly
do a lot worse. I'm not as anti-SVN as Linus, but there aren't many
workflows for which I would recommend it over Perforce. Personally, I
wouldn't voluntarily introduce any other version control system into
the discussion, because the others that I've used in the course of one
day job or another suck massively by comparison, and the ones I
haven't used (or have only toyed with) don't appear to have any
compelling advantage over git. (Having _marginally_ better
documentation isn't much to brag about).
Until someone writes a good book on git and sets up shop as a
commercial support organization, presenting Perforce vs. git as a
classic buy/build decision is probably the best you can do. (You
don't have to "build" git, of course, but you'd have to build your own
in-house training and tech support capability.) I say this as someone
who routinely sits in the "release manager" chair, uses git by choice,
and is currently suffering the pain and agony of migrating a perfectly
good git-based integration process to Perforce, simply because it
appears to be the right thing for this developer organization.
(Doubtless this colors my opinion du jour.)
Cheers,
- Michael
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 20:08 ` Guilhem Bonnefille
2007-04-18 20:19 ` Linus Torvalds
2007-04-18 21:21 ` Michael K. Edwards
@ 2007-04-19 8:37 ` Johannes Schindelin
2007-04-19 13:29 ` Matthieu Moy
2 siblings, 1 reply; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 8:37 UTC (permalink / raw)
To: Guilhem Bonnefille; +Cc: Linus Torvalds, Marcin Kasperski, git
Hi,
On Wed, 18 Apr 2007, Guilhem Bonnefille wrote:
> I don't know lot of corporate teams, but here, our developers are
> REALLY not motivated by VCS. It's only a way to share work. And I'm
> not talking about concurrent modification: lot of people in my office
> really think that the better model is the locked one.
> These people won't be the guy who set up the repo. These people only
> expect a system to:
> - retrieve and merge the job done by other people
> - archive their job for other people.
How is that not concurrent? If it really was not, there would be no need
to merge.
And let's face it: merging with CVS is cumbersome. Why? Exactly because
CVS pretends (and tries to make you, too!) that there is just one branch.
Guess what. There are two branches. And they are conflicting. So, once you
really looked at the problem you really should agree that branches are the
natural mental model to deal with conflicts.
> So for such people, I really think raw Git is much more complicated than
> CVS/SVN.
I imagine that somebody dedicated enough -- i.e. not me -- could set up
some standard aliases which do the CVS/SVN equivalent; we'd probably need
to support something like
[alias]
ci = commit -a && push origin
which should not be all that hard.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 8:37 ` Johannes Schindelin
@ 2007-04-19 13:29 ` Matthieu Moy
0 siblings, 0 replies; 120+ messages in thread
From: Matthieu Moy @ 2007-04-19 13:29 UTC (permalink / raw)
To: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> How is that not concurrent? If it really was not, there would be no need
> to merge.
It can be concurrent, but on different files. Concurrency and merge at
the filetree level, but never within a file. I've worked in a team
where the "corporate" use of a VCS was following this model. Not
locking a file before editing it was considered a mistake.
>> So for such people, I really think raw Git is much more complicated than
>> CVS/SVN.
>
> I imagine that somebody dedicated enough -- i.e. not me -- could set up
> some standard aliases which do the CVS/SVN equivalent; we'd probably need
> to support something like
>
> [alias]
> ci = commit -a && push origin
>
> which should not be all that hard.
It depends on how you implement that.
There have been a discussion crossposted here and on the bzr ML. The
author of cogito added a similar feature to cogito.
But to emulate the centralized model, you need more than that, you
have to
1) make sure you're up to date with upstream
2) commit
3) push
and to do it correctly, 1) must be checked during all the procedure,
and doing it in a transactional way is not trivial.
bzr has a notion of "bound branches". That is, when you commit to a
bound branch, you also commit to the master branch. And the UI for
that is to use "bzr checkout master-branch". I agree the centralized
model is inferior in general, but there are several cases where this
is handy. One of them being to teach a newbie: "see, learn checkout,
update, commit, add, mv, remove and you know how to use it". Another,
for me, is to avoid forgetting to push ;-).
--
Matthieu
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 16:07 ` Linus Torvalds
` (2 preceding siblings ...)
2007-04-18 20:08 ` Guilhem Bonnefille
@ 2007-04-19 9:24 ` Johannes Schindelin
2007-04-19 12:21 ` Alex Riesen
` (2 more replies)
2007-04-19 12:15 ` GIT vs Other: Need argument Marcin Kasperski
2007-04-19 12:46 ` [ANNOUNCE] Cogito is for sale Petr Baudis
5 siblings, 3 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 9:24 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Marcin Kasperski, git
Hi,
On Wed, 18 Apr 2007, Linus Torvalds wrote:
> On Wed, 18 Apr 2007, Johannes Schindelin wrote:
> >
> > On Tue, 17 Apr 2007, Marcin Kasperski wrote:
> > >
> > > a) Windows are unsupported
> >
> > Wrong.
>
> It's a bit more work to set up though, and it has a lot less mindshare,
> and testing, obviously.
Given the fact that Hannes is working not only _on_, but _with_ it, tells
me that it works well enough for any Windows user (remember, they are used
to rebooting their machines several times a day, just to keep them
running).
> So yes, windows is a step-child. I'd love for it to not be one, and
> we'll get there, but it's clearly not as supported as the unix side. We
> still use a fair number of shell scripts (which in turn use unix
> commands and pipelines).
Of course, the Windows users' "I want, but I don't contribute" mindset
does not help either.
> We'll get away from it. I think GSoC will help here.
Unfortunately not as much as I hoped for. Since Google slashed our number
of projects, we could not get funding for a developer who promised to make
a Windows installer, and to work on the user experience on Windows.
Pity.
> Actually, at this stage, I really think cogito just *complicates* git
> usage.
Hmm. However, I have to say that cogito serves/d another purpose quite
well: Look at what came from cogito into git. Loads of useful
enhancements. So, I really have to point to "at this stage", because that
sure was not true 18 months ago.
> What _is_ true is that git is simply different from CVS. I don't think
> it's necessarily harder to understand or use (in fact, I would argue
> that git is a lot _easier_ to understand), but it is *different*, and it
> has a ton more capabilities.
I guess that we should not say that Git is complicated. People tend to
believe that, but it is simply not true. The basic steps are easy. Really
easy.
But Git does not keep you there.
> So people coming from CVS/SVN have a double shock: they are supposed to
> learn things that they "know" are hard (because CVS/SVN made them so damn
> hard - don't tell me that SVN branching is easy, because it is *not* easy.
> It may be cheaper to create a branch, but it has _all_ the same idiocies
> that CVS has once it's created).
It is also dog slow.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 9:24 ` Johannes Schindelin
@ 2007-04-19 12:21 ` Alex Riesen
2007-04-19 12:22 ` Christian MICHON
2007-04-19 16:43 ` Linus Torvalds
2 siblings, 0 replies; 120+ messages in thread
From: Alex Riesen @ 2007-04-19 12:21 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Linus Torvalds, Marcin Kasperski, git
On 4/19/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> to rebooting their machines several times a day, just to keep them
> running).
That's not true! We only need to reboot them once a week to defragment
VFAT and NTFS volumes and cleanup the registry. Well, sometime the
antivirus software hangs up our machines and there of course always
are some malicious programs around. But we do not reboot them several
times a day. On a good day, at leas#$^%$#%^$#!!!!
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 9:24 ` Johannes Schindelin
2007-04-19 12:21 ` Alex Riesen
@ 2007-04-19 12:22 ` Christian MICHON
2007-04-19 12:37 ` Johannes Schindelin
2007-04-19 16:43 ` Linus Torvalds
2 siblings, 1 reply; 120+ messages in thread
From: Christian MICHON @ 2007-04-19 12:22 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Linus Torvalds, Marcin Kasperski, git
On 4/19/07, Johannes Schindelin wrote:
> Given the fact that Hannes is working not only _on_, but _with_ it, tells
> me that it works well enough for any Windows user (remember, they are used
> to rebooting their machines several times a day, just to keep them
> running).
untrue, but very funny :)
My experience (offtopic, I know):
In one day, I actually reboot more often my qemu instances with my linux
test kernels than the current XP host crashes in a year.
--
Christian
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:22 ` Christian MICHON
@ 2007-04-19 12:37 ` Johannes Schindelin
2007-04-19 12:54 ` Christian MICHON
0 siblings, 1 reply; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 12:37 UTC (permalink / raw)
To: Christian MICHON; +Cc: Linus Torvalds, Marcin Kasperski, git
Hi,
On Thu, 19 Apr 2007, Christian MICHON wrote:
> On 4/19/07, Johannes Schindelin wrote:
>
> > Given the fact that Hannes is working not only _on_, but _with_ it,
> > tells me that it works well enough for any Windows user (remember,
> > they are used to rebooting their machines several times a day, just to
> > keep them running).
>
> untrue, but very funny :)
Oh, but it is true! That's personal experience. My typical answer: "You
needed to reboot? What is a 'reboot'?"
> My experience (offtopic, I know):
>
> In one day, I actually reboot more often my qemu instances with my linux
> test kernels than the current XP host crashes in a year.
With a linux test kernel. Yeah, right. So, you compare an experimental
test kernel -- which I gather you stress test? -- with an XP kernel where
you probably do not even check mails while running QEmu, for fear that it
crashes? *lol*!
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:37 ` Johannes Schindelin
@ 2007-04-19 12:54 ` Christian MICHON
0 siblings, 0 replies; 120+ messages in thread
From: Christian MICHON @ 2007-04-19 12:54 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Linus Torvalds, Marcin Kasperski, git
On 4/19/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Oh, but it is true! That's personal experience. My typical answer: "You
> needed to reboot? What is a 'reboot'?"
I agree it was the case in the past.
> > My experience (offtopic, I know):
> >
> > In one day, I actually reboot more often my qemu instances with my linux
> > test kernels than the current XP host crashes in a year.
>
> With a linux test kernel. Yeah, right. So, you compare an experimental
> test kernel -- which I gather you stress test? -- with an XP kernel where
> you probably do not even check mails while running QEmu, for fear that it
> crashes? *lol*!
let me rephrase:
- I run some test on about a kernel I regenerate about > 20 times
a day [I'm making a distro right now...]
- my host XP crashes less than 20 times in a year
I was not comparing both kernels: I would not be spending time on
building a linux distro if I was not convinced linux is far superior :)
--
Christian
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 9:24 ` Johannes Schindelin
2007-04-19 12:21 ` Alex Riesen
2007-04-19 12:22 ` Christian MICHON
@ 2007-04-19 16:43 ` Linus Torvalds
2007-04-19 17:49 ` Marcin Kasperski
` (2 more replies)
2 siblings, 3 replies; 120+ messages in thread
From: Linus Torvalds @ 2007-04-19 16:43 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Marcin Kasperski, git
On Thu, 19 Apr 2007, Johannes Schindelin wrote:
>
> > Actually, at this stage, I really think cogito just *complicates* git
> > usage.
>
> Hmm. However, I have to say that cogito serves/d another purpose quite
> well: Look at what came from cogito into git. Loads of useful
> enhancements. So, I really have to point to "at this stage", because that
> sure was not true 18 months ago.
Absolutely. I think there are still some pieces of cogito that we might
want to migrate into git too, although they're fairly esoteric (ie the
whole history rewriting thing). And I think we still have some places
where git is influenced by cogito doing things differently (ie the whole
branch tracking stuff) where we may want to change our default behaviour
or extend on things.
So yes, "at this stage" was the operative word.
> I guess that we should not say that Git is complicated. People tend to
> believe that, but it is simply not true. The basic steps are easy. Really
> easy.
>
> But Git does not keep you there.
I agree. And to some degree I suspect that the documentation pushes some
of the advanced things a bit *too* eagerly.
Of course, with many of the projects that use git being very
branch-oriented, I guess some of that is inevitable. You can't *not*
mention branches, simply because even people who only track other peoples
work do end up often needing to know about it, or at least hearing about
them..
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 16:43 ` Linus Torvalds
@ 2007-04-19 17:49 ` Marcin Kasperski
2007-04-19 20:57 ` Linus Torvalds
2007-04-19 20:49 ` Johannes Schindelin
2007-04-20 15:54 ` History cleanup/rewriting script for git Jan Harkes
2 siblings, 1 reply; 120+ messages in thread
From: Marcin Kasperski @ 2007-04-19 17:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: git
>> I guess that we should not say that Git is complicated. People tend to
>> believe that, but it is simply not true. (...)
>
> I agree. And to some degree I suspect that the documentation pushes some
> of the advanced things a bit *too* eagerly. (...)
As I am among those, who think that git *is* complicated, I decided to
sit down, and find out why
exactly I think so. Here are the top words/options/concepts, which I
faced almost immediately while
trying GIT, and which I find confusing:
rebase
index
revtree
reset
ref / refs
rev-list
rev-parse
At the same time, concepts like add, rm, commit, push, pull, merge are
natural and easily understandable.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 17:49 ` Marcin Kasperski
@ 2007-04-19 20:57 ` Linus Torvalds
2007-04-23 18:54 ` Carl Worth
0 siblings, 1 reply; 120+ messages in thread
From: Linus Torvalds @ 2007-04-19 20:57 UTC (permalink / raw)
To: Marcin Kasperski; +Cc: git
On Thu, 19 Apr 2007, Marcin Kasperski wrote:
> >
> > I agree. And to some degree I suspect that the documentation pushes some of
> > the advanced things a bit *too* eagerly. (...)
>
> As I am among those, who think that git *is* complicated, I decided to
> sit down, and find out why exactly I think so. Here are the top
> words/options/concepts, which I faced almost immediately while trying
> GIT, and which I find confusing:
>
> rebase
> index
> revtree
> reset
> ref / refs
> rev-list
> rev-parse
Yes. I think it might be a good idea to write some kind of tutorial aimed
for two very simple cases. Because there are really two cases that stand
out as being (a) common and (b) something you start out with!
- Case #1 would be using git basically as a "anonymous CVS" replacement
to track somebody others project.
None of the above are ever really needed for that case, and I think all
you really want to learn is:
git clone
git pull
gitk
git log HEAD@{2.days.ago}..
gitk HEAD@{1}.. some-file-or-directory
and not a whole lot more (maybe pointing them at gitweb repos and
telling them what the thing can do). In other words, you want to teach
people to just fetch the repo, and perhaps how to see what has changed
lately.
In an advanced section for this usage case might be things like
git bisect
to teach people who track other peoples repository how to help those
other people find bugs when something goes wrong. But that would
literally be an "advanced topic".
- Case #2 is the "how to start tracking your own project".
In some ways, it's even *more* trivial, becuase if you start a new
project, you usually start from scratch (or perhaps from some CVS
import), with just one branch, and your first worry is not even how to
export it yet, but how to just *use* it for development.
So for case #2, we'd never even mention "git clone/pull" or branches,
but instead we'd just talk about
git init (and "git cvsimport" or something)
git add/rm/commit
git diff/show
git reset
git checkout
and walk through an everyday problem set of just some _very_ basic
situations. Explain the whole "content" thing, so that people
understand why "git add <filename>" + "git diff" doesn't actually show
the filename at all, and what the difference between "git diff" and
"git diff HEAD" is.
Those two usage cases actually cover a lot of trivial CVS usage already. A
lot of people probably don't need to learn about branches AT ALL, or
about concurrent development, or anything like that.
And the good news is that once you are very comfy with the two trivial
cases, it's much easier to *later* explain how those two can actually be
combined. In other words, there's probably not any reason at all to even
start to talk about merging and branches until people are actually ready
for it, and start asking you "so what happens if I've made changes and
want to update to the most recent version".
Similarly, you generally don't want to actually start serving your
projects to others until long after you've started using the thing for
development, so early on, it's probably perfectly fine to tell people:
don't worry about setting up a server or gitweb, just be happy in the
knowledge that it *can* be done, and has been done for big projects, so
when you actually want to do that, you can do all these fancy things, but
you shouldn't worry about it _yet_.
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 20:57 ` Linus Torvalds
@ 2007-04-23 18:54 ` Carl Worth
2007-04-23 19:52 ` Josef Weidendorfer
` (2 more replies)
0 siblings, 3 replies; 120+ messages in thread
From: Carl Worth @ 2007-04-23 18:54 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Marcin Kasperski, git, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
On Thu, 19 Apr 2007 13:57:35 -0700 (PDT), Linus Torvalds wrote:
> - Case #1 would be using git basically as a "anonymous CVS" replacement
> to track somebody others project.
I'd extend this to also say "tracking a specific branch" in some
project.
When I raised this recently, Junio suggested something like the
following:
git config --global branch.autosetupmerge true [*]
git clone <URL>
git checkout -b <branch> origin/<branch>
git pull
I haven't gotten around to replying to that message yet, but the
thrust of my reply would be that that does actually work, but it's not
even close to the ease with which one can track the default branch as
Linus described:
> None of the above are ever really needed for that case, and I think all
> you really want to learn is:
>
> git clone
> git pull
So, currently, all non-default branches have a sort of second-class
status from the point of view of users that just want to track
them.
Compare this to svn, for example. Now, svn has an insanely broken
model for what a branch actually is, while git's model is sane. But I
think that with svn the "anonymously tracking a branch" use case isn't
any harder for any one branch compared to any other, (it's just a
matter of starting with the right URL). I'd love to see git achieve
the same thing.
-Carl
[*] Is the command I have above even correct? What Junio actually
suggested was:
$ cat >>$HOME/.gitconfig <<\EOF
[branch]
autosetupmerge
EOF
But I can't find a way to use git-config create a block that looks
like that. I'm just guessing that "autosetupmerge = true" works
equivalently, but I could be wildly wrong.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 18:54 ` Carl Worth
@ 2007-04-23 19:52 ` Josef Weidendorfer
2007-04-23 22:12 ` Carl Worth
2007-04-23 22:23 ` Junio C Hamano
2007-04-23 23:22 ` GIT vs Other: Need argument Junio C Hamano
2 siblings, 1 reply; 120+ messages in thread
From: Josef Weidendorfer @ 2007-04-23 19:52 UTC (permalink / raw)
To: Carl Worth; +Cc: Linus Torvalds, Marcin Kasperski, git, Junio C Hamano
On Monday 23 April 2007, Carl Worth wrote:
> On Thu, 19 Apr 2007 13:57:35 -0700 (PDT), Linus Torvalds wrote:
> > - Case #1 would be using git basically as a "anonymous CVS" replacement
> > to track somebody others project.
>
> I'd extend this to also say "tracking a specific branch" in some
> project.
>
> When I raised this recently, Junio suggested something like the
> following:
>
> git config --global branch.autosetupmerge true [*]
> git clone <URL>
> git checkout -b <branch> origin/<branch>
> git pull
>
> I haven't gotten around to replying to that message yet, but the
> thrust of my reply would be that that does actually work, but it's not
> even close to the ease with which one can track the default branch as
> Linus described:
The commands above are not needed for pure tracking, but instead prepare
a local development branch for you to work on, and where you can pull
upstream changes with "git pull".
For tracking a remote $branch, it should be enough to do
git clone
git fetch
and you get the any (*) remote $branch as "remotes/origin/$branch".
Josef
(*) Perhaps the "any" is too much for wanting to track one branch only?
>
> > None of the above are ever really needed for that case, and I think all
> > you really want to learn is:
> >
> > git clone
> > git pull
>
> So, currently, all non-default branches have a sort of second-class
> status from the point of view of users that just want to track
> them.
>
> Compare this to svn, for example. Now, svn has an insanely broken
> model for what a branch actually is, while git's model is sane. But I
> think that with svn the "anonymously tracking a branch" use case isn't
> any harder for any one branch compared to any other, (it's just a
> matter of starting with the right URL). I'd love to see git achieve
> the same thing.
>
> -Carl
>
> [*] Is the command I have above even correct? What Junio actually
> suggested was:
>
> $ cat >>$HOME/.gitconfig <<\EOF
> [branch]
> autosetupmerge
> EOF
>
> But I can't find a way to use git-config create a block that looks
> like that. I'm just guessing that "autosetupmerge = true" works
> equivalently, but I could be wildly wrong.
>
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 19:52 ` Josef Weidendorfer
@ 2007-04-23 22:12 ` Carl Worth
0 siblings, 0 replies; 120+ messages in thread
From: Carl Worth @ 2007-04-23 22:12 UTC (permalink / raw)
To: Josef Weidendorfer; +Cc: Linus Torvalds, Marcin Kasperski, git, Junio C Hamano
[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]
On Mon, 23 Apr 2007 21:52:58 +0200,Josef Weidendorfer wrote:
> The commands above are not needed for pure tracking, but instead prepare
> a local development branch for you to work on, and where you can pull
> upstream changes with "git pull".
> For tracking a remote $branch, it should be enough to do
>
> git clone
> git fetch
>
> and you get the any (*) remote $branch as "remotes/origin/$branch".
By "tracking" I mean the ability to get the working-tree state to
match that of some remote-tracking branch and then be able to
periodically do some command, ("git pull"), to make the working-tree
reflect the latest state of that remote branch.
So the fact that at any given point I can say:
git checkout origin/<branch>
and get into a detached-HEAD where the working-tree matches what I
last fetched, doesn't quite do the job. From there, there's nothing
like "git pull" to usefully bring the working-tree state up to the
latest. Issuing "git pull" from the detached HEAD state does fetch,
but then complains:
You are not currently on a branch; you must explicitly
specify which branch you wish to merge:
git pull <remote> <branch>
So, no, the current git-clone alone does not get me to where I'd like
to be.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 18:54 ` Carl Worth
2007-04-23 19:52 ` Josef Weidendorfer
@ 2007-04-23 22:23 ` Junio C Hamano
2007-04-23 22:58 ` Carl Worth
2007-04-23 23:22 ` GIT vs Other: Need argument Junio C Hamano
2 siblings, 1 reply; 120+ messages in thread
From: Junio C Hamano @ 2007-04-23 22:23 UTC (permalink / raw)
To: Carl Worth; +Cc: Linus Torvalds, Marcin Kasperski, git
Carl Worth <cworth@cworth.org> writes:
> When I raised this recently, Junio suggested something like the
> following:
>
> git config --global branch.autosetupmerge true [*]
> git clone <URL>
> git checkout -b <branch> origin/<branch>
> git pull
>
> I haven't gotten around to replying to that message yet, but the
> thrust of my reply would be that that does actually work, but it's not
> even close to the ease with which one can track the default branch as
> Linus described:
>
>> None of the above are ever really needed for that case, and I think all
>> you really want to learn is:
>>
>> git clone
>> git pull
>
> So, currently, all non-default branches have a sort of second-class
> status from the point of view of users that just want to track
> them.
It is true that non default ones are second class status.
That's why they are not "default" ;-).
The autosetup configuration needs to be done once for the user
(not tied to any project), so you are talking about difference
between:
git clone
git pull
git pull
git pull
git pull
git pull
...
vs
git clone
git checkout -b next origin/next
git pull
git pull
git pull
git pull
git pull
...
'git clone' step in both are done only once per project's
working tree, 'git checkout -b' step is done once for the
particular branch you are interested in, and after that you will
doing 'git pull' every day or every minute. I do not think one
extra step is a big enough deal to make second class citizens
scream about inequality.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 22:23 ` Junio C Hamano
@ 2007-04-23 22:58 ` Carl Worth
2007-04-23 23:24 ` Linus Torvalds
0 siblings, 1 reply; 120+ messages in thread
From: Carl Worth @ 2007-04-23 22:58 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
On Mon, 23 Apr 2007 15:23:38 -0700, Junio C Hamano wrote:
> It is true that non default ones are second class status.
> That's why they are not "default" ;-).
Sure, but different users have different needs. I use the default
branch for where I want developers to base most new commits, (a
"development" branch), but for some of these "anonymous tracking only"
users, a "stable" branch can be the only branch of interest. So I'd
really like to be able to publish branches on more equal footing.
> The autosetup configuration needs to be done once for the user
> (not tied to any project), so you are talking about difference
> between:
Well, it's not so simple to write off the autosetup configuration
step. Even if it only has to happen once, I still need to teach users
how to do it.
And that's an extra step compared to any other SCM tool one might be
interested in comparing git too, (which is the original topic).
So the current git sequence to get to being able to do just "git pull"
to track a specific branch is:
# Something to setup autosetup (once per user account)
git clone <url>
git checkout -b <branch> origin/<branch>
I know that that's a single command in many other systems, and it
seems a very useful case to target. Is there any argument against
adding a single command that does exactly the above, (with the
modification that the autosetup thing could be done as local instead
of global configuration). And with the recent talk about phasing
cogito out and just merging its functionality into git itself, why not
just use the cogito syntax for this:
git clone <url>#<branch>
At that point, git would be supporting this use case as well as any
other tool out there, (and git can still support things like tracking
_multiple_ branches in better ways than other tools as it does
already).
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 22:58 ` Carl Worth
@ 2007-04-23 23:24 ` Linus Torvalds
2007-04-23 23:55 ` Brian Gernhardt
` (2 more replies)
0 siblings, 3 replies; 120+ messages in thread
From: Linus Torvalds @ 2007-04-23 23:24 UTC (permalink / raw)
To: Carl Worth; +Cc: Junio C Hamano, Marcin Kasperski, git
On Mon, 23 Apr 2007, Carl Worth wrote:
>
> And with the recent talk about phasing cogito out and just merging its
> functionality into git itself, why not just use the cogito syntax for
> this:
>
> git clone <url>#<branch>
That's a fundamentally weaker operation than the current "git clone", so I
really don't think it's a good idea. The syntax also absolutely sucks,
it's so horribly non-unixy.
I'd personally be ok with a
git clone --default=<branch> <url>
to create something where "master" defaults to some other remote branch,
but that just addresses the syntax. And quite frankly, I don't think we
*need* to. We shoud just tell people how _easy_ it is to track some other
branch now.
So I don't really see the problem with just saying:
- the remote *has* a default branch. That's the one you get by default
with "git clone".
- if you want to track another branch, you should just tell git that you
want to track it, and switch to that instead:
git branch --track mybranch origin/otherbranch
git checkout mybranch
and be happy with it.
Yes, it's two extra commands, but they aren't *that* hard to explain,
after all. You really can basically explain each stage both very simply
and naturally with just
- first you clone the repository. This gets you all remote branches, and
sets "master" to track the default remote branch.
git clone remote [local-dir]
- then, you create a new branch that you want to track another of the
branches in origin
git branch --track mybranch origin/otherbranch
- then you check that branch out
git checkout mybranch
and notice how each stage really was not only pretty logical, but even the
command to do it didn't really look *that* strange: even without the
explanation of what the commands are doing, somebody reading just the pure
commands could probably _guess_ what they do!
Really, all three stages are pretty simple, and they are not really that
hard to explain. And it's not even like you do this very often - so this
is the _perfect_ kind of thing to have on a "git reference card" kind of
thing (think O'Reilly reference card series).
So I _really_ think that if we just had the "this is how to use 'git' as a
replacement for 'anonymous CVS'-like usage" documentation, you could
explain all of this very concisely, and with absolutely zero confusion
even to a total non-git person. Give a few example command lines from real
life (eg, tracking the "next" branch from git itself), and make it easy to
find, and you're all done.
The advantage is that unlike that *idiotic* cogito syntax, you don't
actually *lose* anything. If somebody says "but I'd like to track *two*
branches", the sequence is _exactly_ the same. There is no "special magic"
at clone time.
And the syntax is also much clearer. No magic and horribly non-unixy
URL#branch syntax.
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 23:24 ` Linus Torvalds
@ 2007-04-23 23:55 ` Brian Gernhardt
2007-04-24 1:31 ` Daniel Barkalow
2007-04-24 5:15 ` Junio C Hamano
2 siblings, 0 replies; 120+ messages in thread
From: Brian Gernhardt @ 2007-04-23 23:55 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Carl Worth, Junio C Hamano, Marcin Kasperski, git
On Apr 23, 2007, at 7:24 PM, Linus Torvalds wrote:
> So I don't really see the problem with just saying:
>
> - the remote *has* a default branch. That's the one you get by
> default
> with "git clone".
>
> - if you want to track another branch, you should just tell git
> that you
> want to track it, and switch to that instead:
>
> git branch --track mybranch origin/otherbranch
> git checkout mybranch
>
> and be happy with it.
>
> Yes, it's two extra commands, but they aren't *that* hard to explain,
> after all. You really can basically explain each stage both very
> simply
> and naturally with just
It's even better than that. Just use "git checkout --track -b
mybranch origin/otherbranch". Slightly cumbersome, but is only one
command. And easily explained: "Checkout a tracking branch named
mybranch for origin/otherbranch".
And the --track can be removed by using branch.autosetupmerge for
people who always want it.
Actually the man page appears to be minorly incorrect. It has "[-b
[ --track | --no-track ]", which doesn't work. Git gives me "git
checkout: updating paths is incompatible with switching branches/
forcing". I think it's interpreting --track as the new branch name.
I'll send a patch reversing the order of the arguments in the man page.
~~ Brian
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 23:24 ` Linus Torvalds
2007-04-23 23:55 ` Brian Gernhardt
@ 2007-04-24 1:31 ` Daniel Barkalow
2007-04-24 5:15 ` Junio C Hamano
2 siblings, 0 replies; 120+ messages in thread
From: Daniel Barkalow @ 2007-04-24 1:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Carl Worth, Junio C Hamano, Marcin Kasperski, git
On Mon, 23 Apr 2007, Linus Torvalds wrote:
> On Mon, 23 Apr 2007, Carl Worth wrote:
> >
> > And with the recent talk about phasing cogito out and just merging its
> > functionality into git itself, why not just use the cogito syntax for
> > this:
> >
> > git clone <url>#<branch>
>
> That's a fundamentally weaker operation than the current "git clone", so I
> really don't think it's a good idea. The syntax also absolutely sucks,
> it's so horribly non-unixy.
>
> I'd personally be ok with a
>
> git clone --default=<branch> <url>
>
> to create something where "master" defaults to some other remote branch,
> but that just addresses the syntax. And quite frankly, I don't think we
> *need* to. We shoud just tell people how _easy_ it is to track some other
> branch now.
I've converted all my coworkers to git recently, and it was helpful to be
able to go two weeks without explaining branches, due to the fact that our
repositories only have one branch each (at least that people care about).
It was also nice that, when one of them did learn about branches, he had
the two weeks of experience with the absolute basics. I think that a first
time user should be able to get, from the clone command:
[remote "origin"]
url = ...
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/<something>
if the first-time user's first repository for learning has the interesting
stuff in a non-default branch. Now, a second-time user can learn about
branches, but I think that branches are confusing and scary if you don't
already have a bit of experience with the operations that affect a branch.
Obviously, if you want to track two branches in one repository, you need
to know how to *have* additional local branches, but you can put off
learning that until you recognize the need for it, if there's any easy way
to get your initial branch to track the remote branch you're interested
in.
Someone can get work done with clone, add, commit -a, pull, and push (or
format-patch). Two commands and an additional fundamental concept is a lot
of overhead at that stage.
For that matter, I sometimes want a repository where master tracks a
branch that isn't default for other people and "mainline" tracks the
upstream master, which requires a small amount of config file editing, and
can't be made to just happen.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 23:24 ` Linus Torvalds
2007-04-23 23:55 ` Brian Gernhardt
2007-04-24 1:31 ` Daniel Barkalow
@ 2007-04-24 5:15 ` Junio C Hamano
2007-04-24 14:23 ` J. Bruce Fields
2007-04-25 13:12 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
2 siblings, 2 replies; 120+ messages in thread
From: Junio C Hamano @ 2007-04-24 5:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Carl Worth, Marcin Kasperski, git
Linus Torvalds <torvalds@linux-foundation.org> writes:
> I'd personally be ok with a
>
> git clone --default=<branch> <url>
>
> to create something where "master" defaults to some other remote branch,
> but that just addresses the syntax. And quite frankly, I don't think we
> *need* to. We should just tell people how _easy_ it is to track some other
> branch now.
I agree with this (and everything you said in your message).
Keep the semantics the same, except that behave as if remote
HEAD pointed at a different branch than what it really points
at.
If Carl is also happy with the syntax, we can conclude this
discussion and:
(1) have that as an enhancement to git-clone;
(2) add a how-to document or a section to the manual to teach
people how to track one or more branches, based on the
messages already posted on this thread.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-24 5:15 ` Junio C Hamano
@ 2007-04-24 14:23 ` J. Bruce Fields
2007-04-24 15:01 ` Linus Torvalds
2007-04-25 13:12 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
1 sibling, 1 reply; 120+ messages in thread
From: J. Bruce Fields @ 2007-04-24 14:23 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Carl Worth, Marcin Kasperski, git
On Mon, Apr 23, 2007 at 10:15:04PM -0700, Junio C Hamano wrote:
> If Carl is also happy with the syntax, we can conclude this
> discussion and:
>
> (1) have that as an enhancement to git-clone;
>
> (2) add a how-to document or a section to the manual to teach
> people how to track one or more branches, based on the
> messages already posted on this thread.
Note that we almost have the tutorials for the "two very simple cases"
that Linus identifies:
- case #1, the "anonymous CVS" replacement: chapter 2 of
user-manual.txt (the first chapter after the quick start) covers
this. Perhaps in greater generality than necessary, and maybe
detached heads and/or --track should be mentioned earlier.
- tutorial.txt, the "how to start tracking your own project"
case, starts with git-init, git-add, etc.
One problem is that it's not immediately obvious which one to look at
for each case.
--b.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-24 14:23 ` J. Bruce Fields
@ 2007-04-24 15:01 ` Linus Torvalds
2007-04-30 4:31 ` J. Bruce Fields
0 siblings, 1 reply; 120+ messages in thread
From: Linus Torvalds @ 2007-04-24 15:01 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: Junio C Hamano, Carl Worth, Marcin Kasperski, git
On Tue, 24 Apr 2007, J. Bruce Fields wrote:
>
> Note that we almost have the tutorials for the "two very simple cases"
> that Linus identifies:
>
> - case #1, the "anonymous CVS" replacement: chapter 2 of
> user-manual.txt (the first chapter after the quick start) covers
> this. Perhaps in greater generality than necessary, and maybe
> detached heads and/or --track should be mentioned earlier.
>
> - tutorial.txt, the "how to start tracking your own project"
> case, starts with git-init, git-add, etc.
>
> One problem is that it's not immediately obvious which one to look at
> for each case.
Well, I think they really should be documents of their own, so that you
can read about the "CVS tracking" or so without even worrying about the
fact that you didn't read the whole thing.
And they should be easy to find. I agree that we do actually have a fair
amount of docs, but it seems that people don't tend to *find* them. The
user-manual, for example, is great, but I've seen people on the #git logs
apparently not realize it exists ;)
For example, the git homepage has a "documentation" thing, which only
lists the tutorial, not the user manual explicitly. You _can_ get to the
user manual (go to the online version of the Documentation directory and
note the "still work in progress"), but even if you do actually find
yourself there, the user manual itself is actually a bit scary to start
with.
So I think we could just make the initial impression a bit easier. The
tutorial comes fairly close to the "tracking your own" thing, I agree,
but maybe we could have the documentation listed in order of complexity,
and having a way for people to know *which* doc they should start with
when they are at http://git.or.cz/ (or the wikipedia page), so that if
you're only interested in the "tracking somebody else", you could easily
find and read just a single simple documentation thing. Hmm?
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-24 15:01 ` Linus Torvalds
@ 2007-04-30 4:31 ` J. Bruce Fields
0 siblings, 0 replies; 120+ messages in thread
From: J. Bruce Fields @ 2007-04-30 4:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Junio C Hamano, Carl Worth, Marcin Kasperski, git
On Tue, Apr 24, 2007 at 08:01:50AM -0700, Linus Torvalds wrote:
> Well, I think they really should be documents of their own, so that you
> can read about the "CVS tracking" or so without even worrying about the
> fact that you didn't read the whole thing.
Sure. There may be some tension between making more separate documents
and keeping them all findable. Well, it just means we need some easy
way to index them.
> And they should be easy to find. I agree that we do actually have a fair
> amount of docs, but it seems that people don't tend to *find* them. The
> user-manual, for example, is great, but I've seen people on the #git logs
> apparently not realize it exists ;)
>
> For example, the git homepage has a "documentation" thing, which only
> lists the tutorial, not the user manual explicitly. You _can_ get to the
> user manual (go to the online version of the Documentation directory and
> note the "still work in progress"), but even if you do actually find
> yourself there, the user manual itself is actually a bit scary to start
> with.
>
> So I think we could just make the initial impression a bit easier. The
> tutorial comes fairly close to the "tracking your own" thing, I agree,
> but maybe we could have the documentation listed in order of complexity,
> and having a way for people to know *which* doc they should start with
> when they are at http://git.or.cz/ (or the wikipedia page), so that if
> you're only interested in the "tracking somebody else", you could easily
> find and read just a single simple documentation thing. Hmm?
Yeah. So we can try to figure out a small set of clearly labeled entry
points into the documentation, and I'll work with Petr Baudis to make
sure they're at the top of the git home page. And I suppose the same
set should appear on the main git man page. Anywhere else? Maybe
Documentation/ needs its own index.html....
--b.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-24 5:15 ` Junio C Hamano
2007-04-24 14:23 ` J. Bruce Fields
@ 2007-04-25 13:12 ` Carl Worth
2007-04-25 14:09 ` Carl Worth
` (2 more replies)
1 sibling, 3 replies; 120+ messages in thread
From: Carl Worth @ 2007-04-25 13:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 7164 bytes --]
On Mon, 23 Apr 2007 22:15:04 -0700, Junio C Hamano wrote:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> > I'd personally be ok with a
> >
> > git clone --default=<branch> <url>
...
> If Carl is also happy with the syntax, we can conclude this
> discussion and:
>
> (1) have that as an enhancement to git-clone;
I think it's a useful enhancement. It would let me at least document
something like "tracking this project's stable branch" with a single
command, which I think is useful. But I don't know that I would be
totally happy yet. :-)
So please allow me to comment on the syntax a bit. Linus, you claimed
that <url>#<branch> isn't "unixy" enough for your taste. What does
that mean exactly? Is it that two logically independent things are
crammed into a single argument instead of being passed as second
arguments? Or something else?
Here's the reason I want both the URL and the branch to appear as a
single string, (but I don't really care about the precise syntax). I
really want to be able to say "see my branch at <string>" and have
that <string> be a complete and self-contained description of the
branch that can be used in several different ways including:
* Cloning a new repository to track that branch as the default
* Begin tracking that branch as a new branch within an existing
repository
* Viewing that branch's history in a web browser.
So in my dream world I'd publish a single URL+branch string that could
be fed directly to "git clone", something like "git track", or to a web
browser and the user would get exactly what was desired in all
cases. (As for http:// vs. git:// in the URL, I hope someone could
recommend the right magic to make things efficient in my dream world.)
So that idea also addresses the problem that Linus had with adding
some special "tracking" feature that would only be available for a
single branch and only at the time of clone. Of course that would be
undesirable, and that's why I've been talking about something like
"git track" to add the exact same functionality for tracking
subsequent branches after the clone.
When I last mentioned "git track", Junio pointed out that the existing
"git remote add <remote> URL" and "git checkout --track -b <branch>
<remote>/<branch>"[*] is more powerful anyway. I totally agree that
it's great to be able to add a remote like this, and to be able to
then use the <remote> alias to refer to the URL.
But the whole "git remote add" doesn't help and actually gets in the
way in the use case I'm trying to address. The problem is that if the
user has already created a remote alias for the URL I'm advertising, I
can't take advantage of that in my instructions since I don't know
what local name the user used for it.
Here's the kind of email I'd like to be able to write in my dream
world:
[1] I've just written some very fancy feature for our cool project
which you can see at <string> and clone or track with
git. Please try it out and give me feedback.
And from here, readers could paste <string> into a web browser to see
the branch's history, (I'd also like some branch-specific description
to appear), and also be presented with exact commands for cloning or
tracking the branch with git, ("git clone <string>" or "git track
<string>").
Even if the user didn't view the URL I gave in a web browser, there's
enough detail in my message to guess that "git clone <string>" and
"git track <string>" would be useful commands. Or without guessing
required, users would learn this after seeing the commands once or
twice in a web browser or whatever.
So in my dream world, a sentence like the above gives any user all the
information they need to start using git to get at my code. And notice
that my text gets to focus on my features and my project which is what
I care about in a message like this, and doesn't get bogged down in
sharing details about how to use git.
So compare the current situation with my dream world. The closest I
can get know is something like:
[2] I've just written some very fancy feature for our cool project
which you can see in gitweb at <gitweburl>. To track this
branch, do "git remote add cworth <url>; git checkout --track
-b <branch> cworth/<branch>" if you already have some clone of
our project. Otherwise do "git clone <url>; git checkout
--track -b <branch>". Please try it out and give me feedback.
So adding "clone --default" would help shorten the last command, but
wouldn't really help simplify the rest of this stuff. And it's really
all noise when what I want to be talking about is my code, not the
syntax of various git commands.
Now, someone might complain that I'm setting up a strawman with a
paragraph like that---that I'm throwing too much git talk into that
paragraph and that something more realistic with current git would
look like this:
[3] I've just written some very fancy feature for our cool project
which is available in the <branch> branch at <url>. Please try
it out and give me feedback.
I agree that that paragraph is more like what people are actually
doing with git-based projects today. But this paragraph is definitely
not as functional as my dream-world paragraph. What I don't like about
this one is how much knowledge this assumes on the part of the
user. If the user wants to see things in gitweb, they'll have to know
how to construct a URL for that. If they want to start tracking the
branch in an existing clone, they'll have to know the "remote add" and
"checkout --track" commands to do that.
Some people do know all that stuff and keep it current in their
heads. Some people will have done this before but will have to dig in
their mental memory banks or re-check a git reference card before they
can get at the code. And plenty of people will have have never used
git at all so will have to go learn about it. Where to go to learn?
There are enough obstacles there that some of these people won't be
successful and will never end up looking at my code, (which is not
what I want---I want as many people as possible to have an effortless
experience in getting at my code). And there are enough obstacles
there that even those who do make it through can easily get the
impression that "git is hard".
The only way I know to avoid those obstacles is to do like I did in
paragraph [2] and at least give the user all the pointers they need so
that they don't need to look anything up. But there again, there's so
much "git speak" that it still looks hard, and it definitely distracts
from what I'm really wanting to talk about.
This is what I'm referring to in the subject where I say that I'd like
git to be able to disappear into the background when I'm talking about
my code.
Does that description help you understand what I'm looking for when I
propose a new syntax for <url> plus <branch> that could be accepted by
both "clone" and also propose a new "track" command that could accept
the same syntax?
-Carl
[*] I don't know if that command is exactly right---there is a lot to
have to remember to put that command together, (and in a precise
order!), which is another reason I think the current approach is much
harder than it should be.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 13:12 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
@ 2007-04-25 14:09 ` Carl Worth
2007-04-25 14:55 ` Linus Torvalds
2007-04-25 14:51 ` Linus Torvalds
2007-04-25 19:44 ` Daniel Barkalow
2 siblings, 1 reply; 120+ messages in thread
From: Carl Worth @ 2007-04-25 14:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Linus Torvalds, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 1977 bytes --]
On Wed, 25 Apr 2007 06:12:32 -0700, Carl Worth wrote:
> [2] I've just written some very fancy feature for our cool project
> which you can see in gitweb at <gitweburl>. To track this
> branch, do "git remote add cworth <url>; git checkout --track
> -b <branch> cworth/<branch>" if you already have some clone of
> our project. Otherwise do "git clone <url>; git checkout
> --track -b <branch>". Please try it out and give me feedback.
Oops. I just noticed that that last command is wrong. Instead of "git
checkout --track -b <branch>" that should of course be "git checkout
--track -b <branch> origin/<branch>".
And no, I didn't intentionally botch that to be able to make a
point. But now, I will make the point: the current syntax is hard to
remember. It _is_ powerful, and I do personally use it and like it,
(and if I made the mistake above at the command line it would have
been obvious to me how to fix it, and would have been no big deal).
So I'm not suggesting replacing any of the remote stuff---I'd just
like to have something easier to suggest to people who aren't yet
familiar with remotes and remote-tracking branches, (and something
simple enough that I could get it right when writing an email without
git around to complain if I botch the syntax).
So I'd imagine "git track <url>#<branch>" as being implemented
directly with the existing remote stuff, (lookup and use an existing
remote for <url> if it exists, otherwise create a new one and name it
with some mangling of <url>, or complain politely if the mangling
would clash with an existing remote with the same name but a different
URL---which would be extremely unlikely).
Anyway, as usual I seem to find myself with just enough time and
motivation to talk about what I'd like, but not enough to code it up.
So feel free to ignore me if you disagree, and please feel free to be
inspired to code something up if you agree.
And thanks to everyone that has worked to make git so excellent!
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 14:09 ` Carl Worth
@ 2007-04-25 14:55 ` Linus Torvalds
2007-04-25 16:28 ` Carl Worth
0 siblings, 1 reply; 120+ messages in thread
From: Linus Torvalds @ 2007-04-25 14:55 UTC (permalink / raw)
To: Carl Worth; +Cc: Junio C Hamano, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
>
> Oops. I just noticed that that last command is wrong. Instead of "git
> checkout --track -b <branch>" that should of course be "git checkout
> --track -b <branch> origin/<branch>".
No, it really should be
git branch --track newbranch origin/oldbranch
followed by
git checkout newbranch
and then it's not so hard. It's two commands, but it's two _simpler_
commands, that make sense on their own. Don't use the complex version:
it's a "expert mode" command that just knows how to do both.
Alternatively, we *could* make just
git checkout --track branch
be a shorthand for
git checkout --track -b branch origin/branch
when "branch" doesn't exist, but origin/branch does. With the "--track",
it's already unambiguous (you cannot track a detached head, so we know we
want a branch.
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 14:55 ` Linus Torvalds
@ 2007-04-25 16:28 ` Carl Worth
2007-04-25 18:07 ` Nicolas Pitre
0 siblings, 1 reply; 120+ messages in thread
From: Carl Worth @ 2007-04-25 16:28 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Junio C Hamano, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 2352 bytes --]
On Wed, 25 Apr 2007 07:55:49 -0700 (PDT), Linus Torvalds wrote:
> Alternatively, we *could* make just
>
> git checkout --track branch
>
> be a shorthand for
>
> git checkout --track -b branch origin/branch
>
> when "branch" doesn't exist, but origin/branch does. With the "--track",
> it's already unambiguous (you cannot track a detached head, so we know we
> want a branch.
I like that a lot, thanks! Things that make the command-line simpler
with no loss in functionality nor introducing any ambiguity are really
nice.
And I'd even follow that up to propose making "git checkout branch"
(where branch doesn't exist but remote/<something>/branch does), do
something new, (not detached head, nor creating a local tracking
branch), that would allow the following:
1. Using "git checkout branch" to examine the working-tree status of a
branch.
This functionality exists already, but with a fairly obnoxious
detached head warning.
2. Subsequently using "git pull" to track that remote branch
This functionality is currently missing without creating a
local branch first. This is an inconvenience compared to the
pre-separate-remotes git where "git checkout next" followed by
a sequence of "git pull" was enough to track a branch.
Now, old git also had the huge defect that it was too easy to
screw everything up by committing to what should have been
treated as a read-only tracking branch, which is where the
next point comes in.
3. Allow a commit from this state, by *then* creating the explicit
local branch setup to track the remote-tracking branch.
That is, under this proposal the command sequence of:
git checkout branch
# hack
git commit
Would get one to the exact same state as today's sequence of:
git branch --track branch origin/branch
git checkout branch
# hack
git commit
Which to me just looks like making git easier to use.
Of course, git could complain politely if the branch name it
wanted to create were taken already and instruct the user how
to create a new name for the tracking branch before the
commit.
Is that a totally insane idea? (The answer might very well depend on
some details of the implementation---presumably .git/HEAD would have
to store both the name of the remote-tracking branch as well as the
sha1 to which it corresponded at the time of the checkout.)
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 16:28 ` Carl Worth
@ 2007-04-25 18:07 ` Nicolas Pitre
2007-04-25 19:03 ` Carl Worth
0 siblings, 1 reply; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-25 18:07 UTC (permalink / raw)
To: Carl Worth; +Cc: Linus Torvalds, Junio C Hamano, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
> And I'd even follow that up to propose making "git checkout branch"
> (where branch doesn't exist but remote/<something>/branch does), do
> something new, (not detached head, nor creating a local tracking
> branch), that would allow the following:
>
> 1. Using "git checkout branch" to examine the working-tree status of a
> branch.
>
> This functionality exists already, but with a fairly obnoxious
> detached head warning.
With all the safeties (reflogs, etc) this warning could be toned down
even more now.
> 2. Subsequently using "git pull" to track that remote branch
>
> This functionality is currently missing without creating a
> local branch first. This is an inconvenience compared to the
> pre-separate-remotes git where "git checkout next" followed by
> a sequence of "git pull" was enough to track a branch.
>
> Now, old git also had the huge defect that it was too easy to
> screw everything up by committing to what should have been
> treated as a read-only tracking branch, which is where the
> next point comes in.
>
> 3. Allow a commit from this state, by *then* creating the explicit
> local branch setup to track the remote-tracking branch.
>
> That is, under this proposal the command sequence of:
>
> git checkout branch
> # hack
> git commit
>
> Would get one to the exact same state as today's sequence of:
>
> git branch --track branch origin/branch
> git checkout branch
> # hack
> git commit
>
> Which to me just looks like making git easier to use.
I don't feel comfortable with that.
To me it looks like Git would perform some hardcoded magic without
helping the user understanding what is going on. Worse: it can perform
all those operations even if that is not what you wanted.
I much prefer multiple simple commands that perform basic and
understandable operations than a single complex one with more magic in
it. If it was just me I'd eliminate the pull command and a pull would
always be a fetch followed by a merge...
I understand your desire for people to get at your code as quickly and
easy as possible, but that conflicts with our desire for people to
really understand the basics of Git. Creating magic commands with
hardcoded defaults for a one-click-does-all behavior isn't helping
that understanding at all.
If you really want people to get at your code with no Git consideration
what so ever, then just direct them at the corresponding gitweb and/or
git-archive invocations with --remote=<repo> to store a local copy.
> Of course, git could complain politely if the branch name it
> wanted to create were taken already and instruct the user how
> to create a new name for the tracking branch before the
> commit.
>
> Is that a totally insane idea? (The answer might very well depend on
> some details of the implementation---presumably .git/HEAD would have
> to store both the name of the remote-tracking branch as well as the
> sha1 to which it corresponded at the time of the checkout.)
And why again isn't detached head just fine for your usage scenario
instead? Only the "obnoxious" warning?
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 18:07 ` Nicolas Pitre
@ 2007-04-25 19:03 ` Carl Worth
2007-04-25 19:17 ` Making git disappear when talking about my code Junio C Hamano
2007-04-25 20:23 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Nicolas Pitre
0 siblings, 2 replies; 120+ messages in thread
From: Carl Worth @ 2007-04-25 19:03 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Linus Torvalds, Junio C Hamano, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 2484 bytes --]
On Wed, 25 Apr 2007 14:07:23 -0400 (EDT), Nicolas Pitre wrote:
> With all the safeties (reflogs, etc) this warning could be toned down
> even more now.
That would definitely help.
> To me it looks like Git would perform some hardcoded magic without
> helping the user understanding what is going on.
That's a fine argument.
> If you really want people to get at your code with no Git consideration
> what so ever, then just direct them at the corresponding gitweb and/or
> git-archive invocations with --remote=<repo> to store a local copy.
But that's just it. It's not that I want people to get at my code with
no git consideration. I believe that git provides the best way to get
at my code, (since it allows not just getting at a single snapshot
like git-archive would), but it allows for getting at everything in
the past as well, and easily getting at stuff in the future.
It's more that I want a single way to talk about some branch I've just
published, (necessarily both a url and a branch), and I assume an
audience with a wide range of git experience, (from none to lots).
So I'm just looking for a simple way to advertise the branch that will
work for the whole audience, (gitweb and git-archive aren't going to
be much use for the experienced git user---except in an indirect way
where the user could manually extract the useful parts of the
instructions out of the noise).
> And why again isn't detached head just fine for your usage scenario
> instead? Only the "obnoxious" warning?
No ability to easily follow the branch as new stuff comes along.
Compare what one used to be able to do with pre-separate-remotes git:
git clone git://git.kernel.org/pub/scm/git/git.git
git checkout next
git pull # occasionally
to what you have now:
git clone git://git.kernel.org/pub/scm/git/git.git
git checkout origin/next
And what's step 3 to follow this branch? Certainly, doing "git fetch"
occasionally brings in the data, but there's no simple way to use
detached head to just "follow along".
So then the user has to learn new concepts like creating a tracking
branch:
git branch --track next origin/next
git checkout next
git pull # occasionally
You can say that's just a series of simple commands, but it's still
more concepts and commands than other systems, (including past
versions of git).
And for the user that's really just doing read-only branch tracking, I
don't see where there's much benefit coming from the extra concepts
and commands.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:03 ` Carl Worth
@ 2007-04-25 19:17 ` Junio C Hamano
2007-04-25 19:22 ` Nicolas Pitre
2007-04-25 20:26 ` Carl Worth
2007-04-25 20:23 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Nicolas Pitre
1 sibling, 2 replies; 120+ messages in thread
From: Junio C Hamano @ 2007-04-25 19:17 UTC (permalink / raw)
To: Carl Worth; +Cc: Nicolas Pitre, Linus Torvalds, Marcin Kasperski, git
Carl Worth <cworth@cworth.org> writes:
> It's more that I want a single way to talk about some branch I've just
> published, (necessarily both a url and a branch), and I assume an
> audience with a wide range of git experience, (from none to lots).
Why would you want to add another syntax that can talk about
only one branch? It shows that you care only about talking
about single branch, making things harder for other people who
might want to talk about two branches or more.
I would agree with you that if you are talking to total git
newbie, you cannot get away with message like [3] in your
original and you would need some instructions you added in your
example [2]. But I suspect that is true for any new system. If
somebody has never seen cvs and your project is hosted at cvs,
and if you want to be really helpful, I think you have to tell
"cvs -d :pserver:... co cworth-project" somewhere in your
message.
But that does not have to be in the main part of the
announcement, like this (this is your [2]):
I've just written some very fancy feature for our cool project
which you can see in gitweb at <gitweburl>. To track this
branch, do "git remote add cworth <url>; git checkout --track
-b <branch> cworth/<branch>" if you already have some clone of
our project. Otherwise do "git clone <url>; git checkout
--track -b <branch>". Please try it out and give me feedback.
You can say instead:
I've just written some very fancy feature for our cool project
which is available in the <branch> branch at <url>. Please try
it out and give me feedback. [*1*]
[Footnote]
*1* If you have never used git, here are the ways to get at
the cool project ...
<<< instruction here >>>
If you have been tracking the upstream of the cool
project, alternatively you can do this to get to my
fancy feature as a new branch in your repository ...
<<< instruction here >>>
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:17 ` Making git disappear when talking about my code Junio C Hamano
@ 2007-04-25 19:22 ` Nicolas Pitre
2007-04-25 20:26 ` Carl Worth
1 sibling, 0 replies; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-25 19:22 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Carl Worth, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Junio C Hamano wrote:
> I would agree with you that if you are talking to total git
> newbie, you cannot get away with message like [3] in your
> original and you would need some instructions you added in your
> example [2]. But I suspect that is true for any new system. If
> somebody has never seen cvs and your project is hosted at cvs,
> and if you want to be really helpful, I think you have to tell
> "cvs -d :pserver:... co cworth-project" somewhere in your
> message.
You forget about "cvs -d :pserver:... login" that needs to be performed
as well.
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:17 ` Making git disappear when talking about my code Junio C Hamano
2007-04-25 19:22 ` Nicolas Pitre
@ 2007-04-25 20:26 ` Carl Worth
1 sibling, 0 replies; 120+ messages in thread
From: Carl Worth @ 2007-04-25 20:26 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Nicolas Pitre, Linus Torvalds, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]
On Wed, 25 Apr 2007 12:17:30 -0700, Junio C Hamano wrote:
> Carl Worth <cworth@cworth.org> writes:
>
> > It's more that I want a single way to talk about some branch I've just
> > published, (necessarily both a url and a branch), and I assume an
> > audience with a wide range of git experience, (from none to lots).
>
> Why would you want to add another syntax that can talk about
> only one branch?
As mentioned elsewhere in the thread, I'm fine with a space for a
separator instead of a '#'. I really didn't intend to get hung up on
that kind of syntactic issue.
The question is how much work is involved in getting from:
Checkout my new work:
<url> <branch>
to where the user can just start tracking it (read-only). Right now,
in many cases the user has to slice that up and pass the <url> to some
commands and the <branch> to other commands (see below).
> You can say instead:
>
> I've just written some very fancy feature for our cool project
> which is available in the <branch> branch at <url>. Please try
> it out and give me feedback. [*1*]
OK, and I'll fill in the holes in your footnote. I'm perfectly fine
with assuming the user already has a clone of the project, (they can
find well-published instructions for that on the project site), so
then what's left is:
*1* From within your git clone of the project, do the following (if
you haven't made a remote for my repository before):
git remote add cworth <url>
Finally, you can start tracking my branch with the following:
git fetch cworth
git branch --track <branch> cworth/<branch>
git checkout <branch>
And use "git pull" periodically to stay abreast of future work I
do on that branch.
That's workable, but notice that every occurrence of "cworth" in the
above is really getting in the user's way. Once a user knows a bit
more about git and remotes, it can be really useful to take advantage
of them. For example, when I'm interested in inspecting a newly
announced branch like this from someone for whom I have already setup
a remote I often do:
git fetch <someone>
git log ..<someone>/<branch>
And that's really nice and easy, (yes, multiple-branch tracking in a
single repository *is* the one true way).
But I don't think forcing the remote-creation on the user, (as in my
footnote), is actually making things easier.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 19:03 ` Carl Worth
2007-04-25 19:17 ` Making git disappear when talking about my code Junio C Hamano
@ 2007-04-25 20:23 ` Nicolas Pitre
1 sibling, 0 replies; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-25 20:23 UTC (permalink / raw)
To: Carl Worth; +Cc: Linus Torvalds, Junio C Hamano, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
> Compare what one used to be able to do with pre-separate-remotes git:
>
> git clone git://git.kernel.org/pub/scm/git/git.git
> git checkout next
> git pull # occasionally
>
> to what you have now:
>
> git clone git://git.kernel.org/pub/scm/git/git.git
> git checkout origin/next
But if you _create_ a new branch in your repository, Git will pick it up
automatically now with a fetch operation, which the previous branch
layout didn't allow for.
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 13:12 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
2007-04-25 14:09 ` Carl Worth
@ 2007-04-25 14:51 ` Linus Torvalds
2007-04-25 19:44 ` Daniel Barkalow
2 siblings, 0 replies; 120+ messages in thread
From: Linus Torvalds @ 2007-04-25 14:51 UTC (permalink / raw)
To: Carl Worth; +Cc: Junio C Hamano, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
>
> So please allow me to comment on the syntax a bit. Linus, you claimed
> that <url>#<branch> isn't "unixy" enough for your taste. What does
> that mean exactly?
It means *exactly* what it says.
That is a horrible syntax. It's not how we do *any* other commands. It's
web-centric in a way git simply IS NOT.
What's so special about '#' that makes it wonderful for this special case?
NOTHING.
And to make matters worse, it's fundamentally TOO WEAK: The 'url#branch'
syntax would be limited to clones, because a "pull" and "fetch" _needs_
something more powerful. So if we introduce that syntax, we're forever
cursed with having two incompatible and independent syntaxes for this,
because (a) people will then say "why not pull", and (b) it's NOT A GOOD
SYNTAX, so we'd support the old syntax for pull/fetch too.
So don't go there. It's simply a broken idea. Is that so hard to just
admit?
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 13:12 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
2007-04-25 14:09 ` Carl Worth
2007-04-25 14:51 ` Linus Torvalds
@ 2007-04-25 19:44 ` Daniel Barkalow
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
` (2 more replies)
2 siblings, 3 replies; 120+ messages in thread
From: Daniel Barkalow @ 2007-04-25 19:44 UTC (permalink / raw)
To: Carl Worth; +Cc: Junio C Hamano, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
> On Mon, 23 Apr 2007 22:15:04 -0700, Junio C Hamano wrote:
> > Linus Torvalds <torvalds@linux-foundation.org> writes:
> >
> > > I'd personally be ok with a
> > >
> > > git clone --default=<branch> <url>
> ...
> > If Carl is also happy with the syntax, we can conclude this
> > discussion and:
> >
> > (1) have that as an enhancement to git-clone;
>
> I think it's a useful enhancement. It would let me at least document
> something like "tracking this project's stable branch" with a single
> command, which I think is useful. But I don't know that I would be
> totally happy yet. :-)
>
> So please allow me to comment on the syntax a bit. Linus, you claimed
> that <url>#<branch> isn't "unixy" enough for your taste. What does
> that mean exactly? Is it that two logically independent things are
> crammed into a single argument instead of being passed as second
> arguments? Or something else?
Linus has stated a preference on the lkml for being told about branches in
the syntax used for anonymous pulls: URL branchname.
That is, you say:
Please pull from:
git://server/path branch
And he cuts and pastes into the command line:
git pull git://server/path branch
Now, this syntax isn't available for git-clone, because git-clone puts the
optional directory to create after the URL. But, in an ideal world, this
is how it would work; you could see a pull request, and just type "git
some-command <paste>".
> Here's the reason I want both the URL and the branch to appear as a
> single string, (but I don't really care about the precise syntax). I
> really want to be able to say "see my branch at <string>" and have
> that <string> be a complete and self-contained description of the
> branch that can be used in several different ways including:
>
> * Cloning a new repository to track that branch as the default
>
> * Begin tracking that branch as a new branch within an existing
> repository
Here, you probably need to specify what you want the new branch to be,
because it will often be the case that the remote branch will be "master"
in a repository with a long unrecognizable URL, and you need to be able to
switch to and away from the branch in some sane way. On the other hand,
the user will presumably never care too deeply about the remote, aside
from that git remembers stuff appropriately. I say, use the hash of the
URL as the name of the remote, and provide some shorthand for the tracking
branch that would be merged by default into the current head, and you're
set. I.e.:
git track new-name URL [branch]
creates and checks out a new branch "new-name" with the config:
[remote "hash of URL"]
url = URL
fetch = +refs/heads/*:refs/remotes/hash of URL/*
[branch "new-name"]
remote = "hash of URL"
merge = refs/heads/[branch]
When on this branch, you update with "git pull" (which already works,
given this configuration). And there would just need to be a better way of
doing "git log remotes/hash of URL/branch..HEAD", which should probably be
something like "git log MERGE..HEAD", with MERGE being magic for the thing
that tracks the current branch's "merge" setting.
Incidentally, I'm not seeing the case of wanting to track multiple
branches from the same repository as nearly as likely for a novice as
wanting to track multiple branches from different repositories. I think
the likely order of being interested in things is:
1. The project's maintainer's repository, exactly one of maint, master, or
next.
2. Somebody else's repository for some interesting feature, master
3. Somebody else's repository for all interesting features, some branch
4. Repository from 3, additional branches
5. Maintainer's repository, multiple branches.
With the most common case for two tracking branches being master from two
repositories, such that upstream branch names are most often useless for
distinguishing anything.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:44 ` Daniel Barkalow
@ 2007-04-25 19:56 ` Junio C Hamano
2007-04-25 20:29 ` Linus Torvalds
` (2 more replies)
2007-04-25 20:29 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
2007-04-25 20:31 ` Nicolas Pitre
2 siblings, 3 replies; 120+ messages in thread
From: Junio C Hamano @ 2007-04-25 19:56 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Carl Worth, Linus Torvalds, Marcin Kasperski, git
Daniel Barkalow <barkalow@iabervon.org> writes:
> Linus has stated a preference on the lkml for being told about branches in
> the syntax used for anonymous pulls: URL branchname.
>
> That is, you say:
>
> Please pull from:
> git://server/path branch
>
> And he cuts and pastes into the command line:
>
> git pull git://server/path branch
>
> Now, this syntax isn't available for git-clone, because git-clone puts the
> optional directory to create after the URL. But, in an ideal world, this
> is how it would work; you could see a pull request, and just type "git
> some-command <paste>".
I think I already suggested this to Carl once, but if you
forget about 'git clone' in this case (or any other cases), your
example would just work.
$ git init
$ git pull git://server/path branch
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
@ 2007-04-25 20:29 ` Linus Torvalds
2007-04-25 20:32 ` Nicolas Pitre
2007-04-25 21:38 ` Daniel Barkalow
2 siblings, 0 replies; 120+ messages in thread
From: Linus Torvalds @ 2007-04-25 20:29 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Daniel Barkalow, Carl Worth, Marcin Kasperski, git
On Wed, 25 Apr 2007, Junio C Hamano wrote:
>
> I think I already suggested this to Carl once, but if you
> forget about 'git clone' in this case (or any other cases), your
> example would just work.
>
> $ git init
> $ git pull git://server/path branch
The problem with this is that it doesn't set up tracking, so while it
*works*, you are now forever doomed to re-do that
git pull git://server/path branch
to update, and if you then ever give the wrong branch name you'll try to
merge and get really confused as a beginner.
Linus
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
2007-04-25 20:29 ` Linus Torvalds
@ 2007-04-25 20:32 ` Nicolas Pitre
2007-04-25 21:38 ` Daniel Barkalow
2 siblings, 0 replies; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-25 20:32 UTC (permalink / raw)
To: Junio C Hamano
Cc: Daniel Barkalow, Carl Worth, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Junio C Hamano wrote:
> I think I already suggested this to Carl once, but if you
> forget about 'git clone' in this case (or any other cases), your
> example would just work.
>
> $ git init
> $ git pull git://server/path branch
Ah, goodie!
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
2007-04-25 20:29 ` Linus Torvalds
2007-04-25 20:32 ` Nicolas Pitre
@ 2007-04-25 21:38 ` Daniel Barkalow
2 siblings, 0 replies; 120+ messages in thread
From: Daniel Barkalow @ 2007-04-25 21:38 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Carl Worth, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Junio C Hamano wrote:
> Daniel Barkalow <barkalow@iabervon.org> writes:
>
> > Linus has stated a preference on the lkml for being told about branches in
> > the syntax used for anonymous pulls: URL branchname.
> >
> > That is, you say:
> >
> > Please pull from:
> > git://server/path branch
> >
> > And he cuts and pastes into the command line:
> >
> > git pull git://server/path branch
> >
> > Now, this syntax isn't available for git-clone, because git-clone puts the
> > optional directory to create after the URL. But, in an ideal world, this
> > is how it would work; you could see a pull request, and just type "git
> > some-command <paste>".
>
> I think I already suggested this to Carl once, but if you
> forget about 'git clone' in this case (or any other cases), your
> example would just work.
>
> $ git init
> $ git pull git://server/path branch
It works for Linus's usage, where he expects to get all the info again
next time there's more useful stuff. I don't think this configures things
so that:
$ git init
$ git pull git://server/path branch
... wait a couple of weeks and forget the URL ...
$ git pull
works. (Although I haven't actually checked, so I could be totally wrong)
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 19:44 ` Daniel Barkalow
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
@ 2007-04-25 20:29 ` Carl Worth
2007-04-25 22:39 ` Daniel Barkalow
2007-04-25 20:31 ` Nicolas Pitre
2 siblings, 1 reply; 120+ messages in thread
From: Carl Worth @ 2007-04-25 20:29 UTC (permalink / raw)
To: Daniel Barkalow; +Cc: Junio C Hamano, Linus Torvalds, Marcin Kasperski, git
[-- Attachment #1: Type: text/plain, Size: 3609 bytes --]
On Wed, 25 Apr 2007 15:44:11 -0400 (EDT), Daniel Barkalow wrote:
> Linus has stated a preference on the lkml for being told about branches in
> the syntax used for anonymous pulls: URL branchname.
That's a fine syntax too.
> Now, this syntax isn't available for git-clone, because git-clone puts the
> optional directory to create after the URL. But, in an ideal world, this
> is how it would work; you could see a pull request, and just type "git
> some-command <paste>".
Yes. That's exactly what I'm talking about, being able to very easily
just paste the branch specifier to a git command. And yes, it would
be convenient if one could do this for as many commands as
possible. The fact that git-clone can't accept this syntax is
unfortunate, (and maybe that is the only reason I was inclined to add
the '#' character).
> Here, you probably need to specify what you want the new branch to be,
> because it will often be the case that the remote branch will be "master"
> in a repository with a long unrecognizable URL, and you need to be able to
> switch to and away from the branch in some sane way. On the other hand,
> the user will presumably never care too deeply about the remote, aside
> from that git remembers stuff appropriately. I say, use the hash of the
> URL as the name of the remote, and provide some shorthand for the tracking
> branch that would be merged by default into the current head, and you're
> set. I.e.:
>
> git track new-name URL [branch]
OK, that still allows for pasting the URL and branch, but the user has
to know not only "git track" but also that she must invent a local for
the branch and insert that into the command as well. And it's hard for
me to help the user on this point (at least in a cut-and-pasteable
way), since the whole point of that argument is to create an entry in
a private namespace that I don't know anything about.
How about making that optional at least? That is create a local branch
named <branch> for:
git track URL <branch>
but also allow something like:
git track --as <newbranch> URL <branch>
> creates and checks out a new branch "new-name" with the config:
>
> [remote "hash of URL"]
> url = URL
> fetch = +refs/heads/*:refs/remotes/hash of URL/*
> [branch "new-name"]
> remote = "hash of URL"
> merge = refs/heads/[branch]
Yes, this is the kind of stuff I'd like to see. Just create a remote
on behalf of the user with whatever unique name you want, (or use an
existing remote if one already exists for the given URL).
> Incidentally, I'm not seeing the case of wanting to track multiple
> branches from the same repository as nearly as likely for a novice as
> wanting to track multiple branches from different repositories.
Yes, I would agree with that.
> With the most common case for two tracking branches being master from two
> repositories, such that upstream branch names are most often useless for
> distinguishing anything.
Ah, that's an interesting point.
It's interesting because it's obviously the case for some projects,
but it's also not the case for some, (like the cairo project that I
care about). Maybe we're still overly accustomed to our "central"
mentality, but we don't really have a lot of interesting "master"
branches in our personal repositories. Instead, the central repository
has "master" and one branch for each stable maintenance series, then
each developer's personal repository has a collection of topic
branches for stuff that is cooking.
I guess we just don't have sub-maintainers maintaining entire
collections of patches with git like you get with the kernel for
example.
-Carl
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 20:29 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
@ 2007-04-25 22:39 ` Daniel Barkalow
0 siblings, 0 replies; 120+ messages in thread
From: Daniel Barkalow @ 2007-04-25 22:39 UTC (permalink / raw)
To: Carl Worth; +Cc: Junio C Hamano, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Carl Worth wrote:
> On Wed, 25 Apr 2007 15:44:11 -0400 (EDT), Daniel Barkalow wrote:
>
> > Here, you probably need to specify what you want the new branch to be,
> > because it will often be the case that the remote branch will be "master"
> > in a repository with a long unrecognizable URL, and you need to be able to
> > switch to and away from the branch in some sane way. On the other hand,
> > the user will presumably never care too deeply about the remote, aside
> > from that git remembers stuff appropriately. I say, use the hash of the
> > URL as the name of the remote, and provide some shorthand for the tracking
> > branch that would be merged by default into the current head, and you're
> > set. I.e.:
> >
> > git track new-name URL [branch]
>
> OK, that still allows for pasting the URL and branch, but the user has
> to know not only "git track" but also that she must invent a local for
> the branch and insert that into the command as well. And it's hard for
> me to help the user on this point (at least in a cut-and-pasteable
> way), since the whole point of that argument is to create an entry in
> a private namespace that I don't know anything about.
Well, it's not only a private namespace, it's a namespace of stuff that
should be meaningful to the user. Sure, there's a certain extent to which
what's meaningful to the publisher is likely to be meaningful to the user,
but I've used "subproject" to refer to a "submodule2" remote branch,
because that's what I was naming the feature in my head, and I wouldn't
have found the 2 intuitive in general (it was the second attempt at an
implementation). It's fundamentally a local alias for a global name.
On the other hand, it might be good if the publisher could give
instructions with an option that prompts the user with a sensible default,
given the arguments and the state of the repository.
> > With the most common case for two tracking branches being master from two
> > repositories, such that upstream branch names are most often useless for
> > distinguishing anything.
>
> Ah, that's an interesting point.
>
> It's interesting because it's obviously the case for some projects,
> but it's also not the case for some, (like the cairo project that I
> care about). Maybe we're still overly accustomed to our "central"
> mentality, but we don't really have a lot of interesting "master"
> branches in our personal repositories. Instead, the central repository
> has "master" and one branch for each stable maintenance series, then
> each developer's personal repository has a collection of topic
> branches for stuff that is cooking.
I think there's likely to be a reasonably large variation in what
repositories exist and what branches they have. People could easily have a
repository per topic, with a branch per stable series (with experimental
work being potentially queued for a relatively far future series). There
could be shared repositories for features that multiple people work on,
with per-person branches. People do all sorts of things, and even within a
project, they don't all have to be the same, so long as the "URL branch"
format works for everybody who has to get a branch. But that also means
that it's hard to find a reliable meaningful sub-part of that format.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument)
2007-04-25 19:44 ` Daniel Barkalow
2007-04-25 19:56 ` Making git disappear when talking about my code Junio C Hamano
2007-04-25 20:29 ` Making git disappear when talking about my code (was: Re: GIT vs Other: Need argument) Carl Worth
@ 2007-04-25 20:31 ` Nicolas Pitre
2 siblings, 0 replies; 120+ messages in thread
From: Nicolas Pitre @ 2007-04-25 20:31 UTC (permalink / raw)
To: Daniel Barkalow
Cc: Carl Worth, Junio C Hamano, Linus Torvalds, Marcin Kasperski, git
On Wed, 25 Apr 2007, Daniel Barkalow wrote:
> Linus has stated a preference on the lkml for being told about branches in
> the syntax used for anonymous pulls: URL branchname.
>
> That is, you say:
>
> Please pull from:
> git://server/path branch
>
> And he cuts and pastes into the command line:
>
> git pull git://server/path branch
>
> Now, this syntax isn't available for git-clone, because git-clone puts the
> optional directory to create after the URL. But, in an ideal world, this
> is how it would work; you could see a pull request, and just type "git
> some-command <paste>".
Maybe git-pull could be made usable just as well from an empty
repository (isn't it already?) as a substitute for clone.
Nicolas
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-23 18:54 ` Carl Worth
2007-04-23 19:52 ` Josef Weidendorfer
2007-04-23 22:23 ` Junio C Hamano
@ 2007-04-23 23:22 ` Junio C Hamano
2 siblings, 0 replies; 120+ messages in thread
From: Junio C Hamano @ 2007-04-23 23:22 UTC (permalink / raw)
To: Carl Worth; +Cc: Linus Torvalds, Marcin Kasperski, git
Carl Worth <cworth@cworth.org> writes:
> So, currently, all non-default branches have a sort of second-class
> status from the point of view of users that just want to track
> them.
For some time when people compared hg and git they said git
supports multiple branches in repository more naturally. And
using more than one branch in a single repository, especially in
one with a working tree, is more convenient for certain things,
such as comparing the branches (both "diff A B" and "log A..B").
But that does not necessarily mean we are forced to use as small
number of repositories as possible and use branches to represent
related work.
If for example all the kernel related repositories in kernel.org
were actually represented as a single repository with hundreds
of branches, with default set to Linus's 'master', people who
would want to track subsystem maintainers' trees would feel less
convenient as they always have to first clone (perhaps with -n
because they are not interested in a checkout of Linus's tree)
and then 'checkout -b' for the subsystem branch of their choice.
But that is not how the kernel group organize the repositories
for their project. Each subsystem maintainer have his own tree
or trees, and a repository can be about a topic or various
degree of doneness. So at that level, all repositories are
equal and it is just a matter of picking the right URL to clone
from.
Instead of trying to make each branch the target of 'clone'
intended for one class of audience as your message implies, you
could publish one repository (you might arrange them to share
the objects via alternates to reduce storage requirements, but
that is an implementation detail and invisible to your users)
per an intended class of your audience. Your work, inside one
repository done on multiple branches, could be pushed into more
than one repositories, each of which has "the default" (and
possibly "only") branch set to point at the theme of your branch
in your local repository.
I think something like this might even work out of the box. On
the public box you publish your branch A and B on, have three
repositories (i.e. number of branches plus one) like this:
cw-master.git/
cw-A.git/
cw-B.git/
Everything under cw-$X.git (for X in A B) are symlinks to the
corresponding place in cw-master.git/, except HEAD. Make
cw-A.git/HEAD points at refs/heads/A while cw-B.git/HEAD points
at refs/heads/B.
And the maintainer (you) would push into cw-master.git/ and tell
people about cw-$X.git repositories but not necessarily about
cw-master.git/ repository.
Do not complain that the above is cumbersome to set up, not just
yet. That is not my point. The point is that you are trying to
solve this from the consumer side, but I am wondering if this is
actually a problem on the publisher side. And _if_ the problem
is on the publishing side, git-clone on the client side to track
different branch is not the way to solve that problem. Rather,
git-clone (or maybe a new program git-publish-repository) to
make it easier to set up the publishing side might be what we
need.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 16:43 ` Linus Torvalds
2007-04-19 17:49 ` Marcin Kasperski
@ 2007-04-19 20:49 ` Johannes Schindelin
2007-04-20 15:54 ` History cleanup/rewriting script for git Jan Harkes
2 siblings, 0 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 20:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Marcin Kasperski, git
Hi,
On Thu, 19 Apr 2007, Linus Torvalds wrote:
> On Thu, 19 Apr 2007, Johannes Schindelin wrote:
>
> You can't *not* mention branches, simply because even people who only
> track other peoples work do end up often needing to know about it, or at
> least hearing about them..
Well, there is the classical case of an upstream which never merges from
you, John R. Developer. You have two branches, upstream and local. But Jim
R. Developer did not work with Git before, just CVS. To Jim, these are not
two branches. Still, Git operations are easy, and Jim does not have to
understand branches to track upstream (keeping local changes).
That is a very valid use scenario, at least from my point of view, since I
use it quite often.
As an example, for me, "next" is upstream, and I keep some changes local,
either because Junio refused to merge them, or because they are useful to
nobody except me.
Of course, these _are_ two branches, but I don't have to realize that when
working with Git in that manner.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* History cleanup/rewriting script for git
2007-04-19 16:43 ` Linus Torvalds
2007-04-19 17:49 ` Marcin Kasperski
2007-04-19 20:49 ` Johannes Schindelin
@ 2007-04-20 15:54 ` Jan Harkes
2007-04-20 18:39 ` Johannes Schindelin
2 siblings, 1 reply; 120+ messages in thread
From: Jan Harkes @ 2007-04-20 15:54 UTC (permalink / raw)
To: Linus Torvalds, Junio C Hamano; +Cc: git
On Thu, Apr 19, 2007 at 09:43:50AM -0700, Linus Torvalds wrote:
> On Thu, 19 Apr 2007, Johannes Schindelin wrote:
> > Hmm. However, I have to say that cogito serves/d another purpose quite
> > well: Look at what came from cogito into git. Loads of useful
> > enhancements. So, I really have to point to "at this stage", because that
> > sure was not true 18 months ago.
>
> Absolutely. I think there are still some pieces of cogito that we might
> want to migrate into git too, although they're fairly esoteric (ie the
> whole history rewriting thing). And I think we still have some places
I actually have a fairly simple history rewriting script (written in python)
that I used when I converted some CVS archives to git. It is really intended
for such an initial import and history cleanup case so it doesn't deal with
reflogs and such.
Basic workflow I used is,
- Import CVS archive into a git repository
- Use gitk + the grafts file to clean up history as much as feasible
- Run git-rewrite-history.py which will
- write out new commit objects with the corrected set of parents
- copy existing refs to .git/newrefs, pointing them at the new commits.
- start gitk --all to see the tree before the rewrite.
- mv .git/refs .git/oldrefs ; mv .git/newrefs .git/refs
- start a second gitk --all to see the tree after the rewrite.
- compare gitk output to check if everything matches up.
- run git repack/prune/gc to get rid of the old commits, or clone the repo.
Jan
--8<-----------------------------------------------------------------------
#!/usr/bin/python
import os, sys
def git_write_object(type, blob):
stdin, stdout = os.popen2("git-hash-object -t %s -w --stdin" % type)
stdin.write(blob)
stdin.close()
return stdout.readline().strip()
def git_commits(branch):
f = os.popen('git-rev-list --parents --header --topo-order %s' % branch)
buf = ''
while 1:
buf = buf + f.read(4096)
if not buf: break
if not '\0' in buf: continue
commit, buf = buf.split('\0', 1)
yield Commit(commit)
def git_update_ref(name, hash):
os.system('git-update-ref "%s" "%s"' % (name, hash))
grafts = []
pending = []
rewriteable = []
remap = {}
todo = 0
class Commit:
def __init__(self, commit):
global grafts
lines = commit.split('\n')
parts = lines.pop(0).split()
self.hash, self.parents = parts[0], parts[1:]
self.tree = lines.pop(0)
parents = []
while lines[0][:7] == 'parent ':
parents = parents + lines.pop(0).split()[1:]
if parents != self.parents:
grafts.append(self.hash)
commit = []
while 1:
line = lines.pop(0)
commit.append(line)
if not line: break
for line in lines:
commit.append(line[4:])
self.commit = '\n'.join(commit)
self.wait = 0
self.children = []
def mark(self):
global todo, pending
self.wait = self.wait + 1
if self.wait == 1:
todo = todo + 1
for child in self.children:
pending.append(child.hash)
def pick(self):
global rewriteable
self.wait = self.wait - 1
if not self.wait:
rewriteable.append(self)
def fixup(self, old_hash, new_hash):
i = self.parents.index(old_hash)
self.parents[i] = new_hash
self.pick()
def rehash(self):
global todo, remap
todo = todo - 1
blob = self.tree + '\n'
for parent in self.parents:
blob = blob + 'parent %s\n' % parent
blob = blob + self.commit
new_hash = git_write_object('commit', blob)
remap[self.hash] = new_hash
for child in self.children:
child.fixup(self.hash, new_hash)
print "Reading commits... ",
commits = {}
for commit in git_commits('--all'):
commits[commit.hash] = commit
print "read %d commits, found %d grafts" % (len(commits), len(grafts))
print "Setting up reverse linkage"
for commit in commits.values():
for parent in commit.parents:
commits[parent].children.append(commit)
print "Propagating graft information... ",
# first mark all commits that will have to be rewritten.
for commit in grafts:
commits[commit].mark()
for commit in pending:
commits[commit].mark()
# pick those commits that do not depend on any earlier rewrites
for commit in grafts:
commits[commit].pick()
print "%d commits need to be rewritten" % todo
print "Rewriting commits... "
while rewriteable:
print "\rrewriting %5d/%5d commits" % (len(rewriteable), todo),
rewriteable.pop().rehash()
print "done..."
print "Rewriting refs..."
for ref in os.popen('git-for-each-ref'):
hash, type, name = ref.split()
if type != 'commit': continue
if remap.has_key(hash):
hash = remap[hash]
# write updated refs to .git/newrefs
git_update_ref('new' + name, hash)
print "done..."
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: History cleanup/rewriting script for git
2007-04-20 15:54 ` History cleanup/rewriting script for git Jan Harkes
@ 2007-04-20 18:39 ` Johannes Schindelin
2007-04-20 18:44 ` Petr Baudis
2007-04-20 20:36 ` Jan Harkes
0 siblings, 2 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-20 18:39 UTC (permalink / raw)
To: Jan Harkes; +Cc: Linus Torvalds, Junio C Hamano, git
Hi,
On Fri, 20 Apr 2007, Jan Harkes wrote:
> On Thu, Apr 19, 2007 at 09:43:50AM -0700, Linus Torvalds wrote:
> > On Thu, 19 Apr 2007, Johannes Schindelin wrote:
> >
> > > Hmm. However, I have to say that cogito serves/d another purpose
> > > quite well: Look at what came from cogito into git. Loads of useful
> > > enhancements. So, I really have to point to "at this stage", because
> > > that sure was not true 18 months ago.
> >
> > Absolutely. I think there are still some pieces of cogito that we
> > might want to migrate into git too, although they're fairly esoteric
> > (ie the whole history rewriting thing). And I think we still have some
> > places
>
> I actually have a fairly simple history rewriting script (written in
> python) that I used when I converted some CVS archives to git.
Telling by your description, cg-admin-rewrite-hist is more capable. And I
think it should not be too complicated to rewrite the cogito specific
parts, what with the parts we added to Git with cogito as a model. And it
is in Perl... which makes it more portable than Python in my part of the
world.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: History cleanup/rewriting script for git
2007-04-20 18:39 ` Johannes Schindelin
@ 2007-04-20 18:44 ` Petr Baudis
2007-04-20 20:36 ` Jan Harkes
1 sibling, 0 replies; 120+ messages in thread
From: Petr Baudis @ 2007-04-20 18:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jan Harkes, Linus Torvalds, Junio C Hamano, git
On Fri, Apr 20, 2007 at 08:39:25PM CEST, Johannes Schindelin wrote:
> Telling by your description, cg-admin-rewrite-hist is more capable. And I
> think it should not be too complicated to rewrite the cogito specific
> parts, what with the parts we added to Git with cogito as a model. And it
> is in Perl... which makes it more portable than Python in my part of the
> world.
It is in shell, actually. (Well, bash, but I think [[ is the only
bashism in that one.) And it was specifically written to be as
independent of Cogito as possible, I think it uses only Cogito's cool
commandline parsing routines. ;-)
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: History cleanup/rewriting script for git
2007-04-20 18:39 ` Johannes Schindelin
2007-04-20 18:44 ` Petr Baudis
@ 2007-04-20 20:36 ` Jan Harkes
1 sibling, 0 replies; 120+ messages in thread
From: Jan Harkes @ 2007-04-20 20:36 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
On Fri, Apr 20, 2007 at 08:39:25PM +0200, Johannes Schindelin wrote:
> On Fri, 20 Apr 2007, Jan Harkes wrote:
> > On Thu, Apr 19, 2007 at 09:43:50AM -0700, Linus Torvalds wrote:
> > > On Thu, 19 Apr 2007, Johannes Schindelin wrote:
> > >
> > > > Hmm. However, I have to say that cogito serves/d another purpose
> > > > quite well: Look at what came from cogito into git. Loads of useful
> > > > enhancements. So, I really have to point to "at this stage", because
> > > > that sure was not true 18 months ago.
> > >
> > > Absolutely. I think there are still some pieces of cogito that we
> > > might want to migrate into git too, although they're fairly esoteric
> > > (ie the whole history rewriting thing). And I think we still have some
> > > places
> >
> > I actually have a fairly simple history rewriting script (written in
> > python) that I used when I converted some CVS archives to git.
>
> Telling by your description, cg-admin-rewrite-hist is more capable. And I
> think it should not be too complicated to rewrite the cogito specific
> parts, what with the parts we added to Git with cogito as a model. And it
> is in Perl... which makes it more portable than Python in my part of the
> world.
As I wrote this a while ago, before reflogs and packed refs, and I only
needed it for the initial conversion, it only had to write out new
commit objects and retarget branch heads and simple tags. If
cg-admin-rewrite-hist can do better and can be merged into git-core I
would say that is a win-win situation for everyone.
Something like this should be available to allow people to reconstruct
their merge history or fix up empty 'file was added on branch foo'
commits that are left around after the initial import from another VCS.
Personally, I don't think it should ever be used for any published
repositories or branches. Most fixups before publishing can already be
done by rebasing or amending a commit, so this would only be useful for
that intial import where there are in fact a lot of scattered changes
all over the place, or to reconstruct a merge that went bad. But really
in that case, it is probably better to redo the merge correctly and
rebase any commits that might have gone in after the bad merge.
Jan
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-18 16:07 ` Linus Torvalds
` (3 preceding siblings ...)
2007-04-19 9:24 ` Johannes Schindelin
@ 2007-04-19 12:15 ` Marcin Kasperski
2007-04-19 12:33 ` Johannes Schindelin
2007-04-19 12:46 ` [ANNOUNCE] Cogito is for sale Petr Baudis
5 siblings, 1 reply; 120+ messages in thread
From: Marcin Kasperski @ 2007-04-19 12:15 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, Marcin Kasperski, git
> Actually, at this stage, I really think cogito just *complicates* git
> usage.
Agreed.
> So I don't think it's even true that new people should be pointed at cg
> any more.
Google points to git.or.cz ;-)
> But compare setting up a git repository with setting up a CVS repository.
> With git, it's literally "git init", and you're done. No need to worry
> about CVSROOT issues etc. Everything is self-contained. CVS is *hard* to
> get into, by comparison.
I am in no way advocating CVS, but to be fair in such comparison, one
should mention also effort of *publishing* git repository and making it
available to remote clients. Initialized and configured CVS (or
subversion, or perforce, or ...) repo is something ready to be used by
remote clients.
Getting correct ssh keys in correct places is - for instance -
noticeable problem for many people. Especially if they use clients
(like plink) which natively use alternative key save format. Etc...
> So people coming from CVS/SVN have a double shock: they are supposed to
> learn things that they "know" are hard (because CVS/SVN made them so damn
> hard - don't tell me that SVN branching is easy, because it is *not* easy.
The way SVN implemented branching (and tagging!) simply killed the idea
of using this tool seriously. IMO. Let's leave it.
I agree that git introduces plenty of excellent concepts. What it needs
is better docs (also, clearly known **SINGLE** master doc, just sth like
subversion book), cleaned command line interface (I feel that there are
just too many lowlevel commands visible for beginning user, maybe at
least one could split them into git-* for mere mortals and gitadm-* for
repository hackers), portability, and finally GUI.
Best regards
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:15 ` GIT vs Other: Need argument Marcin Kasperski
@ 2007-04-19 12:33 ` Johannes Schindelin
2007-04-19 12:42 ` Marcin Kasperski
2007-04-19 12:45 ` Theodore Tso
0 siblings, 2 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 12:33 UTC (permalink / raw)
To: Marcin Kasperski; +Cc: Linus Torvalds, Marcin Kasperski, git
Hi,
On Thu, 19 Apr 2007, Marcin Kasperski wrote:
[BTW: who said the following? You skipped that information.]
> > So I don't think it's even true that new people should be pointed at cg
> > any more.
>
> Google points to git.or.cz ;-)
How does Google point to something? You mean the last time you ran the
search, the top find _for you_ was git.or.cz?
> > But compare setting up a git repository with setting up a CVS
> > repository. With git, it's literally "git init", and you're done. No
> > need to worry about CVSROOT issues etc. Everything is self-contained.
> > CVS is *hard* to get into, by comparison.
>
> I am in no way advocating CVS, but to be fair in such comparison, one
> should mention also effort of *publishing* git repository and making it
> available to remote clients. Initialized and configured CVS (or
> subversion, or perforce, or ...) repo is something ready to be used by
> remote clients.
No. Not at all. It took me _one day_ to publish my first CVS repository.
It took me exactly 10 seconds to do that with Git.
If you are referring to readily-usable CVS services like sourceforge's,
you are comparing apples with sentences.
> Getting correct ssh keys in correct places is - for instance -
> noticeable problem for many people. Especially if they use clients
> (like plink) which natively use alternative key save format. Etc...
I fail to see how you need ssh keys in order to publish a Git repository.
> I agree that git introduces plenty of excellent concepts. What it needs
> is better docs (also, clearly known **SINGLE** master doc, just sth like
> subversion book),
Does that mean you are volunteering?
> cleaned command line interface (I feel that there are
> just too many lowlevel commands visible for beginning user, maybe at
> least one could split them into git-* for mere mortals and gitadm-* for
> repository hackers),
Does that mean we can expect patches from you?
> portability,
Which platform are you having in mind?
> and finally GUI.
Does that mean you will provide patches? A good starting point is git-gui,
IMHO.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:33 ` Johannes Schindelin
@ 2007-04-19 12:42 ` Marcin Kasperski
2007-04-19 13:36 ` Johannes Schindelin
2007-04-19 14:27 ` J. Bruce Fields
2007-04-19 12:45 ` Theodore Tso
1 sibling, 2 replies; 120+ messages in thread
From: Marcin Kasperski @ 2007-04-19 12:42 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Linus Torvalds, Marcin Kasperski, git
> > Google points to git.or.cz ;-)
>
> How does Google point to something? You mean the last time you ran the
> search, the top find _for you_ was git.or.cz?
Exactly. Searches for git documentation, git tutorial, git version
control pointed there.
> > I agree that git introduces plenty of excellent concepts. What it needs
> > is better docs (also, clearly known **SINGLE** master doc, just sth like
> > subversion book),
>
> Does that mean you are volunteering?
No, as I do not have necessary knowledge. But I can volunteer to review
one.
> > cleaned command line interface (I feel that there are
> > just too many lowlevel commands visible for beginning user, maybe at
> > least one could split them into git-* for mere mortals and gitadm-* for
> > repository hackers),
>
> Does that mean we can expect patches from you?
Not sure what is your point Johannes, but if you wanted to say that if
somebody is not actively developing git, he should not make any comments
regarding this, you could try doing this in a more straightforward
manner.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:42 ` Marcin Kasperski
@ 2007-04-19 13:36 ` Johannes Schindelin
2007-04-19 14:27 ` J. Bruce Fields
1 sibling, 0 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 13:36 UTC (permalink / raw)
To: Marcin Kasperski; +Cc: Linus Torvalds, Marcin Kasperski, git
Hi,
On Thu, 19 Apr 2007, Marcin Kasperski wrote:
> > > cleaned command line interface (I feel that there are just too many
> > > lowlevel commands visible for beginning user, maybe at least one
> > > could split them into git-* for mere mortals and gitadm-* for
> > > repository hackers),
> >
> > Does that mean we can expect patches from you?
>
> Not sure what is your point Johannes, but if you wanted to say that if
> somebody is not actively developing git, he should not make any comments
> regarding this, you could try doing this in a more straightforward
> manner.
No. I said that tongue-in-cheek.
But my point was: Since the current developers evidently are comfortable
with the current set of command line options, and the consistency thereof,
it needs more than some hand waving comments about what you want changed,
and how.
To state it clearly: if you have any concrete wishes as to the
clarification of Git, and to make it easier for beginners (at the same
time not making it harder on others), I will be very glad to know them.
And I think that the list will welcome these equally eagerly.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:42 ` Marcin Kasperski
2007-04-19 13:36 ` Johannes Schindelin
@ 2007-04-19 14:27 ` J. Bruce Fields
1 sibling, 0 replies; 120+ messages in thread
From: J. Bruce Fields @ 2007-04-19 14:27 UTC (permalink / raw)
To: Marcin Kasperski
Cc: Johannes Schindelin, Linus Torvalds, Marcin Kasperski, git
On Thu, Apr 19, 2007 at 02:42:39PM +0200, Marcin Kasperski wrote:
> > > I agree that git introduces plenty of excellent concepts. What it needs
> > > is better docs (also, clearly known **SINGLE** master doc, just sth like
> > > subversion book),
> >
> > Does that mean you are volunteering?
>
> No, as I do not have necessary knowledge. But I can volunteer to review
> one.
That would be great--see Documentation/user-manual.txt. (Or
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html.)
Patches welcomed, but so is general review. It's not my highest
priority, unfortunately, so I may be a little slow to address comments,
but I'll get to them eventually.
I don't expect it to ever be a *single* master doc--I still want to
leave a lot of the details to the man pages, for example, and I expect
there'll always be a need for some shortcut howto's and tutorials. I
suppose we could include much of that into appendices some day if it
helped findability.
--b.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: GIT vs Other: Need argument
2007-04-19 12:33 ` Johannes Schindelin
2007-04-19 12:42 ` Marcin Kasperski
@ 2007-04-19 12:45 ` Theodore Tso
1 sibling, 0 replies; 120+ messages in thread
From: Theodore Tso @ 2007-04-19 12:45 UTC (permalink / raw)
To: Johannes Schindelin
Cc: Marcin Kasperski, Linus Torvalds, Marcin Kasperski, git
On Thu, Apr 19, 2007 at 02:33:31PM +0200, Johannes Schindelin wrote:
> > > So I don't think it's even true that new people should be pointed at cg
> > > any more.
> >
> > Google points to git.or.cz ;-)
>
> How does Google point to something? You mean the last time you ran the
> search, the top find _for you_ was git.or.cz?
I just checked today. If you go to http://www.google.com, and enter
"git", and then click on "I'm feeling lucky", you will go to
http://git.or.cz. One of the first links you will then see,
misleading titled in a box labelled, "Git crash courses", are "Git for
CVS users", and "Git for SVN users", and both of these getting started
documents reference cg commands and only cg commands.
So when projects downgrade git as having confusing documentation, and
tutorials that contradict each other about how to do things, this is
very likely one of the reasons why.
- Ted
^ permalink raw reply [flat|nested] 120+ messages in thread
* [ANNOUNCE] Cogito is for sale
2007-04-18 16:07 ` Linus Torvalds
` (4 preceding siblings ...)
2007-04-19 12:15 ` GIT vs Other: Need argument Marcin Kasperski
@ 2007-04-19 12:46 ` Petr Baudis
2007-04-19 13:32 ` Matthieu Moy
2007-04-19 20:23 ` Junio C Hamano
5 siblings, 2 replies; 120+ messages in thread
From: Petr Baudis @ 2007-04-19 12:46 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Johannes Schindelin, git
On Wed, Apr 18, 2007 at 06:07:55PM CEST, Linus Torvalds wrote:
> Actually, at this stage, I really think cogito just *complicates* git
> usage. It hasn't been well-supported lately, and asking for help with
> cogito means that a lot of people can't help you. And you still end up
> using git commands for anything fancier.
And at this stage, I actually rather agree.
I've been torn apart about this for few weeks now, struggling to get
some time (and strong motivation) to dive through the dusty cogito
patchqueues etc., and wondering what to actually *do* about Cogito.
I have been actually inclined to, hmm, "phase out" Cogito for some time
already, but then always some very nice mail from a Cogito user comes
and throws me in doubts. But this thread pushed me over the edge. ;-)
I agree that by now, the situation is too confusing and while I'm not
happy with everything in Git, I believe that by now the best way is to
just fix Git. Therefore, I'm announcing that I don't plan to add any (at
least any significant) new features to Cogito. Sorry to all the Cogito
users, it is a hard decision for me, but by now I believe that it is
much more effective to just focus on Git.
If anyone else wants to take over Cogito maintainership, you're most
welcome: let me know, please! The "patch queue" means just filtering
=git mailbox, but I have some WIP code to add the .git/config "remotes"
support to Cogito, if you are interested.
Until someone else steps out to maintain Cogito, I'm not going to
abandon Cogito absolutely. I still plan to dive through the patch queue
as soon as possible and then continue integrating bugfixes and/or
smaller-scale changes necessary for newer Git versions. I'll maybe also
write a trivial more-or-less 1:1 cg->git porcelain wrapper for those
who trained their fingers to 'cg' instead of 'git'; but maybe it's best
just to retrain. ;-)
About git homepage:
The very least I wanted to do at any rate with git.or.cz ASAP is to
switch the crash courses to git-oriented ones too. I think git more or
less got to a reasonable point when this is a sane idea. Do you have any
tips on exactly what zero-level introductory material I should put there
instead of the Cogito crash courses, or should we write new ones
(perhaps based on the current ones)? I probably won't have much time to
write a lot of stuff, but I'll gladly use whatever reasonable anyone
suggests/writes, and I have no qualms to just give well-known people
push access to the homepage repository.
Live and prosper,
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Ever try. Ever fail. No matter. // Try again. Fail again. Fail better.
-- Samuel Beckett
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: [ANNOUNCE] Cogito is for sale
2007-04-19 12:46 ` [ANNOUNCE] Cogito is for sale Petr Baudis
@ 2007-04-19 13:32 ` Matthieu Moy
2007-04-19 20:23 ` Junio C Hamano
1 sibling, 0 replies; 120+ messages in thread
From: Matthieu Moy @ 2007-04-19 13:32 UTC (permalink / raw)
To: git
Petr Baudis <pasky@suse.cz> writes:
> Therefore, I'm announcing that I don't plan to add any (at least any
> significant) new features to Cogito.
I believe this is the right decision, but anyway, thanks for your work
on cogito!
--
Matthieu
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: [ANNOUNCE] Cogito is for sale
2007-04-19 12:46 ` [ANNOUNCE] Cogito is for sale Petr Baudis
2007-04-19 13:32 ` Matthieu Moy
@ 2007-04-19 20:23 ` Junio C Hamano
2007-04-19 20:42 ` Johannes Schindelin
1 sibling, 1 reply; 120+ messages in thread
From: Junio C Hamano @ 2007-04-19 20:23 UTC (permalink / raw)
To: Petr Baudis; +Cc: Linus Torvalds, Johannes Schindelin, git
Petr Baudis <pasky@suse.cz> writes:
> I agree that by now, the situation is too confusing and while I'm not
> happy with everything in Git, I believe that by now the best way is to
> just fix Git. Therefore, I'm announcing that I don't plan to add any (at
> least any significant) new features to Cogito. Sorry to all the Cogito
> users, it is a hard decision for me, but by now I believe that it is
> much more effective to just focus on Git.
I applaud this; I know this must have been a hard decision for
you to make.
> About git homepage:
>
> The very least I wanted to do at any rate with git.or.cz ASAP is to
> switch the crash courses to git-oriented ones too. I think git more or
> less got to a reasonable point when this is a sane idea.
I would agree, at this point.
When git.or.cz started offering those introductory pages, the
Porcelain-ish scripts (that is correct, "scripts", as there were
no "built-in" -- even "git diff" unified driver was a shell
script to driver diff-index, diff-files and diff-tree) shipped
with the core git was infinitely less pleasant to normal people,
especially the ones who have not seen the early days of git core
which shipped with almost none. When you and I talked about
what text to put on git.or.cz, it was an obvious and easy thing
to agree on that newbie documentation should be based on Cogito,
and you did all the work to put the site together.
I am saying this now for new people on the list, as I heard
an incorrect "theory" that you have been advertising Cogito
on git.or.cz site against the community's best interest,
even when nobody seems to talk about it these days on the
list anymore.
Since the early days of my involvement in git project, I said my
goal was to keep the plumbing stable, enhance the plumbing in
such a way that any and all Porcelains can do what they want
without resorting to Porcelain-specific hacks, so that the
resulting repositories can interoperate no matter what Porcelain
was used on top of the plumbing. I worded that goal as "make
the choice of Porcelains irrelevant". While that ideal still
stands, we ended up having rich enough Porcelain in the core
distribution. To some people, this might look as if we are
making alternative Porcelains irrelevant instead, but that is
not the case. Many features and workflows that are now
supported by the core Porcelain were first invented outside
(e.g. "automated tag following while fetching" came from
Cogito), and the core Porcelain does not ship with special
purpose features and expect alternative/augmentative Porcelains
to fill the niche (an existing example is that people who want
patch management use StGIT or guilt). I am reasonably sure that
there still are features and workflows that Cogito supports
better, and given time and motivated users and contributors,
hopefully they will be ported to the core Porcelain.
I would thank you for your effort to ease adoption of git family
of tools to new people with Cogito; I would ask the list to do
the same.
And I look forward to see your continued involvement to make git
better.
^ permalink raw reply [flat|nested] 120+ messages in thread
* Re: [ANNOUNCE] Cogito is for sale
2007-04-19 20:23 ` Junio C Hamano
@ 2007-04-19 20:42 ` Johannes Schindelin
0 siblings, 0 replies; 120+ messages in thread
From: Johannes Schindelin @ 2007-04-19 20:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Petr Baudis, Linus Torvalds, git
On Thu, 19 Apr 2007, Junio C Hamano wrote:
> I would thank you for your effort to ease adoption of git family of
> tools to new people with Cogito; I would ask the list to do the same.
Definitely. Thanks, Pasky. A lot of the user-friendliness we have in Git
now, as opposed to, say, June 2005, is because of cogito. It was sort of a
"next" for ui enhancements, and it is sort of sad that this is gone now.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 120+ messages in thread