* Re: gitk patch collection pull request
From: Linus Torvalds @ 2007-10-20 4:51 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Shawn O. Pearce, git
In-Reply-To: <18201.34779.27836.531742@cargo.ozlabs.ibm.com>
On Sat, 20 Oct 2007, Paul Mackerras wrote:
>
> Do you mean that when you have a file limit, the diff window should
> just show the diffs for those files, not any other files the commit
> might have modified?
Yes. The same way "git log -p" works by default.
With perhaps a checkbox to toggle the "--full-diff" behaviour.
> That would be easy enough to implement in gitk.
Well, the "--merged" case is slightly trickier, since git will figure out
the pathnames on its own (it limits pathnames to the intersection of the
names you give one the command line *and* the list of unmerged files, ie
the "filter" becomes "git ls-files -u [pathspec]".
But goodie. I look forward to it ;)
Linus
^ permalink raw reply
* Re: gitk patch collection pull request
From: Paul Mackerras @ 2007-10-20 4:45 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Shawn O. Pearce, git
In-Reply-To: <alpine.LFD.0.999.0710191227340.26902@woody.linux-foundation.org>
Linus Torvalds writes:
> The biggest problem I have with gitk is that it is almost totally useless
> for when you have a file limit.
>
> I do "gitk --merge" (which has an implicit file limit of the list
> of unmerged files) or just "gitk ORIG_HEAD.. Makefile" and the *history*
> of gitk looks fine.
>
> But the diffs are crap and useless, because they contain all the stuff I
> did *not* want, and hides all the relevant information.
Do you mean that when you have a file limit, the diff window should
just show the diffs for those files, not any other files the commit
might have modified? That would be easy enough to implement in gitk.
Paul.
^ permalink raw reply
* Re: [PATCH] send-pack: respect '+' on wildcard refspecs
From: Jeff King @ 2007-10-20 4:22 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Dan McGee, git
In-Reply-To: <449c10960710191800j3e61b80cma2c582080c1dd07c@mail.gmail.com>
On Fri, Oct 19, 2007 at 08:00:37PM -0500, Dan McGee wrote:
> Turns out I didn't have GIT_EXEC_PATH set up right. Once I do that,
> everything seems to work just fine.
>
> Thanks for looking into this Jeff, and git-bisect just won me over. It
> made easy work of finding the commit that broke this.
Huzzah, success! Shawn, this should probably go on 'maint'. Although it
is probably not high priority (it has been broken since May; I think
wildcard push refspecs must not be that common), it is a fairly trivial
fix that shouldn't impact anyone else.
-Peff
^ permalink raw reply
* Re: [PATCH] git-cherry-pick: improve description of -x.
From: Shawn O. Pearce @ 2007-10-20 3:19 UTC (permalink / raw)
To: Ralf Wildenhues; +Cc: Frank Lichtenheld, git
In-Reply-To: <20071019211152.GN3917@planck.djpig.de>
Frank Lichtenheld <frank@lichtenheld.de> wrote:
> On Fri, Oct 19, 2007 at 07:41:34PM +0200, Ralf Wildenhues wrote:
> > Further, I am surprised that -x seems to be nonfunctional when the
> > cherry pick introduces a conflict. Example:
> [...]
> > The prototype commit message now does not contain the
> > | (cherry picked from commit ...).
> >
> > Is that by design (because there were conflicts) or an omission?
> > In case of the former, maybe the description of -x should mention this.
>
> git commit currently doesn't know that you commit a cherry-pick. The -c
> only says to use the commit message of the original commit. So this is
> currently by design.
Ralf, can you submit an updated version of this patch that describes
the current behavior better, given the "by design" remark above
from Frank?
--
Shawn.
^ permalink raw reply
* Re: gitk patch collection pull request
From: Shawn O. Pearce @ 2007-10-20 3:10 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
In-Reply-To: <18200.36704.936554.220173@cargo.ozlabs.ibm.com>
Paul Mackerras <paulus@samba.org> wrote:
> Shawn O. Pearce writes:
> > The following changes since commit 719c2b9d926bf2be4879015e3620d27d32f007b6:
> > Paul Mackerras (1):
> > gitk: Fix bug causing undefined variable error when cherry-picking
> >
> > are available in the git repository at:
> >
> > git://repo.or.cz:/git/spearce.git gitk
...
> > Jonathan del Strother (2):
> > gitk: Added support for OS X mouse wheel
> > Fixing gitk indentation
>
> This one is bogus. Firstly, it doesn't have "gitk:" at the start of
> the headline (and "Fixing" should be "Fix"). Secondly, the actual
> change itself is bogus. It changes an initial tab to 8 spaces on each
> of 4 lines. I like it the way it is - and if he wanted to change it,
> he should have changed it throughout the file, not just on 4 lines.
> So that change is rejected.
>
> The other changes are OK. If you could re-do your tree without
> 0d6df4de (and possible change "Added" to "Add" in e1b5683c while
> you're at it), I'll do the pull.
Done. I also added this one from Michele:
From: Michele Ballabio <barra_cuda@katamail.com>
Subject: [PATCH-resent] gitk: fix in procedure drawcommits
--
Shawn.
^ permalink raw reply
* Re: [PATCH 09/14] Use the asyncronous function infrastructure in builtin-fetch-pack.c.
From: Shawn O. Pearce @ 2007-10-20 2:53 UTC (permalink / raw)
To: Johannes Sixt; +Cc: git
In-Reply-To: <1192823286-9654-10-git-send-email-johannes.sixt@telecom.at>
I've gone through this entire series and am quite happy with it.
Except one bug in this particular patch.
Johannes Sixt <johannes.sixt@telecom.at> wrote:
> We run the sideband demultiplexer in an asynchronous function.
...
> diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
> index 871b704..51d8a32 100644
> --- a/builtin-fetch-pack.c
> +++ b/builtin-fetch-pack.c
> @@ -457,42 +457,37 @@ static int everything_local(struct ref **refs, int nr_match, char **match)
> return retval;
> }
>
> -static pid_t setup_sideband(int fd[2], int xd[2])
> +static int sideband_demux(int fd, void *data)
> {
> - pid_t side_pid;
> + int *xd = data;
>
> + close(xd[1]);
If this is a threaded start_async() system this close is going
to impact the caller.
> close(xd[0]);
> - close(fd[1]);
> + fd[0] = demux->out;
> fd[1] = xd[1];
Which is relying on xd[1] right here in the caller. Therefore you
cannot actually use this code with a start_async() implementation
that isn't fork() based. Isn't that going to cause you trouble in
the msysGit tree?
--
Shawn.
^ permalink raw reply
* Re: [PATCH] send-pack: respect '+' on wildcard refspecs
From: Dan McGee @ 2007-10-20 1:00 UTC (permalink / raw)
To: Jeff King; +Cc: Shawn O. Pearce, git
In-Reply-To: <20071019134339.GA21852@coredump.intra.peff.net>
On 10/19/07, Jeff King <peff@peff.net> wrote:
> On Fri, Oct 19, 2007 at 08:38:06AM -0500, Dan McGee wrote:
>
> > origin(junio)/master: 58ba4f6
> > origin(junio)/next: fe96ee67ec5840
> > spearce/master: 7840ce6cb24a9d
> > spearce/next: 2fe5433b416f0df
> >
> > Can you let me know what commit you based the patch off of? I'm at
> > work for the next 8 hours or so, so I can't look in to this a whole
> > lot until tonight.
>
> It is based on Shawn's next, 2fe5433b. Are you sure you're not doing
> something silly like executing an older version of git that is in your
> PATH?
Turns out I didn't have GIT_EXEC_PATH set up right. Once I do that,
everything seems to work just fine.
Thanks for looking into this Jeff, and git-bisect just won me over. It
made easy work of finding the commit that broke this.
-Dan
^ permalink raw reply
* Re: Git User's Survey 2007 unfinished summary continued
From: Johannes Schindelin @ 2007-10-19 23:37 UTC (permalink / raw)
To: Federico Mena Quintero; +Cc: Jakub Narebski, git
In-Reply-To: <1192827476.4522.93.camel@cacharro.xalalinux.org>
Hi,
On Fri, 19 Oct 2007, Federico Mena Quintero wrote:
> Bash: Display all 150 possibilities?
>
> Beijing hacker: "oh, shit..."
>
> It's hard to know where to begin :) Do I need "git-cherry-pick" or
> "git-cherry"? Why is the "apply a patch" command called "git-am"? Why
> is it different from "git-apply"? From "git-applypatch"? Etc.
Yeah, I was arguing a bit about obsoleting the "git-*" programs. But it
seems that we are not getting it anytime soon.
FWIW try this:
git<Space><Tab>
or even better:
git<Enter>
Ciao,
Dscho
^ permalink raw reply
* Re: Git User's Survey 2007 unfinished summary continued
From: Jakub Narebski @ 2007-10-19 23:27 UTC (permalink / raw)
To: Federico Mena Quintero; +Cc: Johannes Schindelin, git
In-Reply-To: <1192827476.4522.93.camel@cacharro.xalalinux.org>
On 10/19/07, Federico Mena Quintero <federico@novell.com> wrote:
> "Make git more task-oriented rather than data-model-oriented" is about
> making the tool adapt to what you usually want to do, instead of making
> *you* adapt to the way the tool wants to work. Many commands in Git
> have documentation like
>
> "option --foo updates the refs without modifying the index. Requires
> a clean working tree"
>
> This is gibberish for people who are not very familiar with Git's
> internals. "Git for computer scientists" provides a *very nice*
> explanation of the DAG and refs and tags, but unfortunately it doesn't
> explain the index, why you would want to know about it, etc.
That is what "Git User's Manual" (and tutorials) is for. And there is
glossary in documentation.
[...]
> It's nice that Git lets you manipulate the repository in all kinds of
> ways, but presenting porcelains at the same level as plumbing makes
> things hard for users to learn. I was just in our Beijing office,
> teaching people about development tools and Git in particular.
>
> Federico: "get Git from this location"
>
> Beijing hacker: tap tap tap, "okay, it's installed now"
>
> Federico "Git commands all start with 'git'"
>
> Beijing hacker: git<Tab>
>
> Bash: Display all 150 possibilities?
>
> Beijing hacker: "oh, shit..."
It is better to use bash (or zsh) completion, than rely on completion
of commands names.
Beijing hacker: git <Tab>
(that is, space after 'git') shows around 62 commands.
> It's hard to know where to begin :) Do I need "git-cherry-pick" or
> "git-cherry"? Why is the "apply a patch" command called "git-am"? Why
> is it different from "git-apply"? From "git-applypatch"? Etc.
I think git-cherry will soon be obsoleted and removed, such like
git-applymbox and it companion git-applypatch are being obsoleted by
git-am.
git-am applies series of patches _with description_ from messagebox,
creating commits if patch applies without conflicts. It requires git
extended patch for sensible operation; it is best when patch is result
of git-format-patch. git-apply is to apply GNU patch (optionally git
patch) to working area, or working area and index, but do not create a
commit. It is improved version of GNU patch utility (it understands
git extended diff syntax), but it is not meant (alone) to work with
commits send by email.
--
Jakub Narebski
^ permalink raw reply
* Fourth incarnation of the msysGit herald
From: Johannes Schindelin @ 2007-10-19 23:25 UTC (permalink / raw)
To: msysgit, git
Good morning git land!
20 years after the black monday, which happens to be exactly three days
after the 164th (official) birthday of the quaternions, is as good an
occasion as any to bring to you the fourth incarnation of the msysGit
Herald, the not-quite-biweekly news letter to keep you informed about
msysGit, the effort to bring one of the most powerful Source Code
Management systems to the poor souls stuck with Windows.
These are the covered topics:
Spanking new Inno installer
New naming scheme & new release
git gui
Interview with Steffen Prohaska
Calling git from cmd.exe
Historic notes
Spanking new Inno installer
===========================
As mentioned in the last Herald, Sebastian Schuberth (with some help
of Steffen Prohaska) started to replace the 7-Zip installer that I
built with my heart and soul. I even came so far as to work around
Windows' refusal to delete the uninstaller while that is running
(which would usually be its last action on other platforms).
Incidentally, this uninstaller was also a nice small example how to
write an elegant Win32 program without bloat. My opinion _might_ be
biased because I wrote it.
But I have to admit that the installer based on Inno looks sleeker,
more professional, and is easier to extend.
It uses the same LZMA compressor that 7-Zip used, so there is (almost)
no downside regarding the size of the installer.
The usual options, such as adding a Start Menu, a Quick Launch item,
a Desktop item, a simple Explorer extension, and an uninstaller,
come basically for free with Inno. Well, not exactly for free, but
Sebastian did all the hard work, so that we all could benefit.
>From what I hear, this installer is also able to run on DOS based
Windows such as Windows 95. Yeah!
The downsides of using Inno that I have encountered so far are not
important in comparison:
You can no longer just unzip the installer with 7-Zip. But if that
should turn out to be a major problem for many people (which I doubt),
we can still just add one line to automatically generate a .7z file
at the same time as the installer. I came upon a little project
named "innounp" (on sourceforge.net), though, which purportedly unpacks
installers made with Inno Setup. Maybe at some stage there is also
a 7-Zip plugin ;-)
The installer was easily built using Linux, by making a 7-Zip archive
and prepending the self-extracting module and the config file. Well,
Wine is not there yet, but hopefully it will soon.
The installer does not run under Wine. But then, neither did the
7-Zip based installer.
New naming scheme & new release
===============================
There was a bit of a stir when we realised that not everybody
understands the differences between GitMe, msysGit and WinGit.
So we sat down on the msysgit list and thought about it a bit.
There are basically two different projects: msysGit, which is the
development environment which is needed to compile git and friends.
And there is the installer which delivers the compiled programs to
those who do not want to work _on_, but _with_, git. We used to
call this WinGit (I liked it very much because of the connotation
of "to wing it").
But Steffen Prohaska pointed out, rightfully so, that it should be
Git-<version-and-stuff>.exe.
Since our current versions are not as smooth-running as git on
POSIX platforms, we decided to go with the "preview" postfix, until
we are reasonably comfortable to declare it "beta". Note: in the
good tradition of Open Source, our "preview" versions are probably
more usable than some XP^WGolden versions of commercial software.
The version number will be that of the git release we are basing
our installer on, and we plan to have indicators "rc<n>" once our
project is stable enough that we are reasonably certain that it
does not have fatal flaws. Also, the timestamp of its build will be
part of the file name, and we will tag the exact state in msysgit.git
which this build was based on.
So we now have the first official preview of Git on MSys. By the old
naming scheme, this would have been "WinGit 0.3 alpha".
It was created with Inno (see previous story), and we expect the user
experience to be much smoother than with previous releases. There is
one known issue, though: pull/fetch does not work in git gui (also see
next story).
git gui
=======
git gui is a really nice program, and as I often said, I consider it
more porcelain than a gui, since it uses the git core directly, instead
of wrapping around porcelain commands.
The user experience I had with git gui made me think that this should
be the primary interface Windows users should be confronted with, not
the command line.
The major problem we had in msysGit is that git-gui was to be launched
from the Start Menu, or a QuickLaunch icon. This is in contrast to
the shell, where you usually start git gui in a working directory.
So we needed some method to choose a working directory. Mike Pape
put some work into that, but got too much work to do with the day
job. While he was busy with non-gittish things, Shawn Pearce went
busy writing a wizard to select an existing directory, create a new
one, or clone a repository.
One issue we did not yet properly resolve is that fetch/pull does not
work from within git gui. For the moment, you have to use the Git bash.
I suspect that this issue will disappear automagically when we merge
with newer git which have the builtin fetch.
Steffen Prohaska contributed the "open recent" feature, so there is
nothing left preventing our taking over the (Windows-)world!
Interview with Steffen Prohaska
===============================
> 1) How did you get involved with Git?
I was looking for a simple version control system to handle my personal
Mac OS X documents. Mac OS X applications save data as directories
containing related files that together form a document. A version
control system must not store data in such a directory.
I worked with CVS, which I am still using on a daily basis, and tried
svn. But both need to store data in every subdirectory they manage.
I stumbled over a couple of other systems, like monotone, arch, darcs,
and finally git. Git was quite easy to install and did what I needed;
well, after I found out about
git-ls-files -z --others SomeBundle | \
git-update-index --add -z --stdin
git-commit -a
I created my first git repository around April 2006 and have these two
lines in a script there. And I still use them to handle nearly all of
my documents.
> 2) What were the reasons that you started working on Git?
Git did always a great job managing my own documents. But two
deficiencies kept me for a long time from advertising it as a
replacement for our CVS: Git didn't work on Windows and git didn't
provide a mechanism that is today known as sub-modules.
When it turned out that sub-modules will become available and Windows
support (autocrlf) was introduced, I started to evaluate a migration
of our development team from CVS to git. The need for a new system
intensified after it became clear that we'll have to handle three
sub-groups in the future with different release schedules.
I was pretty convinced that git would be the right system. But Windows
support was just not good enough. So I started to work on this.
A bit earlier I needed to debug CVS import. If I remember correctly
the first patch I sent was on git-cvsexportcommit.
> 3) What do you like most in Git?
When I started I liked most the lightweight installation and easy
setup of fresh repositories.
Today, I like most the great support for automatic merging, rerere,
and git-mergetool.
> 4) What do you hate most in Git?
Git asks me two times for my password during 'git fetch' when I
forgot to unlock my ssh-key. And I can't reasonably explain this
fact to newbies.
I often need to find small workarounds for minor deficiencies in
the user interface. Especially getting started with git is not as
easy as it could be. git-* matches approximately 150 commands.
That's overwhelming.
> 5) What was the most surprising moment when working with Git?
When I learnt about rerere. It's magic.
> 6) What was the most frustrating moment when working with Git?
When I understood that git-cvsimport messes up CVS history and
cannot be used for importing from CVS. It was really hard to find a
working alternative. The documentation didn't help much.
I was also quite desperate when I understood that git will never
run in Cygwin's textmode.
> 7) In what environment do you work?
Mac OS X, Linux (x86_64, i386, ia64), XP, XP64, Vista.
> 8) What other hobbies do you have?
besides git? ... hmm ... maybe jogging counts as a hobby.
> 9) What is your favourite movie?
Pulp Fiction.
> 10) What are your visions for Git? (I.e. where do you want it to go?)
I wish to see all core features with same quality on Windows as on Unix.
In addition, everything which is needed to support cross-platform
projects that look on Windows as if they were pure Windows projects and
on Unix as if they were pure Unix projects.
A leaner user interface would be nice that is more focused on the
essential workflows and makes it easier to explain git. The average
developer shouldn't need to know too many details about git before he
is able to participate in a shared repository workflow.
Steffen
Calling git from cmd.exe
========================
As mentioned in the story "The war between cmd and bash" in the first
issue of this little tabloid, some people prefer to avoid bash.
The simplest solution to allow this would be to add msysGit's bin/
to the PATH. Alas, it is not as easy as that.
Windows has its own versions of "sort" and "find", and regular Windows
users' scripts might rely on finding those, while git relies on finding
more POSIXy versions of those programs.
Therefore we have a cmd/ directory containing wrappers for git and gitk,
and the new installer adds this directory to the PATH. (Actually you
can choose between a few different options...)
That should make everybody happy.
Historic notes
==============
Reading Jakub's results of the git survey instigated me to investigate
when msysGit was born (under a different name...). We had a tremendous
progress since, and it almost felt as two years had gone by since I
started this thing.
Alas, the first commit I ever made on my mingw branch was on
Tue Jun 20 19:13:02 2006 +0200
A long time nevertheless. From the commit messages I found that the
first time I fixed a test -- which is my best indicator that I got
something running; I did not manifest a "Hooray, first time it
_does_ something" in any commit message -- was on
Tue Sep 19 15:11:29 2006 +0200
So it took me two months, on and off, to get it to run. Of course, this
version was so lousy that it was only barely self-hosting. Since I could
not get vi to run on my MinGW setup, I did the commits using -m.
I also had not found out yet that bash in an Rxvt was not able to call
"less" properly, and I had to pipe "git log | less" to stop the output
from whizzing by as fast as Douglas Adams' deadlines.
Reading further in my logs, I stopped working on my mingw branch on
Wed Sep 20 17:38:35 2006 +0200, certainly because I did not feel the
need, and the major obstacles had been tackled, and I got bored with it.
Or my boss made me work for a change. Something along those lines.
All the better for the many eager Windows users that Hannes Sixt took
up the ball, and committed his first version on Fri Dec 22 11:43:50
2006 +0100, although you can see in the logs that it was recommitted
(for the last time, I guess) on Fri Jan 19 16:21:41 2007 +0100.
Since then, he made steady progress, with a few helpers helping out
from time to time.
The next big turn was the kick off of the msysGit project... the rest
is history.
^ permalink raw reply
* RE: linux-2.6.git mirror
From: Medve Emilian-EMMEDVE1 @ 2007-10-19 22:50 UTC (permalink / raw)
To: Linus Torvalds, Shawn O. Pearce; +Cc: Git Mailing List
In-Reply-To: <alpine.LFD.0.999.0710181617090.26902@woody.linux-foundation.org>
Hi Linus,
> And yes, I think this should go into Shawns tree of fixes,
> assuming that
> Emil confirms that it fixes it for him.
Indeed, I don't get the error message anymore. Thanks for your help.
A remaining question is why I wasn't seeing that error message on normal
clones, i.e. non-mirrors (with +refs/heads/*:refs/remotes/origin/* fetch
refspec as oposed to +refs/*:refs/* fetch refspec)?
Thanks again,
Emil.
^ permalink raw reply
* RE: git push bug?
From: Johannes Schindelin @ 2007-10-19 22:46 UTC (permalink / raw)
To: Joakim Tjernlund; +Cc: 'Steffen Prohaska', 'git'
In-Reply-To: <000001c81280$ebc5c5e0$5267a8c0@Jocke>
Hi,
On Fri, 19 Oct 2007, Joakim Tjernlund wrote:
> > From: Johannes Schindelin [mailto:Johannes.Schindelin@gmx.de]
> >
> > On Fri, 19 Oct 2007, Joakim Tjernlund wrote:
> >
> > > On Thu, 2007-10-18 at 23:00 +0100, Johannes Schindelin wrote:
> > > >
> > > > On Thu, 18 Oct 2007, Joakim Tjernlund wrote:
> > > >
> > > > > First, I didn't know that I could do that. Secondly, I was also
> > > > > looking do v2.6.23:linus refspecs
> > > >
> > > >
> > > > First, then our documentation could be better. How?
> > >
> > > Well, it isn't clear to me how all this is supposed to work and what
> > > is bugs. Clearifying that would help.
> > >
> > > For instances I did a push with v2.6.23:refs/heads/linus and now I
> > > got a branch with the SHA1 of v2.6.23
> > > tag(0b8bc8b91cf6befea20fe78b90367ca7b61cfa0d) in it. Makes gitk
> > > display that branch as "linus^{}".
> >
> > It strikes me as really odd that you would _want_ to create a branch
> > remotely, that has _never_ existed locally.
>
> It strikes me as really odd that a core developers like yourself
> hasn't tried to justify/explain why push works as it does.
Well, I explained that I think the "src:dst" way to specify things are not
meant for git newbies. Don't use it.
git push <remote> <branchname> works exactly as advertised. It pushes the
specified branch to the remote repository.
> As I am trying to convince our dev. group here to move to git instead of
> subversion, I need to learn how git works. Now I have gotten to the push
> function and I need to know what can be done with push and how, pitfalls
> too. As I go along I find behavior that I find odd and report these to
> the list.
>
> git push <repo> v2.6.23:refs/heads/linus
> will make a tag look like a branch
Don't use src:dest notation.
> git push <repo> linus:linus
> won't let me create the remote branch linus
Don't use src:dest notation.
> but
> git push <repo> linus
> will
Use this. This is good.
> git push <repo> :linus
> OOPS, now I just deleted remote branch linus, no warning
Don't use src:dest notation.
> git push <repo> linus:refs/head/linus
> creates a branch that is invisible(wont show in git branch -a)
Don't use src:dest notation.
> git push <repo> linus:refs/heads/newbranch
> creates remote branch newbranch, but you have to know the magic words
> refs/heads/ to do it.
Don't use src:dest notation.
> Se what I mean?
Yes.
I hope you return the honour.
> > > > Second, why not "git checkout -b linus v2.6.23 && git push origin
> > > > linus"?
> > >
> > > An extra checkout that takes time but works.
> >
> > Not only that: before trying to publish something, I would have
> > expected you to have that branch locally, and that you actually worked
> > on it.
> >
> > > Doesn't make the above "weiredness" go away though.
> >
> > Yes it does.
>
> No it doesn't. If someone else in my group wants to create a branch they
> might do the same mistakes as I did.
Yes, it does. You no longer can push a tag onto a remote branch by
accident. Just don't use the src:dest notation. Forget about it. You
definitely don't need it before you understand git better.
Hth,
Dscho
^ permalink raw reply
* Re: [RFC/PATCH] git-fetch: mega-terse fetch output
From: Theodore Tso @ 2007-10-19 21:58 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Karl Hasselström, Santi Béjar, Shawn O. Pearce,
David Symonds, Jeff King, git
In-Reply-To: <alpine.LFD.0.9999.0710191739270.19446@xanadu.home>
On Fri, Oct 19, 2007 at 05:40:48PM -0400, Nicolas Pitre wrote:
> No. "next" is the name of the _remote_ branch that is stored locally in
> spearce/next. So the arrow is correct.
Ah; yes, you're right. I can see this being very confusing to the
newbie, though. Enough so that in beginner mode we might want it to
say:
895be02..2fe5433 (remote) next -> (local) spearce/next
... especially since the git pull might follow up the pull with a
merge from the local remotes/spearce/next to the local next branch.
So it would be a good idea that it is clear when we are referring to a
local or a remote branch.
- Ted
^ permalink raw reply
* Re: [PATCH] Change 'Deltifying objects' to 'Delta compressing objects'
From: Linus Torvalds @ 2007-10-19 21:57 UTC (permalink / raw)
To: Nicolas Pitre; +Cc: Jeff King, Shawn O. Pearce, git
In-Reply-To: <alpine.LFD.0.999.0710191157560.26902@woody.linux-foundation.org>
On Fri, 19 Oct 2007, Linus Torvalds wrote:
>
> Could be done, but I almost think it would be better to just make the
> sha1_name.c interfaces take some extended data structure which allows
> looking up multiple SHA1's at the same time.
Btw, I knew I had wanted this in the past, but I had forgotten why. I now
remembered.
The thing is, sometimes you want an expression for "all the parents of X".
We don't have that, and again, the current internal implementation of
sha1_name.c makes it essentially impossible to do within that interface
(ie you can do it on *top* of that interface in revision.c, but it cannot
be a general SHA1 expression).
So wouldn't it be nice to have a "commit^*" expression to go with
"commit^" and "commit^2" etc? One that would name all the parents. It's
useful, for example, for saying that you still want to see that commit,
but not any of its parents:
git log commit^*..
could basically work to show that commit (and all subsequent commits), but
not the commits leading up to it. Right now, you can't easily say that in
the git "sha1 expression algebra".
There are some other cases where you'd like to have things expand to more
than one commit. We currently do those with special flags, like --all, but
in many ways it would be really nice to be able to do SHA1 operations on
them. If we were to make the SHA1 arithmetic able to handle multiple
SHA1's (instead of just one), I could see us being able to do things like
git diff {master,pu}:Makefile
as a way of saying
git diff master:Makefile pu:Makefile
which already works - simply because we could make the ":name" be able to
operate on multiple commit SHA1's and turn them into multiple blob (or
tree) SHA1's.
(The above may not sound very useful, but
git diff {ORIG_HEAD...MERGE_HEAD}:file
would essentially expand to "base version of file", ORIG_HEAD:file and
MERGE_HEAD:file, and we could fairly easily teach diff to do a nice
three-way diff for things like this! So it does have potential to be a
reasonably powerful model)
Linus
^ permalink raw reply
* Re: [RFC/PATCH] git-fetch: mega-terse fetch output
From: Nicolas Pitre @ 2007-10-19 21:40 UTC (permalink / raw)
To: Theodore Tso
Cc: Karl Hasselström, Santi Béjar, Shawn O. Pearce,
David Symonds, Jeff King, git
In-Reply-To: <20071019211755.GC751@thunk.org>
On Fri, 19 Oct 2007, Theodore Tso wrote:
> On Fri, Oct 19, 2007 at 11:03:00AM -0400, Nicolas Pitre wrote:
> > Well, the important thing is that the _content_ is moving from the
> > remote repository to the local one. That's how the arrow should be
> > interpreted conceptually. The fact that technically we end up assigning
> > the local ref with the remote value is a technical issue.
>
> If the _content_ is moving from the remote repository to the local
> one, I would think the arrow should be pointing from the remote
> repoistory to the local one, i.e.:
>
> * 895be02..2fe5433 next <- spearce/next
>
> But right now we are proposing:
>
> * 895be02..2fe5433 next -> spearce/next
>
> I would think the former makes more sense is the content is going
> *from* spearce/next into the local next branch.
No. "next" is the name of the _remote_ branch that is stored locally in
spearce/next. So the arrow is correct.
Nicolas
^ permalink raw reply
* Re: Git-submodule questions
From: Linus Torvalds @ 2007-10-19 21:30 UTC (permalink / raw)
To: Evan Carroll; +Cc: git
In-Reply-To: <alpine.LFD.0.999.0710191420410.26902@woody.linux-foundation.org>
On Fri, 19 Oct 2007, Linus Torvalds wrote:
>
> In fact, it should be enough to do
>
> cd /srv/DM
> git init
> git add .
> git commit
>
> and you're now literally all done!
.. btw, when I say that, I guess I'm lying a bit.
Yes, the above will actually generate a valid git superproject repository,
but it won't generate/populate the necessary .gitmodules stuff. You'd need
to add it by hand.
But yes, if you want to avoid doing that hand-editing, you should use the
whole "git submodule add .." thing to clone the git repos you already have
into a supermodule. But the .gitmodules thing really is pretty simple, you
just do something like
[submodule "x"]
path = x
url = official-url-of-x
[submodule "y"]
path = y
url = official-url-of-y
and now you just do "git submodule init" and you should be all done
(again, the "git submodule init" thing you could do by hand by editing
the .git/config file, but since you can do it automatically in-place,
there's no real point).
Linus
^ permalink raw reply
* Re: Git-submodule questions
From: Linus Torvalds @ 2007-10-19 21:22 UTC (permalink / raw)
To: Evan Carroll; +Cc: git
In-Reply-To: <428b865e0710191354v59f558bbv4536d60902977ac@mail.gmail.com>
On Fri, 19 Oct 2007, Evan Carroll wrote:
>
> I've got a set of 5 git repositories on one computer. I'm looking for
> a way to more cleanly distribute them, and keep them in sync when i
> distribute them. I'm trying to discern whether the scantly documented
> git-submodule can accomplish this...
Sounds like subprojects are indeed a good way for you.
> All of my git modules are in one place, /srv/DM: /srv/DM/a ..
> /srv/DM/e to add them all into one super repository for easier
> distributing I have to move them all to /srv/DM/git-old, then git init
> in /srv/DM, then I git submodule add all of the modules in
> /srv/DM/git-old. The question then comes down to why do I need to have
> my git-submodules in /srv/DM, and /srv/DM/git-old.
You shouldn't need to do anything even half-way complicated like that.
In fact, it should be enough to do
cd /srv/DM
git init
git add .
git commit
and you're now literally all done!
Linus
^ permalink raw reply
* Re: [RFC/PATCH] git-fetch: mega-terse fetch output
From: Theodore Tso @ 2007-10-19 21:17 UTC (permalink / raw)
To: Nicolas Pitre
Cc: Karl Hasselström, Santi Béjar, Shawn O. Pearce,
David Symonds, Jeff King, git
In-Reply-To: <alpine.LFD.0.9999.0710191058570.19446@xanadu.home>
On Fri, Oct 19, 2007 at 11:03:00AM -0400, Nicolas Pitre wrote:
> Well, the important thing is that the _content_ is moving from the
> remote repository to the local one. That's how the arrow should be
> interpreted conceptually. The fact that technically we end up assigning
> the local ref with the remote value is a technical issue.
If the _content_ is moving from the remote repository to the local
one, I would think the arrow should be pointing from the remote
repoistory to the local one, i.e.:
* 895be02..2fe5433 next <- spearce/next
But right now we are proposing:
* 895be02..2fe5433 next -> spearce/next
I would think the former makes more sense is the content is going
*from* spearce/next into the local next branch.
This isn't a huge deal, but these tiny things make a large amount of
difference in usability for the novice who just getting started with
git....
- Ted
^ permalink raw reply
* Re: [PATCH] git-cherry-pick: improve description of -x.
From: Frank Lichtenheld @ 2007-10-19 21:11 UTC (permalink / raw)
To: Ralf Wildenhues, git
In-Reply-To: <20071019174134.GD9906@ins.uni-bonn.de>
On Fri, Oct 19, 2007 at 07:41:34PM +0200, Ralf Wildenhues wrote:
> Further, I am surprised that -x seems to be nonfunctional when the
> cherry pick introduces a conflict. Example:
[...]
> The prototype commit message now does not contain the
> | (cherry picked from commit ...).
>
> Is that by design (because there were conflicts) or an omission?
> In case of the former, maybe the description of -x should mention this.
git commit currently doesn't know that you commit a cherry-pick. The -c
only says to use the commit message of the original commit. So this is
currently by design.
> diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
> index 47b1e8c..c7d83ce 100644
> --- a/Documentation/git-cherry-pick.txt
> +++ b/Documentation/git-cherry-pick.txt
> @@ -27,10 +27,10 @@ OPTIONS
> message prior committing.
>
> -x::
> - Cause the command to append which commit was
> - cherry-picked after the original commit message when
> - making a commit. Do not use this option if you are
> - cherry-picking from your private branch because the
> + When recording the commit, the original commit message will
> + be appended with a note that indicates which commit this
> + change was cherry-picked from. Do not use this option if
> + you are cherry-picking from your private branch because the
Is "will be appended with" correct English? Sounds odd to me (but I'm no
native speaker, so it might be perfectly fine).
Gruesse,
--
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
^ permalink raw reply
* Re: Git User's Survey 2007 unfinished summary continued
From: Federico Mena Quintero @ 2007-10-19 20:57 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Jakub Narebski, git
In-Reply-To: <Pine.LNX.4.64.0710130130380.25221@racer.site>
On Sat, 2007-10-13 at 01:46 +0100, Johannes Schindelin wrote:
> Jakub, thank you very much for doing this. It is a very tedious work, and
> I deem it invaluable.
Seconded! This survey is very valuable, Jakub!
> > Figure out why people find git hard to learn and eliminate those
> > barriers to entry. Make git more task-oriented rather than
> > data-model-oriented the way it is now.
>
> Frankly, expectations like these make me want to bang somebody's head on
> the wall. Why do people expect others to work for them for free? Hard?
The "barriers to entry" / "data model" comment came from me :)
"Find out why people find git hard to learn and eliminate those barriers
to entry" is what we do with usability tests e.g. in GNOME. You ask
people to use your software to accomplish well-defined tasks ("send a
mail to foo@bar.com", "using the word processor, copy this fancy printed
layout"). Then, you see how they *expect* your software to work, you
see in which places it doesn't behave like that, and you fix it. This
produces very good results. For Git in particular this could be things
like, "Import this project from SVN, fix a bug, commit the patch", or
"You are a maintainer, merge in these two branches from two
contributors".
"Make git more task-oriented rather than data-model-oriented" is about
making the tool adapt to what you usually want to do, instead of making
*you* adapt to the way the tool wants to work. Many commands in Git
have documentation like
"option --foo updates the refs without modifying the index. Requires
a clean working tree"
This is gibberish for people who are not very familiar with Git's
internals. "Git for computer scientists" provides a *very nice*
explanation of the DAG and refs and tags, but unfortunately it doesn't
explain the index, why you would want to know about it, etc.
Git introduces a lot of terminlogy: refs, index, working tree, remotes,
origin, HEAD (which is not the same as CVS HEAD!), detached head,
rebasing, porcelains, etc. Even the basic documentation is hard to read
when you don't know all the terms yet.
It's nice that Git lets you manipulate the repository in all kinds of
ways, but presenting porcelains at the same level as plumbing makes
things hard for users to learn. I was just in our Beijing office,
teaching people about development tools and Git in particular.
Federico: "get Git from this location"
Beijing hacker: tap tap tap, "okay, it's installed now"
Federico "Git commands all start with 'git'"
Beijing hacker: git<Tab>
Bash: Display all 150 possibilities?
Beijing hacker: "oh, shit..."
It's hard to know where to begin :) Do I need "git-cherry-pick" or
"git-cherry"? Why is the "apply a patch" command called "git-am"? Why
is it different from "git-apply"? From "git-applypatch"? Etc.
Federico
^ permalink raw reply
* Re: Announcement of Git wikibook
From: Steffen Prohaska @ 2007-10-19 20:58 UTC (permalink / raw)
To: Evan Carroll; +Cc: git
In-Reply-To: <428b865e0710191321ndd08564yec6366cb10705af6@mail.gmail.com>
On Oct 19, 2007, at 10:21 PM, Evan Carroll wrote:
> I've create a git wikibook if anyone wants to help expand it.
> http://en.wikibooks.org/wiki/Source_Control_Management_With_Git
I'm just curious. What is the advantage of a wikibook?
We already have a manual
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html
including a todo list
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#todo
So, why don't you send patches improving the manual, but instead
started a wiki book from scratch?
Steffen
^ permalink raw reply
* Git-submodule questions
From: Evan Carroll @ 2007-10-19 20:54 UTC (permalink / raw)
To: git
I've got a set of 5 git repositories on one computer. I'm looking for
a way to more cleanly distribute them, and keep them in sync when i
distribute them. I'm trying to discern whether the scantly documented
git-submodule can accomplish this...
All of my git modules are in one place, /srv/DM: /srv/DM/a ..
/srv/DM/e to add them all into one super repository for easier
distributing I have to move them all to /srv/DM/git-old, then git init
in /srv/DM, then I git submodule add all of the modules in
/srv/DM/git-old. The question then comes down to why do I need to have
my git-submodules in /srv/DM, and /srv/DM/git-old.
Can I make a superproject out of /srv/DM and just some how add all of
that directories contents as submodules. When I try to add them as
like that I just get submodule 'a' already exists (because it does as
a non-submodule but as a git-repos.)
Picture a svn repository, now chop of the root, that's how my git
looks, and I'm trying to amend that. In svn all of your companies
projects can be tracked by one svn repository, not so in git. I'm
wondering if submodule is or isn't the tool to deliver this
functionality.
--
Evan Carroll
System Lord of the Internets
me@evancarroll.com
832-445-8877
^ permalink raw reply
* Announcement of Git wikibook
From: Evan Carroll @ 2007-10-19 20:21 UTC (permalink / raw)
To: git
I've create a git wikibook if anyone wants to help expand it.
http://en.wikibooks.org/wiki/Source_Control_Management_With_Git
--
Evan Carroll
System Lord of the Internets
me@evancarroll.com
832-445-8877
^ permalink raw reply
* Re: git on afs
From: Daniel Barkalow @ 2007-10-19 20:19 UTC (permalink / raw)
To: Todd T. Fries; +Cc: Shawn O. Pearce, git, Brandon Casey
In-Reply-To: <200710190742.08174.todd@fries.net>
On Fri, 19 Oct 2007, Todd T. Fries wrote:
> You're the second one to point out that I should check the errno of link() on
> afs.
>
> It should not matter, but I'm using arla's afs client on OpenBSD; the errno
> is 17 (EEXIST), the very errno that bypasses the coda hack's rename():
According to a quick web search, OpenAFS gives EXDEV (unless there are
other errors that apply). Getting EEXIST when the new path doesn't exist
sounds like a bug in arla to me, although it could also be an AFS server
issue, AFAICT.
-Daniel
*This .sig left intentionally blank*
^ permalink raw reply
* [PATCH 11/14] upload-pack: Run rev-list in an asynchronous function.
From: Johannes Sixt @ 2007-10-19 19:48 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: git, Johannes Sixt
In-Reply-To: <1192823286-9654-11-git-send-email-johannes.sixt@telecom.at>
This gets rid of an explicit fork().
Since upload-pack has to coordinate two processes (rev-list and
pack-objects), we cannot use the normal finish_async(), but have to monitor
the process explicitly. Hence, there are no changes at this front.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
upload-pack.c | 46 ++++++++++++++++++----------------------------
1 files changed, 18 insertions(+), 28 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index ccdc306..6799468 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -97,11 +97,12 @@ static void show_edge(struct commit *commit)
fprintf(pack_pipe, "-%s\n", sha1_to_hex(commit->object.sha1));
}
-static void do_rev_list(int create_full_pack)
+static int do_rev_list(int fd, void *create_full_pack)
{
int i;
struct rev_info revs;
+ pack_pipe = fdopen(fd, "w");
if (create_full_pack)
use_thin_pack = 0; /* no point doing it */
init_revisions(&revs, NULL);
@@ -131,14 +132,12 @@ static void do_rev_list(int create_full_pack)
prepare_revision_walk(&revs);
mark_edges_uninteresting(revs.commits, &revs, show_edge);
traverse_commit_list(&revs, show_commit, show_object);
+ return 0;
}
static void create_pack_file(void)
{
- /* Pipe from rev-list to pack-objects
- */
- int lp_pipe[2];
- pid_t pid_rev_list;
+ struct async rev_list;
struct child_process pack_objects;
int create_full_pack = (nr_our_refs == want_obj.nr && !have_obj.nr);
char data[8193], progress[128];
@@ -148,22 +147,12 @@ static void create_pack_file(void)
const char *argv[10];
int arg = 0;
- if (pipe(lp_pipe) < 0)
- die("git-upload-pack: unable to create pipe");
- pid_rev_list = fork();
- if (pid_rev_list < 0)
+ rev_list.proc = do_rev_list;
+ /* .data is just a boolean: any non-NULL value will do */
+ rev_list.data = create_full_pack ? &rev_list : NULL;
+ if (start_async(&rev_list))
die("git-upload-pack: unable to fork git-rev-list");
- if (!pid_rev_list) {
- close(lp_pipe[0]);
- pack_pipe = fdopen(lp_pipe[1], "w");
- do_rev_list(create_full_pack);
- exit(0);
- }
-
- /* writable pipe end must not be inherited by pack_objects */
- close(lp_pipe[1]);
-
argv[arg++] = "pack-objects";
argv[arg++] = "--stdout";
if (!no_progress)
@@ -173,14 +162,15 @@ static void create_pack_file(void)
argv[arg++] = NULL;
memset(&pack_objects, 0, sizeof(pack_objects));
- pack_objects.in = lp_pipe[0]; /* start_command closes it */
+ pack_objects.in = rev_list.out; /* start_command closes it */
pack_objects.out = -1;
pack_objects.err = -1;
pack_objects.git_cmd = 1;
pack_objects.argv = argv;
+
if (start_command(&pack_objects)) {
/* daemon sets things up to ignore TERM */
- kill(pid_rev_list, SIGKILL);
+ kill(rev_list.pid, SIGKILL);
die("git-upload-pack: unable to fork git-pack-objects");
}
@@ -280,11 +270,11 @@ static void create_pack_file(void)
}
/* See if the children are still there */
- if (pid_rev_list || pack_objects.pid) {
+ if (rev_list.pid || pack_objects.pid) {
pid = waitpid(-1, &status, WNOHANG);
if (!pid)
continue;
- who = ((pid == pid_rev_list) ? "git-rev-list" :
+ who = ((pid == rev_list.pid) ? "git-rev-list" :
(pid == pack_objects.pid) ? "git-pack-objects" :
NULL);
if (!who) {
@@ -302,11 +292,11 @@ static void create_pack_file(void)
who);
goto fail;
}
- if (pid == pid_rev_list)
- pid_rev_list = 0;
+ if (pid == rev_list.pid)
+ rev_list.pid = 0;
if (pid == pack_objects.pid)
pack_objects.pid = 0;
- if (pid_rev_list || pack_objects.pid)
+ if (rev_list.pid || pack_objects.pid)
continue;
}
@@ -329,8 +319,8 @@ static void create_pack_file(void)
fail:
if (pack_objects.pid)
kill(pack_objects.pid, SIGKILL);
- if (pid_rev_list)
- kill(pid_rev_list, SIGKILL);
+ if (rev_list.pid)
+ kill(rev_list.pid, SIGKILL);
send_client_data(3, abort_msg, sizeof(abort_msg));
die("git-upload-pack: %s", abort_msg);
}
--
1.5.3.4.315.g2ce38
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox