[git-users] git diff -w --name-only does not work
When I run git diff -w --name-only I get a file listed. When I then run git diff -w filename I get no output. When I run git diff filename I see that there are whitespace changes. How do I get the names of files with non-whitespace changes? Aren't -w --name-only the correct options? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] git diff -w --name-only does not work
On Mon, Jun 09, 2014 at 11:30:15PM -0700, André Hänsel wrote: When I run git diff -w --name-only I get a file listed. When I then run git diff -w filename I get no output. When I run git diff filename I see that there are whitespace changes. How do I get the names of files with non-whitespace changes? Aren't -w --name-only the correct options? It does look like you have found a bug; `-w` and `--name-only` does not seem to play nice together: % git --version git version 2.0.0 % git diff diff --git a/foo b/foo index da91582..e1dac5f 100644 --- a/foo +++ b/foo @@ -1,3 +1,3 @@ -alsdkfja aldkfj kjfdlakjd aldfjal alsdjfla ldjalfaj +alsdkfja aldkfj kjfdlakjd aldfjal alsdjfla ldjalfaj aldkfj dalfjad lajdf ajfal ljl asldfjal lajf aalkjad alsdjfl akjdfl ajdfl adjajf aj. % git diff -w % git diff -w --name-only foo In the same vein, `-w` and `--name-status` doesn't seem to play well together either: % git diff --name-status -w M foo It also seems `-b` suffers from similar problems when combined with `--name-{only,status}`. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org jabber: mag...@therning.org twitter: magthe http://therning.org/magnus In a hierarchy, every employee tends to rise to his level of incompetence. -- The Peter Principle pgpNmwJeHu3DB.pgp Description: PGP signature
[git-users] Re: fatal: protocol error: bad line length character
On Monday, June 9, 2014 9:52:44 PM UTC+2, Clinton Parham wrote: Hello git users, I'm trying to run a git server on my Windows 7 workstation. I've downloaded the Windows installer from http://git-scm.com/downloads and I'm able to clone other repositories. Now I want to allow others to clone my repositories. But when testing my setup, I get these errors (both client and server are on the same box): *Client side:* F:\gitgit clone git://localhost:9419/test.git test2 Cloning into 'test2'... fatal: unable to access 'https://localhost:9419/test.git/': Unknown SSL protocol error in connection to localhost:9419 It strikes me as odd that it appears to clone over HTTPS, when you specified a git:// url.. To the best of my knowledge, cloning over git:// (the Git protocol) has nothing to do with HTTPS, and by extension, should not involve SSL. Could it be that you are somehow running a HTTPS service on port 9419, and Git is falling back to use this as protocol? Check what process is using the port, kill the service, restart the daemon and try again. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: git repository versioned .config file?
For instance I want to put some git extensions into my project git repository. The documentation states that the path must be accessible through git --ext-path. This can be altered either globally or per-repository basis in .config. But this file seems to be unversioned. If we in future will have a need to move/rename our extensions folder - everybody who contributes to project will have to manually alter .config file in his repository copy. вторник, 3 июня 2014 г., 14:24:43 UTC+3 пользователь Pierre-François CLEMENT написал: I want to extend git commands set on per-repository basis and therefore I need to have VERSIONED sort of .config file You can use the repository's .git/config file to set repo-specific configuration, but why would you want it to be versioned in the project itself? It'd force anybody who can clone the repo to have the same config file. I guess that the closer you could get to this would be to version a, say, git.config file in the project root and then replace the repo's .git/config file with a symlink to it. But keep in mind that it'll still require whoever can clone the repo to decide to do so, you won't be able to force them -- and doing so will prevent them from having their own per-repository config file. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: git repository versioned .config file?
Symlinks has nothing to do with the fact that I want the part of the configuration to be versioned. BTW on windows symlinks work kinda differently. Of course since Vista/Server 2008 we have mklink bundled, but I don't think msys.win will handle this situation correctly. Nevertheless the fact that the path to project-specific git extensions can change in futer remains true. So the only way to handle this correctly is to allow repository git configuration be versioned. At least a part of it. вторник, 3 июня 2014 г., 15:12:09 UTC+3 пользователь Magnus Therning написал: On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote: I want to extend git commands set on per-repository basis and therefore I need to have VERSIONED sort of .config file You can use the repository's .git/config file to set repo-specific configuration, but why would you want it to be versioned in the project itself? It'd force anybody who can clone the repo to have the same config file. I guess that the closer you could get to this would be to version a, say, git.config file in the project root and then replace the repo's .git/config file with a symlink to it. But keep in mind that it'll still require whoever can clone the repo to decide to do so, you won't be able to force them -- and doing so will prevent them from having their own per-repository config file. Something I'd be more comfortable with is making `git-config` a shell script containing calls to `git config --local`. Yes, it's then a two-step procedure, and people might forget to perform the second step, but *I* am in control and a `git pull` will not silently cause any config changes. /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org javascript: jabber: mag...@therning.org javascript: twitter: magthe http://therning.org/magnus What gets measured, gets done. -- Tom Peters -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: git repository versioned .config file?
The question is in fact not to let people not to perform these steps manually. вторник, 3 июня 2014 г., 15:32:26 UTC+3 пользователь Pierre-François CLEMENT написал: Sounds good enough. You could probably even embed it into a Makefile or a Gruntfile or whatever-file you're using if you already have one. And about the two-steps thing, you might want to get them to use a post-merge hook to automate it. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: git repository versioned .config file?
Post-merge hook? Anyways someone needs to set up this post-merge hook in a manual fashion. вторник, 3 июня 2014 г., 15:34:12 UTC+3 пользователь John McKown написал: On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org javascript: wrote: On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote: I want to extend git commands set on per-repository basis and therefore I need to have VERSIONED sort of .config file You can use the repository's .git/config file to set repo-specific configuration, but why would you want it to be versioned in the project itself? It'd force anybody who can clone the repo to have the same config file. I guess that the closer you could get to this would be to version a, say, git.config file in the project root and then replace the repo's .git/config file with a symlink to it. But keep in mind that it'll still require whoever can clone the repo to decide to do so, you won't be able to force them -- and doing so will prevent them from having their own per-repository config file. Something I'd be more comfortable with is making `git-config` a shell script containing calls to `git config --local`. Yes, it's then a two-step procedure, and people might forget to perform the second step, but *I* am in control and a `git pull` will not silently cause any config changes. Magnus, I haven't even really looked into this, but if you are using Linux with the BASH shell, you might want to look at using the alias command in your ~/.profile so that the command git invokes your own shell script. This is rather easy with a line something like: alias git=~/bin/mygit Now, when the BASH shell sees the git command, it actually invokes the ~/bin/mygit program (which is a shell script). I haven't looked at writing such a script, but I think that you'd basically just check to see if the first parameter is config, and, if not, then invoke the normal git program. If the first parameter is config, then force the --local parameter (or not, whatever you decide you need). Of, if by chance, you actually want to directly run git without using the alias, just enclose the git command in marks, like: git config --global ... The plus of this is that such a modification will only affect you, not anyone else who may be on that machine. The minus is the same. Whether it is a plus or a minus depends on your wants: only modify git for me, or modify git for everybody. Wish I had the time right now to work on that script. Hopefully this is of some help. But, like when I was in cleaning: I don't _do_ Windows! grin/ /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org javascript: jabber: mag...@therning.org javascript: twitter: magthe http://therning.org/magnus What gets measured, gets done. -- Tom Peters -- There is nothing more pleasant than traveling and meeting new people! Genghis Khan Maranatha! John McKown -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: git repository versioned .config file?
It seems there is no comfortable platform-independed way to do this. Maybe feature request? вторник, 3 июня 2014 г., 15:34:12 UTC+3 пользователь John McKown написал: On Tue, Jun 3, 2014 at 7:12 AM, Magnus Therning mag...@therning.org javascript: wrote: On Tue, Jun 03, 2014 at 04:24:43AM -0700, Pierre-François CLEMENT wrote: I want to extend git commands set on per-repository basis and therefore I need to have VERSIONED sort of .config file You can use the repository's .git/config file to set repo-specific configuration, but why would you want it to be versioned in the project itself? It'd force anybody who can clone the repo to have the same config file. I guess that the closer you could get to this would be to version a, say, git.config file in the project root and then replace the repo's .git/config file with a symlink to it. But keep in mind that it'll still require whoever can clone the repo to decide to do so, you won't be able to force them -- and doing so will prevent them from having their own per-repository config file. Something I'd be more comfortable with is making `git-config` a shell script containing calls to `git config --local`. Yes, it's then a two-step procedure, and people might forget to perform the second step, but *I* am in control and a `git pull` will not silently cause any config changes. Magnus, I haven't even really looked into this, but if you are using Linux with the BASH shell, you might want to look at using the alias command in your ~/.profile so that the command git invokes your own shell script. This is rather easy with a line something like: alias git=~/bin/mygit Now, when the BASH shell sees the git command, it actually invokes the ~/bin/mygit program (which is a shell script). I haven't looked at writing such a script, but I think that you'd basically just check to see if the first parameter is config, and, if not, then invoke the normal git program. If the first parameter is config, then force the --local parameter (or not, whatever you decide you need). Of, if by chance, you actually want to directly run git without using the alias, just enclose the git command in marks, like: git config --global ... The plus of this is that such a modification will only affect you, not anyone else who may be on that machine. The minus is the same. Whether it is a plus or a minus depends on your wants: only modify git for me, or modify git for everybody. Wish I had the time right now to work on that script. Hopefully this is of some help. But, like when I was in cleaning: I don't _do_ Windows! grin/ /M -- Magnus Therning OpenPGP: 0xAB4DFBA4 email: mag...@therning.org javascript: jabber: mag...@therning.org javascript: twitter: magthe http://therning.org/magnus What gets measured, gets done. -- Tom Peters -- There is nothing more pleasant than traveling and meeting new people! Genghis Khan Maranatha! John McKown -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Re: git repository versioned .config file?
SRY: The question is in fact not to let people to perform these steps manually. вторник, 10 июня 2014 г., 14:09:57 UTC+3 пользователь Alexander Zorgiev написал: The question is in fact not to let people not to perform these steps manually. вторник, 3 июня 2014 г., 15:32:26 UTC+3 пользователь Pierre-François CLEMENT написал: Sounds good enough. You could probably even embed it into a Makefile or a Gruntfile or whatever-file you're using if you already have one. And about the two-steps thing, you might want to get them to use a post-merge hook to automate it. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Get file SHA just prior to tag
On Monday, June 9, 2014 12:36:57 PM UTC-7, Dale Worley wrote: You're not clear what the question is. You ask which version of a file is in the tag and the answer is the version with hash 990c3e0f7efc8ddf869dbb39ba0065c9e9578df4. Do you mean Which commit introduced that version of that file?, What are the contents of that file in that tag? ... ? Dale The SHA for the tag is not the SHA for the individual file. OK thats obvious to experienced Git users, and the main point here. He wants to know what the SHA for the file is just prior to the tag, (shown in Gitk BTW) . I have shown him how to get the contents of a file by tag, but he wants the SHA. ls-tree does not satisfy this as it associates a SHA with the file, a SHA that is not listed in git log output. Why does ls-tree do this? How can he get a SHA listed in git log, that was created just before the tag? ( without using dates which are FU'ed for extraneous reasons) Hope thats clearer, thanks. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: fatal: protocol error: bad line length character
Yup, I agree that SSL being involved is odd. A 'netstat -ano' doesn't list any process on 9419. Also, when I down the git daemon, a telnet to localhost:9419 fails so I don't believe anything else is listening on that port. A similar telnet works of course when the git daemon is running. Also interesting is that the same clone works when I run it under cygwin! On Tuesday, June 10, 2014 4:15:23 AM UTC-4, Thomas Ferris Nicolaisen wrote: On Monday, June 9, 2014 9:52:44 PM UTC+2, Clinton Parham wrote: Hello git users, I'm trying to run a git server on my Windows 7 workstation. I've downloaded the Windows installer from http://git-scm.com/downloads and I'm able to clone other repositories. Now I want to allow others to clone my repositories. But when testing my setup, I get these errors (both client and server are on the same box): *Client side:* F:\gitgit clone git://localhost:9419/test.git test2 Cloning into 'test2'... fatal: unable to access 'https://localhost:9419/test.git/': Unknown SSL protocol error in connection to localhost:9419 It strikes me as odd that it appears to clone over HTTPS, when you specified a git:// url.. To the best of my knowledge, cloning over git:// (the Git protocol) has nothing to do with HTTPS, and by extension, should not involve SSL. Could it be that you are somehow running a HTTPS service on port 9419, and Git is falling back to use this as protocol? Check what process is using the port, kill the service, restart the daemon and try again. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Get file SHA just prior to tag
From: John Fisher fishook2...@gmail.com The SHA for the tag is not the SHA for the individual file. OK thats obvious to experienced Git users, and the main point here. He wants to know what the SHA for the file is just prior to the tag, (shown in Gitk BTW) . I have shown him how to get the contents of a file by tag, but he wants the SHA. ls-tree does not satisfy this as it associates a SHA with the file, a SHA that is not listed in git log output. Why does ls-tree do this? How can he get a SHA listed in git log, that was created just before the tag? ( without using dates which are FU'ed for extraneous reasons) There is still some confusion here. First, a tag is a name for a commit, not a bookmark that separates commits before the tag from commits after the tag. The command git tag tagname should print the commit id (which is a hash) for the commit named by the tag. git ls-tree lists the files that are contained in a commit. It also takes arguments to list only specific files within the commit. So I can say: $ git ls-tree -r HEAD .bash_login 100644 blob 563ba2e54ebdf3977cf2ab744eaa4d457b58fc24.bash_login This lists the SHA of the version of .bash_login which is in the commit HEAD. Of course, I can replace HEAD with a tag name. You ask He wants to know what the SHA for the file is just prior to the tag. Do you mean, the SHA for the version of the file that precedes the version in the tag? There are two ways to answer that. One is What is the SHA for the file in the commit just before the commit named by the tag? That is easy to answer, because tagname^ names the commit before the commit tagname. I think he's asking What is the SHA for the last different version of the file before the tag? I think what will work is: 1) Find the first commit before the tag that has a different content for the file: $ git log -n 1 tagname^ -- filename commit b3282e06e39e1ddaa44806eadbfac06a19fabe09 ... 2) Find the SHA of the file as it is in that commit $ git ls-tree commit -- filename 100644 blob filehash filename 3) Get the contents of the file within that commit $ git cat-file blob filehash Dale -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Get file SHA just prior to tag
On Tuesday, June 10, 2014 11:55:04 AM UTC-7, Dale Worley wrote: I think what will work is: 1) Find the first commit before the tag that has a different content for the file: $ git log -n 1 tagname^ -- filename commit b3282e06e39e1ddaa44806eadbfac06a19fabe09 ... 2) Find the SHA of the file as it is in that commit $ git ls-tree commit -- filename 100644 blob filehashfilename 3) Get the contents of the file within that commit $ git cat-file blob filehash Dale Yes thats what he wants, I think. He'll use it to step back through commits to see when a bug was introduced. I still don't understand what the commit-SHA given out by git ls-tree is for? If it doesn't correspond to a commit on the file as seen in git log, what's it used for? thanks. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: fatal: protocol error: bad line length character
On Monday, June 9, 2014 9:52:44 PM UTC+2, Clinton Parham wrote: Hello git users, I'm trying to run a git server on my Windows 7 workstation. I've downloaded the Windows installer from http://git-scm.com/downloads and I'm able to clone other repositories. Now I want to allow others to clone my repositories. But when testing my setup, I get these errors (both client and server are on the same box): *Client side:* F:\gitgit clone git://localhost:9419/test.git test2 Cloning into 'test2'... fatal: unable to access 'https://localhost:9419/test.git/': Unknown SSL protocol error in connection to localhost:9419 It strikes me as odd that it appears to clone over HTTPS, when you specified a git:// url.. To the best of my knowledge, cloning over git:// (the Git protocol) has nothing to do with HTTPS, and by extension, should not involve SSL. Could it be that you are somehow running a HTTPS service on port 9419, and Git is falling back to use this as protocol? Check what process is using the port, kill the service, restart the daemon and try again. Yup, I agree that SSL being involved is odd. A 'netstat -ano' doesn't list any process on 9419. Also, when I down the git daemon, a telnet to localhost:9419 fails so I don't believe anything else is listening on that port. A similar telnet works of course when the git daemon is running. Also interesting is that the same clone works when I run it under cygwin! You mean when running the git clone command on cygwin, or running the daemon on cygwin, or both? In any case, I'm lost. Perhaps someone on the msysgit list can answer (on cc now). -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: fatal: protocol error: bad line length character
On Tuesday, June 10, 2014 11:47:38 PM UTC+2, Thomas Ferris Nicolaisen wrote: In any case, I'm lost. Perhaps someone on the msysgit list can answer (on cc now). Unfortunately, Google Groups blocks replies on that CC who are not also members on this list, so here's a link to the thread in that other group: https://groups.google.com/d/topic/msysgit/Xc_hujIT_wQ/discussion There's a reply/idea already. I'd recommend you follow up over there, Clinton. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.