git mailing list

FromSubjectDatesort icon
linux
Re: multi-project repos (was Re: Cleaning up git user-interf...
"The only intuitive user interface is the nipple; all else is learned." As Linus is explaining, the fundamental *problem* is the mental model. Once you know how to break your goals apart into the right kind of pieces, little things like terminology are truly little. I'm not sure that git is sufficiently like anything else that a few well-chosen command names can bring a good analogy to mind. There just isn't a simple analogy that won't lead you astray; you have to understand the thing on its o...
Nov 17, 1:11 am 2006
Sean
Re: multi-project repos (was Re: Cleaning up git user-interf...
On 17 Nov 2006 00:11:57 -0500 The thing is that other SCM's like hg look a lot more like a nipple than Git. And they have the same conceptual models, more or less, to deal with as Git. So why is it so many people think Git has a UI problem where the same complaint isn't levelled at Mercurial? The thing is, the focus of Git has been different, it's been about creating great plumbing. It's had great success at doing that, and anyone who warms up to Git is well rewarded with a tool that gives th...
Nov 17, 1:42 am 2006
Michael K. Edwards
[PATCH] Make "git checkout <branch> <path>" work...
This improves the workflow for, say, kernel subsystem backporting. Signed-off-by: Michael K. Edwards <medwards-linux@gmail.com> --- git-checkout.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/git-checkout.sh b/git-checkout.sh index dd47724..5866604 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -106,7 +106,8 @@ Did you intend to checkout '$@' which ca git-ls-tree --full-name -r "$new" "$@" | git-update-index --index-info || exit $? fi - gi...
Nov 17, 1:49 am 2006
Junio C Hamano
Re: [DRAFT] Branching and merging with git
Of course "git log -p --merge -- $path" would give the patch "show $merge" is really "diff-tree --cc -p $merge". So first I should (not necessarily "you should to the readers of this document") talk about three ways to describe a merge commit with textual diffs. (1) N independent diffs between each of the parents and the child. We could get this with git diff-tree -m -p $merge but it is mostly useless, because very often many paths in a merge are truly trivial and the ...
Nov 17, 1:55 am 2006
Junio C Hamano
Re: [PATCH] Make "git checkout <branch> <path>" ...
Thanks. I think I sent out the same yesterday morning, though. Message-ID: <7vbqn8msuw.fsf@assigned-by-dhcp.cox.net> The difference is that the one tries to catch misspelled <path>. -
Nov 17, 2:04 am 2006
Michael K. Edwards
Re: [PATCH] Make "git checkout <branch> <path>" ...
Ah. Missed that patch, which is indeed a superset of mine. Looks like you committed it on branch "next"; is that a personal experimental branch, or the integration branch against which patches should be generated? Cheers, - Michael -
Nov 17, 2:18 am 2006
Michael K. Edwards
Re: Cleaning up git user-interface warts
Actually, this "origin" entry does contain "Pull:" lines for all of the branches that were cloned, so that "git pull" fetches and merges updates to all of these branches. (If upstream is in the habit of reverting things, you may need "git pull -f"; I just did that on the git repo to handle a failure to fast-forward on the "pu" branch.) Presumably "git branch -D" should inspect everything under .git/remotes to see whether one or more Pull: lines need to be deleted along with the branch. Currentl...
Nov 17, 2:42 am 2006
Linus Torvalds
"git fmt-merge-msg" SIGSEGV
Ok, this is a _really_ stupid case, and I don't think it matters, but hey, we should never SIGSEGV. Steps to reproduce: mkdir duh cd duh git init-db git-fmt-merge-msg < /dev/null will cause a SIGSEGV in cmd_fmt_merge_msg(), because we're doing a strncmp() with a NULL current_branch. And yeah, it's an insane schenario, and no, it doesn't really matter. The only reason I noticed was that a broken version of my "git pull" into an empty directory would cause this. This silly p...
Nov 17, 2:57 am 2006
Junio C Hamano
Re: Cleaning up git user-interface warts
I am not sure what you mean. .git/remotes files do not describe any relationship between local branches (and that is where one of the problem raised in recent thread -- pull does not notice on which branch you are on and change its behaviour depending on it), so I do not think there is anything gained for "git branch I muttered something in a near-by thread Message-ID: <7vr6w78b4x.fsf@assigned-by-dhcp.cox.net> I am reasonably sure a separate tool (what I tentatively called "maint-rem...
Nov 17, 3:32 am 2006
Junio C Hamano
Re: [PATCH] Make "git checkout <branch> <path>" ...
Actually it is not pushed out anywhere yet but will appear on both 'maint' and 'master' along with other post 1.4.4 fixes and will be contained in the 1.4.4.1 maintenance release. The role of each branch at my public repository is desribed in this message: Message-ID: <7vk62qhy4k.fsf@assigned-by-dhcp.cox.net> http://article.gmane.org/gmane.comp.version-control.git/29951 In general, if your changes and fixes are applicable in isolation to "master", it is most appropriate to send patch...
Nov 17, 4:15 am 2006
Nicolas Vilz
Re: git-PS1 bash prompt setting
Just a note: this doesn't work with bash 3.2. I think they altered the way of trimming variables in this version. on systems with bash 3.2 installed, i get [master!linus-2.6/vm/vm]$ with the example above. on systems with bash 3.1, it works properly. unfortunatelly, i am not so good in bash scripting, so it will take some time for me to fix it. Sincerly Nicolas -
Nov 17, 4:38 am 2006
Junio C Hamano
Re: Cleaning up git user-interface warts
I have no objection to this if it is done in a controlled way that does not make life more difficult for people who work with multiple remote repositories. And I think "git fetch" is the tool for what you want if enhanced properly; see Linus's message that explaind that we already have that support in "manually configurable" form but initializing and maintaining the configuration is currently all manual and can be improved. -
Nov 17, 4:41 am 2006
Eric Wong
Re: git-svn bug?
Sorry for the late replies, I've been caught up with other things. dcommit expects to be run on a git-svn fetch-ed HEAD that is linear superset of remotes/git-svn. That is: remotes/git-svn..HEAD should (ideally) contain no merges, and no root commits. git-svn currently This commit is missing the git-svn-id: line at the bottom. If you simply left it out (private svn repository info), can you check that the URL in this line is actually for the SVN repository you want to commit to? It seems ...
Nov 17, 4:55 am 2006
Junio C Hamano
Re: [PATCH] gitweb: Atom feeds
Seems sane to me. Jakub, how do you like this one? If it looks Ok to you, please arrange to include your one-liner that this depends on and forward a readily applicable patch with appropriate commit log message. -
Nov 17, 5:01 am 2006
Junio C Hamano
Re: [PATCH 4/5] allow deepening of a shallow repository
That does not fly so well. Your fetch-pack.c does this in find_common() and dropping the parsed flag inside unregister causes it to be parsed again later with its true parents, which defeats what the commented part of the code wanted to do. if (!lookup_object(sha1)) die("object not found: %s", line); /* make sure that it is parsed as shallow */ parse_object(sha1); if (unregister_shallow(sha1)) die("no shallow found: %s", line); continue; Although I am reasonably sure we can eventu...
Nov 17, 5:09 am 2006
Carl Worth
Re: Cleaning up git user-interface warts
That's fine with me. Maybe I didn't explain this well before, but my desire is exactly for this to work with multiple repositories. Specifically, what we have in cairo is a "central" shared tree that many people push to. But we only have two branches there, (one for bug-fixes only for our stable releases, and one for ongoing development of new features, and that only of stuff that's well cooked). So that tree looks and acts an awful lot like our cvs tree back in the past. It's often very linea...
Nov 17, 5:18 am 2006
Sean
Re: git-PS1 bash prompt setting
On Fri, 17 Nov 2006 09:38:02 +0100 Sorry bout that, I knew it was a bit fragile. Was rather comical reading Junio's recent message about all the things not to do if you want portable shell code and noticing my 6 line script did 90% of them ;o) Strange though, I downloaded Bash 3.2 and gave it a try and didn't see the problem here.. Wanna try this small change, to see if it helps? : #!/bin/bash BR=$(git symbolic-ref HEAD 2>/dev/null) || { echo "$@" ; exit ; } BR=${BR#refs/heads/} REL=$(g...
Nov 17, 5:20 am 2006
Jakub Narebski
Re: [DRAFT] Branching and merging with git
> object ID, plus a newline.
Nov 17, 5:37 am 2006
Jakub Narebski
Re: [DRAFT] Branching and merging with git
linux@horizon.com wrote: > There is always a current head, known as HEAD.
Nov 17, 5:41 am 2006
Nicolas Vilz
Re: git-PS1 bash prompt setting
That one did the job... funny, removing these two // did the job, for both versions, GNU bash, version 3.1.17(1)-release (powerpc-unknown-linux-gnu) and GNU bash, version 3.2.5(1)-release (x86_64-pc-linux-gnu). Thx for fixing that script. It really helps me. Sincerly Nicolas -
Nov 17, 5:52 am 2006
Johannes Schindelin
Re: [PATCH 4/5] allow deepening of a shallow repository
Hi, I fully agree. Even the OA did not understand the code fully ;-) How about adding "int force_reparse" to the signature of unregister_shallow()? (Just like we added "int cleanup" to get_merge_bases() to avoid pilot errors.) Ciao, Dscho -
Nov 17, 5:52 am 2006
Johannes Schindelin
Re: multi-project repos (was Re: Cleaning up git user-interf...
Hi, I show him how to use it. And that's actually a fine analogy: While the principle of a screw is quite clever, working with it -- even with an electric screwdriver -- is easy. And the most important part: I never read instructions on how to use it. I saw somebody use it and -- voila! -- I I think that the importance of documentation is overrated. Users have come to expect to use programs without reading a manual. DWIM comes to mind. Ciao, Dscho -
Nov 17, 6:02 am 2006
Johannes Schindelin
Re: Cleaning up git user-interface warts
Hi, I introduced the remote.<nick>.{url,fetch,push} entries into the config with the goal to enhance -fetch to remember the current command line with a setting. I was the only one to find that useful. BTW I still would argue that it is better to write the remote information into the config, because you have a saner way to manipulate that from I think a message like "This remote branch no longer exists. Maybe you want to use 'git branch -d <branch>' to remove it locally?" ...
Nov 17, 6:11 am 2006
Thomas Kolejka
Re: Is there a way to trim old SHAs from a git tree (so it's...
-------- Original-Nachricht -------- Datum: Wed, 15 Nov 2006 16:11:57 -0600 Von: Timur Tabi <timur@freescale.com> An: git@vger.kernel.org Is it possible to do this with shallow clone? Shallow clone the local repository my.git (which should be trimmed) starting from the last needed commit to a new local repository my_trimmed.git. And then remove my.git (with something like rm -rf my.git) and rename my_trimmed.git to my.git? Thomas -- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekost...
Nov 17, 6:36 am 2006
Jakub Narebski
Re: [DRAFT] Branching and merging with git
> You can specify what to fetch on the git-fetch command line.
Nov 17, 6:37 am 2006
Junio C Hamano
Re: Cleaning up git user-interface warts
This already should be the case if you use separate-remote. I haven't run "clone --separate-remote" myself for a long time, but the design was certainly to make it behave that way. Specifically, map everything in refs/heads/ at remote to refs/remotes/$origin/ with corresponding names, one-to-one. I do not see much reason to change the mapping of master:origin which is done for the traditional layout. The traditional layout is not suitable for your workflow anyway, and that is why you prefer ...
Nov 17, 7:29 am 2006
Junio C Hamano
Re: [PATCH 4/5] allow deepening of a shallow repository
I do not think that's where its fragility lies. It is that any random place can later call parse_object() on the commit, after you elaborately pre-parsed it with shallow so that it appears to have fewer parents, with the expectation that nobody ever would clear the parsed bit and cause it to be reparsed again. With that assumption, find_common() manipulated the shallow entry after setting that scheme up. A mechanism to prevent the commit from getting re-parsed would have made it more robust. ...
Nov 17, 7:35 am 2006
Jakub Narebski
Re: [PATCH] gitweb: Atom feeds
True. "<pre>" in RSS feed is better (I don't know if you can give CSS Which one liner? As far as I can see the patch does NOT use href(-full=>1,...) but esc_url(...). Perhaps this is for next patch. BTW I have encountered something calles Atom Publishing Protocol (APP): perhaps we should also add this in addition to currently used OPML. -- Jakub Narebski Torun, Poland ShadeHawk on #git -
Nov 17, 7:36 am 2006
Junio C Hamano
Re: Cleaning up git user-interface warts
With separate-remote layout, this can be done without risk of tracking refname clashing with local refname, which was the primary reason for an earlier reluctance. While separate-remote layout also solves Carl's "do not want to track tracking branches remote has" problem, local branch namespace can have both for-others (not necessarily "public" but could be "for colleagues") and throwaway branches, so --all is probably not the right thing to do in most cases. But I am Ok with the approach of ...
Nov 17, 7:41 am 2006
Karl
Re: Cleaning up git user-interface warts
Often, it would be a branch or a tag, so no problem there. For commits in general, it should not be hard to compute the set of branches and tags the commit is part of, and in the (probably) common case where this set has exactly one element, the problem is solved. For the remaining cases, it should not be too horrible to ask the user to describe what is being merged. -- Karl Hasselstr
Nov 17, 8:20 am 2006
Jakub Narebski
Re: Cleaning up git user-interface warts
> created only by "git clone" or by hand.
Nov 17, 8:25 am 2006
Jakub Narebski Nov 17, 8:53 am 2006
Jakub Narebski
Re: Cleaning up git user-interface warts
Han-Wen Nienhuys wrote: > As another example:
Nov 17, 9:25 am 2006
Jakub Narebski
Re: Cleaning up git user-interface warts
What about proposed (and I think not accepted) merge strategy "rebase" (formerly called "subordinate" or something like that)? -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Nov 17, 9:32 am 2006
Jakub Narebski
Re: Cleaning up git user-interface warts
git diff --root HEAD, perhaps? -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Nov 17, 9:45 am 2006
Theodore Tso
Re: [DRAFT] Branching and merging with git
This is really, really good stuff that you've written! Have you any thoughts or suggestions about where this text should end up? Personally, I think this information is actually more important to an end-user than the current "part two" of the tutorial, which discusses the object database and the index file. Perhaps this should be "part 2", and the object database and index file should become "part 3"? It might also be a good to consider moving some of the "discussion" portion the top-level gi...
Nov 17, 11:32 am 2006
Petr Baudis
Re: [PATCH] git-checkout: allow pathspec to recover lost wor...
Wouldn't it be better to fix git-checkout-index to checkout a whole directory if specified? -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) -
Nov 17, 11:44 am 2006
Sean
Re: [DRAFT] Branching and merging with git
On Fri, 17 Nov 2006 10:32:46 -0500 It would be nice to post this information on the Git website and not have it overshadowed by Cogito examples with paragraphs explaining how Cogito makes things easier. The current website distracts users away from learning Git or ever reading about this kind of information. Maybe we can pass a hat around for some funds for a separate Cogito That's quite a good idea. The name was fixed when the option to move this info into the config file was added (remote.&l...
Nov 17, 11:57 am 2006
Nguyen Thai Ngoc Duy
Re: [DRAFT] Branching and merging with git
Or.. find a way to merge cogito back to git :-) /me runs into a nearest bush. -- Duy -
Nov 17, 12:19 pm 2006
Marko Macek
Re: [DRAFT] Branching and merging with git
I agree, this would certainly be the best solution. But it would imply hiding the 'index' by default which would probably an incompatible change. The alternative would be to explain that git is a low level tool suitable mostly for integrators like Linus (that, and that Cogito and/or StGit should be used by developers/contributors). Mark -
Nov 17, 12:25 pm 2006
Shawn Pearce
Re: multi-project repos (was Re: Cleaning up git user-interf...
Although if you have reflog enabled on your current branch there is a 1 character shorter syntax: gitk HEAD@{1}.. as recent Git understands that to mean the value that HEAD just had, which is also what is in ORIG_HEAD. Except that unlike ORIG_HEAD it can also show even older values (e.g. HEAD@{3}, 3 ops back) and it works very, very well on tracking branches. "What did I just fetch in next?" `git log next@{1}..next` -- Shawn. -
Nov 17, 12:26 pm 2006
Petr Baudis
Re: [DRAFT] Branching and merging with git
I think we are trying to figure that out in the last few days in those mammoth threads. UI-wise with no big breakthroughs so far I guess, This is in essence what many people (including Junio) are saying. I'm not saying it's a totally great situation, hence the previous paragraph. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack(...
Nov 17, 12:33 pm 2006
Sean
Re: [DRAFT] Branching and merging with git
On Fri, 17 Nov 2006 23:19:23 +0700 Pasky has already given a lot to Git, and it would be great to see even more merged back into Git where a consensus can be reached. In fact Pasky has said that his plan is to push a lot more towards Git and make Cogito a thinner UI layer. Either way, there's absolutely nothing wrong with people choosing to use Cogito rather than Git. It's just that the separate Cogito tool shouldn't have a place on the Git website any more prominent than say StGit does. The ...
Nov 17, 12:34 pm 2006
Linus Torvalds
Re: multi-project repos (was Re: Cleaning up git user-interf...
Heh. With a finnish keyboard, that "@" is AltGr+'2', and the '{'/'}' is AltGr+'7'/'0', I guarantee that it's not "1 character shorter", it's "three pretty complicated characters longer" and "off the normal path where you hold your fingers on the keyboard ;) And that's not even mentioning that '{'/'}' is a magic sequence for filename expansion to the shell, so every time I see that, I have to think about it (and it turns out that because there is no comma in between there, it's ok. Other...
Nov 17, 12:45 pm 2006
Carl Worth
Re: multi-project repos (was Re: Cleaning up git user-interf...
Yes, this was my exact thought when reading what Linus wrote. ORIG_HEAD might be fine and all, but it pales in functionality compared to what reflog provides. I would very much like to see reflog getting first-class citizen support in git: 1. Be on by default 2. Get documented in all the right places, (much better than adding documentation for ORIG_HEAD in my opinion) 3. Tighter integration with branch manipulations. Do we already delete reflog when deleting a branch? We don't have ...
Nov 17, 12:46 pm 2006
Alexandre Julliard
Re: Cleaning up git user-interface warts
That sounds very interesting. Has it ever been implemented, or only discussed? -- Alexandre Julliard julliard@winehq.org -
Nov 17, 12:49 pm 2006
Carl Worth
Re: multi-project repos (was Re: Cleaning up git user-interf...
It's not even all that convenient on a U.S. keyboard. My pinky suffers a bit having to pop on and off of shift for the '{', '1', '}'. Then again, I don't like having to hold shift down for all of ORIG_HEAD either, (but it's definitely easier in comparison). But since reflog does everything ORIG_HEAD does and more, shall we just clean up the syntax somehow? Ideas anyone? And then fix the documentation to explain that? -Carl
Nov 17, 12:51 pm 2006
Petr Baudis
Re: [DRAFT] Branching and merging with git
It doesn't - look at the "Maintaining external patches" crash course. Porcelains are integral part of the Git environment. I think several people have already tried to explain it before. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) -
Nov 17, 12:53 pm 2006
Shawn Pearce
Re: Cleaning up git user-interface warts
I'm *fully* in favor of the remote.<nick>.{url,fetch,push} entries in the config file. I've pretty much switched every repository to that format at this point. In writing git-gui I'm finding it much, much easier to manage things through repo-config than to do any mucking around in the .git/remotes directory. Yes, the remote files have simple format, but I can get everything in one "git repo-config --list" pull it all into a Tcl array and work with it; using .git/remotes means I have to o...
Nov 17, 12:58 pm 2006
Sean
Re: [DRAFT] Branching and merging with git
On Fri, 17 Nov 2006 17:53:33 +0100 There is enough native Git documentation and hopefully more coming that third party tools should be pushed behind the scenes a bit. At least on the GIT website. Of course there is nothing wrong with having information there, but the main thrust should be about Git and how to use it directly without porcelains. Especially in the light that people have recently expressed a desire to advocate and document the use of native Git more strongly. Having a link to C...
Nov 17, 1:01 pm 2006
previous daytodaynext day
November 16, 2006November 17, 2006November 18, 2006