git mailing list

FromSubjectsort iconDate
Jakub Narebski
Re: Difficulties in advertising a new branch to git newbies
Carl Worth wrote: [cut] By the way, you can get new layout with old git using --use-separate-remote option to git clone (which is present I think from around Jun 2006). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Feb 1, 12:12 am 2007
Junio C Hamano
Re: [PATCH] tone down the detached head warning
That sounds sensible. Another thing I found slightly annoying about branch switching in git-checkout is that we list the paths with local changes only when the tip of the old branch and the new branch are different. Very often I start hacking while on 'master' and later find the change forms a concrete "theme", and then say "git checkout -b that-theme" to switch a branch; in such a case I do want the list of locally modified paths. For example: : gitster project/master; edit foo.c ...
Jan 31, 11:23 pm 2007
Jeff King
Re: [PATCH] tone down the detached head warning
Much improved, IMHO. As an added bonus, I think it creates some feedback that lets a user know when they have mistakenly used 'git checkout' to switch heads when they meant to restore a file. I still wish there was some other language for detaching to a commit specified by a remote tracking branch; it just seems wrong to say "you are not on any branch" right after the user requests to checkout a branch (admittedly not one of their local branches, but for a user merely poking through the reposit...
Jan 31, 11:29 pm 2007
Nicolas Pitre
Re: [PATCH] tone down the detached head warning
But this language convey the truth and users will have to get used to it at some point. We should not hide the fact that HEAD is really detached at that point, otherwise it could be presumed that a commit might update the checked out (tracking) branch which is obviously not the case. Nicolas -
Jan 31, 11:47 pm 2007
Jeff King
Re: [PATCH] tone down the detached head warning
OK, so let's not lie about it, then. But that doesn't mean we can't explain further. What about: $ git checkout origin/pu Detached your HEAD (based on remote origin/pu) -- you are not on any branch ... Except that I think the line is getting a bit long. But the point is to explain _why_ we're detached (you could even put a different note for tags). If a user already knows that 'git checkout v1.4.4.4' is going to put him in a detached state, then he doesn't really care about the message one wa...
Jan 31, 11:54 pm 2007
Junio C Hamano
Re: [PATCH] Make gitk work reasonably well on Cygwin.
I am not in X right now and won't be able to look at it myself tonight. Could folks on MacOS comment on Mark's patch? -
Jan 31, 11:22 pm 2007
Jakub Narebski
Re: two-way sync; from firewalled host
You can on host C pull from host S, and on host C push to host S. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 10:33 pm 2007
Junio C Hamano
[ANNOUNCE] GIT 1.5.0-rc3
It's been a week and a half, and here comes the -rc3 http://www.kernel.org/pub/software/scm/git/ git-1.5.0-rc3.tar.{gz,bz2} (tarball) git-htmldocs-1.5.0-rc3.tar.{gz,bz2} (preformatted docs) git-manpages-1.5.0-rc3.tar.{gz,bz2} (preformatted docs) testing/git-*-1.5.0-rc3-1.$arch.rpm (RPM) Hopefully this will be the last -rc before the final 1.5.0. This contains the "git user's manual" by J. Bruce Fields. While it still has its own "To Do" section, it has already been in a very...
Jan 31, 8:26 pm 2007
Jakub Narebski
Re: [PATCH] tone down the detached head warning
There is new (untested and not complete) command git-remote for that. Although the fact that clone copies all branches and tags (I don't think there is a way to clone only subset of branches), and that fetch is multi branch might be deterrent enough (unless one use one branch per repo). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 8:14 pm 2007
Jakub Narebski
Re: [PATCH] tone down the detached head warning
Ooops, I meant not _only_ a remote tracking branch (so note about detached HEAD shouldn't talk about remote tracking branch unless we make sure that it is remote tracking branch). Sorry. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 7:33 pm 2007
Jakub Narebski
Re: [PATCH] tone down the detached head warning
You can checkout a tag, not a remote tracking branch! -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 7:25 pm 2007
Jeff King
Re: [PATCH] tone down the detached head warning
Huh? $ git-checkout master $ git-checkout origin/pu Note: you are on the remote tracking branch 'origin/pu' If you want to create a new branch from this checkout, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b <new_branch_name> $ git-checkout master $ git-checkout v1.4.4.4 Note: you are not on ANY branch anymore. If you want to create a new branch from this checkout, you may do so (now or later) by using -b with the checkout command ...
Jan 31, 7:27 pm 2007
Jakub Narebski
Re: Difficulties in advertising a new branch to git newbies
Have you read further? git-bisect could (and probably should) use detached HEAD instead of special 'bisect' branch. Doing bisection can be hard work (checking if commit is good or bad might take time) and we don't want to lose it. Besides, history has finite length, and you could get to the state not only via "git checkout", but also via "git reset --hard". Reflog for detached HEAD would help in this. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 7:18 pm 2007
Junio C Hamano
Re: [PATCH] Fail softly if file system does not like test da...
Your patch does not seem to apply. I wonder if the test path needs to be that looooooooooooong to begin with. One thing I noticed on Cygwin is that from inside Cygwin environment t/trash directory becomes unremovable after the original test fails. I am wondering what use it would be to have ISO-8859-1 pathnames in our test. As far as the test is concerned I think the point is to try non-ASCII paths, so I suspect this patch might be less of an impact. Sorry for sending an attachement but in ...
Jan 31, 6:17 pm 2007
Robin Rosenberg
Re: [PATCH] Fail softly if file system does not like test da...
Not really. I had some thought when I did it, but can't recall what it was. Perhaps I wanted to verify that the data I was reading from git-diff wasn't That patch didn't apply here, not even Lets try the old uuencode format. (this is my patch once again wrapped by uuencode). -- robin
Jan 31, 6:36 pm 2007
davidk
Re: More precise tag following
I think it requires GNU Emacs 21. If you'are using Emacs 20, try changing this: (overlay-put ovl 'face (list :background (cdr (assq 'color (cddddr info))))) to (overlay-put ovl 'face (cons 'background-color (cdr (assq 'color (cddddr info))))) -- David Kågedal -
Jan 31, 4:59 pm 2007
davidk
Re: git-blame.el
I only had a very quick glance, but one "problem" is that vc-annotate assumes that what you want to do is to run an annotate/blame command and show the output in another buffer. My solution is a minor-mode that shows the blame directly in the edit buffer, and I'm not sure how easy it would be to convince vc that this is what I want. And I need a way to turn it off again, and maybe some local key bindings when it is active. This all points to the fact that a minor mode is really the thing to use....
Jan 31, 4:53 pm 2007
davidk
Re: git-blame.el
Yeah, I apparently need a (require 'cl) I try to stay away from cl by habit, but since I usually have it required by something I use, I might use it without noticing. So, to try it, add (require 'cl) to the top of the file. -- David Kågedal -
Jan 31, 4:27 pm 2007
Junio C Hamano
Re: Difficulties in advertising a new branch to git newbies
I think you (and others in the thread) are forgetting that moving to a particular state by resetting can create a state that you may want to keep a pointer to, but you do not have any existing ref. That's one of the reasons why we do not merely check if the detached HEAD is not reachable from any of the existing refs when coming back. Instead, we check and warn if the detached HEAD does not exactly match one of the existing refs. Imagine "git bisect" did not exist, or was not powerful enough, ...
Jan 31, 4:20 pm 2007
Theodore Tso
Re: Difficulties in advertising a new branch to git newbies
Is that an important distinction? The way the user got there was by manually specifying the SHA-1 shash of the commit to git-checkout. So if the user could get there once, the user could get there again a second time. Just because we don't have a name to that precise commit inside the git system doesn't necessary mean the user can't get back My personal belief is that covering all the way you can make commits is where you want to be putting the check. If I say something like git checkout f0...
Jan 31, 6:51 pm 2007
Junio C Hamano
Re: Difficulties in advertising a new branch to git newbies
If you mean grep 'git checkout|git reset' perhaps. After checking out a specific commit (because the user was told about the commit out-of-band, say, via e-mail), the user can still I do not think anybody is arguing that particular checkout is dangerous. The warning message is about the fact that your HEAD is now detached, which might not have been what you intended (and you will later get a real warning when you do a really dangerous thing, which is "to come back and lose your point"). - ...
Jan 31, 7:03 pm 2007
Michael S. Tsirkin
git-kill: rewrite history removing a commit
Below is a simple script that rewrites history reverting a single commit. This differs from git-revert in that a commit is completely removed, and is especially useful before one has published a series of commits. Do you find this useful? Comments? Drop me a line. #!/bin/sh commit=$1; #git-rev-list $commit.. revlist=`git-rev-list $commit.. | tac` git reset --hard $commit git reset --hard HEAD~1 for rev in $revlist do git-cherry-pick $rev done -- MST -
Jan 31, 3:55 pm 2007
Junio C Hamano
Re: git-kill: rewrite history removing a commit
"Do you find this useful" is a loaded question. I do it all the time with git-rebase, so the need to remove a botched commit from the history and rebuild the remainder is certainly there, meaning "what your patch does IS useful". I do it all the time with git-rebase, so I personally do not need a new tool to do this, meaning "your patch is not useful to me". When I find master~8 and master~9 to be undesirable, I would do: $ git rebase --onto master~10 master~8 which rebuilds master~7 a...
Jan 31, 4:26 pm 2007
Michael S. Tsirkin
Re: git-kill: rewrite history removing a commit
That's good to know. So it turns out I can just rewrite mine as a one-liner: git-rebase --onto $1~1 $1 Thanks, -- MST -
Jan 31, 4:54 pm 2007
Yann Dirson
Re: git-kill: rewrite history removing a commit
That may be well when no patch depends on the one you kill. In that case, it surely requires some work to handfix things. I'd suggest to use stgit to prepare commits before publication. Even if you don't feel the need for it in everyday life, you can have a one-shot use for this particular problem, by turning your latest commits into an stgit stack, use stgit facilities to handle posible conflicts, and turn them into commits again: The nominal case goes: stg init stg uncommit -n <n...
Jan 31, 4:22 pm 2007
Nicolas Pitre
[PATCH] tone down the detached head warning
This is not meant to frighten people or even to suggest they might be doing something wrong, but rather to notify them of a state change and provide a likely option in the case this state was entered by mistake. Signed-off-by: Nicolas Pitre <nico@cam.org> --- diff --git a/git-checkout.sh b/git-checkout.sh index 8500f51..0bae86e 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -155,9 +155,9 @@ then detached="$new" if test -n "$oldbranch" then - detach_warn="warning: you a...
Jan 31, 3:10 pm 2007
Jeff King
Re: [PATCH] tone down the detached head warning
I like this much better. Though I wonder in Carl's case if we can do even better, since the user is checking out a tracking branch. Does it really make sense to say "you are not on ANY branch"? Maybe instead: -- >8 -- git-checkout: note use of remote tracking branch when making detached warning --- Carl, can you comment? Does this require more explanation about why it matters that you're on a remote tracking branch? git-checkout.sh | 10 +++++++++- 1 files changed, 9 insertions(+), 1 ...
Jan 31, 7:19 pm 2007
Nicolas Pitre
Re: [PATCH] tone down the detached head warning
No. This is misleading. You are _not_ on the remote tracking branch. You just happen to have checked out a commit that came from a tracking branch, but you are still detached from any branch at that point. Nicolas -
Jan 31, 8:11 pm 2007
Jeff King
Re: [PATCH] tone down the detached head warning
Sure, but that is a very subtle distinction that I doubt will make sense to git newbies. Having them check out what they consider to be a branch (and which is, in fact, a line of development -- just not one that you have locally marked as a head) and responding with "you are not on ANY branch" is a little off-putting. Is there some text we can use that makes more sense in all situations? I think part of the "scariness" of the message is that git-checkout does not _usually_ produce output. I won...
Jan 31, 11:00 pm 2007
Carl Worth
Re: [PATCH] tone down the detached head warning
Getting rid of the word "Warning" and naming the remote-tracking branch instead of saying "not on ANY branch", (my, why should git ever yell like that?), are definitely improvements. But they're fairly incremental. The fact is that the user is doing a very simple operation here, (just checking out a state for which git already has a name), and the user is given 3 lines of text to read and try to understand, (what the heck is a "remote tracking branch" anyway?). It still looks to me like the kind ...
Jan 31, 7:54 pm 2007
Jakub Narebski
Re: More precise tag following
Do you use new enough version of git, one which has git-blame --incremental? -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 1:35 pm 2007
Peter Eriksen
Re: More precise tag following
I saw that mail just after I responded. The newest version does not work either, that is, it does not work in the same way, as the old version. Closing Emacs I can see, that Emacs did fork of "git blame" processes. So it is just the colours, I cannot see. Peter -
Jan 31, 1:12 pm 2007
davidk
Re: More precise tag following
Probably you forgot to use the latest version :-) See my mail with the subject line "git-blame.el". -- David Kågedal -
Jan 31, 1:04 pm 2007
Johannes Sixt
Re: [PATCH] Make gitk work reasonably well on Cygwin.
You patch does not improve gitk under MinGW. The layout becomes less useful because the lower part becomes too high, so that the Search bar and some part of the patch + file list windows is not visible. :( -- Hannes -
Jan 31, 12:33 pm 2007
Johannes Schindelin
Re: [PATCH] Make gitk work reasonably well on Cygwin.
Hi, Ah yes, I don't use gitk all that often, and I did not realize that there was a search bar. Still, I think Mike's patch is too verbose, i.e. it is not minimal enough ;-) Ciao, Dscho -
Jan 31, 12:44 pm 2007
Johannes Sixt
Re: [PATCH] Make gitk work reasonably well on Cygwin.
Your mailer has garbled your patch. But once this is fixed, it works quite well, both on my Linux box with Tk 8.4, where gitk's layout was suboptimal, as well as under MinGW, also with Tk 8.4. Thank you, you saved my day! -- Hannes -
Jan 31, 12:28 pm 2007
Peter Eriksen
Re: More precise tag following
I saved the elisp code in a file .emacs.d/git-blame.el, and loaded it with M-x load-file. Then I visited git/cache.h, and typed M-x git-blame-mode, but the background colours did not change. What did I forget to do? Regards, Peter -
Jan 31, 12:12 pm 2007
davidk
[PATCH] Improved error message from git-rebase
If the index wasn't clean, git-rebase would simply show the output from git-diff-index with no further comment to the user. --- git-rebase.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) git-rebase sometimes fails without giving a useful error message. Try this: $ touch asdf $ git add asdf $ git rebase origin/master A asdf $ diff --git a/git-rebase.sh b/git-rebase.sh index 99cedad..9d2f71d 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -249,7 +249,...
Jan 31, 12:12 pm 2007
Mike Nefari
[PATCH] Make gitk work reasonably well on Cygwin.
The gitk gui layout was completely broken on Cygwin. If gitk was started without previous geometry in ~/.gitk, the user could drag the window sashes to get a useable layout. However, if ~/.gitk existed, this was not possible at all. The fix was to rewrite makewindow, changing the toplevel containers and the particular geometry information saved between sessions. Numerous bugs in both the Cygwin and the Linux Tk versions make this a delicate balancing act: the version here works in both but many sub...
Jan 31, 10:50 am 2007
Alex Riesen
Re: [PATCH] Make gitk work reasonably well on Cygwin.
The patch is broken very spectacularly. How have you made it? Copy-paste in the browsers window? -
Jan 31, 12:36 pm 2007
Mark Levedahl
Re: [PATCH] Make gitk work reasonably well on Cygwin.
I will resend tonight when I get access to an account where I can control _________________________________________________________________ Get live scores and news about your team: Add the Live.com Football Page http://www.live.com/?addtemplate=football -
Jan 31, 12:39 pm 2007
Johannes Schindelin
Re: [PATCH] Make gitk work reasonably well on Cygwin.
Hi, This was noted before. I tried to argue with Paulus (now Cc'ed, as per SubmittingPatches) that he should include it in gitk. Somehow this did not have the effect intended be me. I also verified that with my Tcl/Tk installation on MacOSX, a patch like this was needed. IIRC Paulus argued that I should get a native TclTk, which is supposed to work (though not with the paths on Cygwin, oh well). FWIW my patch is less intrusive: gitk | 22 ++++++++++++++++++---- 1 files changed, 1...
Jan 31, 11:17 am 2007
Mark Levedahl
Re: [PATCH] Make gitk work reasonably well on Cygwin.
The gitk gui layout was completely broken on Cygwin. If gitk was started without previous geometry in ~/.gitk, the user could drag the window sashes to get a useable layout. However, if ~/.gitk existed, this was not possible at all. The fix was to rewrite makewindow, changing the toplevel containers and the particular geometry information saved between sessions. Numerous bugs in both the Cygwin and the Linux Tk versions make this a delicate balancing act: the version here works in both but many ...
Jan 31, 10:09 pm 2007
Mark Levedahl
Re: [PATCH] Make gitk work reasonably well on Cygwin.
The gitk gui layout was completely broken on Cygwin. If gitk was started without previous geometry in ~/.gitk, the user could drag the window sashes to get a useable layout. However, if ~/.gitk existed, this was not possible at all. The fix was to rewrite makewindow, changing the toplevel containers and the particular geometry information saved between sessions. Numerous bugs in both the Cygwin and the Linux Tk versions make this a delicate balancing act: the version here works in both but many ...
Jan 31, 9:41 pm 2007
Mark Levedahl
Re: [PATCH] Make gitk work reasonably well on Cygwin.
The current gitk is completely broken on Windows using the current Active State Tcl/Tk release as well: the display is very similar to what is shown on cygwin. The basic problem seems to be that Tk's geometry manager is buggy, on all platforms, not just cygwin. I found many variations of the gitk layout that broke on Linux in similar ways to the breakage on cygwin on my way to creating this patch (including ones that worked on Cygwin/Windows but not on Linux). So, arguments to the effect of "get...
Jan 31, 12:00 pm 2007
Jakub Narebski
Re: Difficulties in advertising a new branch to git newbies
I'd like to have some configuration option to make git more careful and prohibit commiting in detached HEAD state (the default being that But the initial checkout of a non-branch is place where we can notify user that he does something unexpected / unusual. Though I think that single-line warning would be enough... -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 10:53 am 2007
Nicolas Pitre
Re: Difficulties in advertising a new branch to git newbies
And what is the purpose of such an artificial annoyance that no one will turn on on purpose? You have to _realize_ that there is nothing wrong with such commits. Merely having a config option to prohibit them not only is senseless There is a balance problem there. Too large a message might be annoying but a too short one might not convey enough information not to be yet more confusing. Nicolas -
Jan 31, 11:15 am 2007
Alex Riesen
[PATCH] Fix git-update-index to work with relative pathnames
In particular, it fixes the following (typical for cygwin) problem: $ git-update-index --chmod=-x ../wrapper/Jamfile fatal: git-update-index: cannot chmod -x '../wrapper/Jamfile' Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- builtin-update-index.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
Jan 31, 9:48 am 2007
Jakub Narebski
Re: What did I just fetch?
You should have also something like below: * refs/remotes/origin/master: fast forward to branch 'master' of git://source/project $ git diff --summary 1732a1f..73a2acc $ git diff --summary ORIG_HEAD..HEAD Or, if you want to see the log instead: $ git log 1732a1f..73a2acc $ git log origin/master By the way, you get summary automatically when doing pull, on merge (but not on fast-forward, I think). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git -
Jan 31, 9:15 am 2007
davidk
git-blame.el
Here's another version of git-blame.el that automatically tries to create a sensible list of colors to use for both light and dark backgrounds. Plus a few minor fixes. To use: 1) Load into emacs: M-x load-file RET git-blame.el RET 2) Open a git-controlled file 3) Blame: M-x git-blame-mode ;;; git-blame.el ;; David Kågedal (defun color-scale (l) (let* ((colors ()) r g b) (setq r l) (while r (setq g l) (while g (setq b l) (while b...
Jan 31, 9:04 am 2007
previous daytodaynext day
January 30, 2007January 31, 2007March 1, 2007