[git-users] having trouble compile git from source
I am trying to install git 2.3.6 on rhel6. Had trouble while it is installing gui, so I decided to turn off gui install by make NO_TCLTK=YesPlease. However, during the install step, it failed at git-gui again. Here is the error message. How do I force it not to install gui? make[1]: Leaving directory `/rsrch2/rists/djiao/Downloads/git-2.3.6/gitk-git' make -C git-gui gitexecdir='/rsrch2/rists/djiao/apps/git-2.3.6/libexec/git-core' install make[1]: Entering directory `/rsrch2/rists/djiao/Downloads/git-2.3.6/git-gui' INDEX lib/ DEST /rsrch2/rists/djiao/apps/git-2.3.6/libexec/git-core INSTALL 755 git-gui INSTALL 755 git-gui--askpass LINKgit-citool - git-gui DEST /rsrch2/rists/djiao/apps/git-2.3.6/share/git-gui/lib INSTALL 644 tclIndex install: cannot stat `lib/tclIndex': No such file or directory make[1]: *** [install] Error 1 make[1]: Leaving directory `/rsrch2/rists/djiao/Downloads/git-2.3.6/git-gui' make: *** [install] Error 2 -- 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 push does not update remote workdir
On Fri, 24 Apr 2015 12:54:57 -0700 (PDT) Konrád Lőrinczi klorin...@gmail.com wrote: Well, I noticed, that I had a bug in post-receive hook, so here is the fixed one: #!/bin/sh export GIT_WORK_TREE=/domains/site/test-workdir/ export GIT_DIR=/domains/git/site-bare.git/ cd $GIT_DIR git checkout -f However, the problem still remains. Also GIT_TRACE=1 did not help, there was no any useful info. GIT_TRACE only traces your local Git instance, and has nothing to do with the Git process working on the server side. On the other hand, exporting GIT_TRACE=1 will be an interesting thing to do before running `git checkout -f` if you're debugging your hook script like I have outlined in my first response. P.S. I would restate that you supposedly has to start using `set -e` or, better, `set -e -u` in your hook script. Start with [1] and the pointers it gives. Otherwise your hook script, as a program, is almost as broken with regard to error handling as a typical PHP program: when an error happens, it gets logged somewhere and the execution continues. This is a broken logic: if you *know* you should ignore an error running a particular command, you specifically arrange for ignoring its error return, like with a_command_which_is_ok_to_fail || true to make the script not exit when that command fails. Otherwise anything which gone wrong will terminate the scipt. 1. http://serverfault.com/q/143445/118848 -- 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] difference between working copy and working directory
On Mon, 27 Apr 2015 09:34:10 -0700 (PDT) Pawel Por porpa...@gmail.com wrote: Is there any difference between working copy and working directory ? If so what's the difference ? Officially, Git uses the terms work tree and working tree to refer to a directory which contains files you're working on. In more technical terms, this is the directory which content Git uses to physically represent what's recorded in its index (also called the staging area). That is, when you `git checkout` a branch (or directly a revision), Git first populates its index with the state of all the files representing your project at that branch/revision and then updates the work tree. When you run `git status` Git as well compares what's in the index with what's in the work tree. As to the validity of your terminology, this is a philosophical question ;-) As you can see, from a purist approach, all the terms you mentioned are incorrect, but from a more down-to-earth standpoint they seem to be mostly OK. Mostly, because you should be careful with the term working directory: this is a concept existing in many (most?) popular operating systems in wide use today, and it means a special property of any running process (a program being executed). This property contains the path name of a directory that process explicitly set as its current, or inherited from its parent process. This property is needed for the operating system to know what to do if the process asks it to access a file with a relative name, like in «hey, OS, please open a file named foo/bar.txt»; in this case the OS gets the working directory of that process, prepends its name to the name of the file it was asked to open and proceeds with the request. The working directory is also the current directory in a shell -- that is, the thing you operate with the `cd` command in most shells. Working copy is better but then again, what is it a copy of? Note that those coming from Subversion and some other popular SCMs might use the term checkout or current checkout even though this usage is quite dubious when it comes to Git. In the end, when talking about Git, I'd stick to work tree or working tree. -- 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] difference between working copy and working directory
Hi Is there any difference between working copy and working directory ? If so what's the difference ? thanks for information -- 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 push does not update remote workdir
I learned a lot about git usage from you, so thanks for your suggestions help! I tried your suggestions, and found no additional error message, which can explain why the working dir is not updated. BUT: you wrote, that the working dir is updated only, when there was at least one change in local repo, it was committed, then I push to the git bare repo on the server. Yeah, it seems, this was the cause why the working dir was not updated. I tried the post-update hook, too, but no difference. My problems: 1) Basically I would like to update the working dir, when I do a git push to the server. Is it possible? 2) My second problem, what happens, when I delete a file from the local repo? Is it also deleted from the working dir? So git checkout -f does a copy (which leaves deleted files in target dir)? or does a mirror (which deletes the deleted files from target dir, so will always have exactly the same content )? Basically I would need mirroring. Any ideas for these 2 problems? Thanks is advance, Konrad Lorinczi 2015. április 24., péntek 21:42:47 UTC+2 időpontban Konstantin Khomoutov a következőt írta: On Fri, 24 Apr 2015 11:59:33 -0700 (PDT) Konrád Lőrinczi klor...@gmail.com javascript: wrote: [...] mkdir /domains/git/site-bare.git cd /domains/git/site-bare.git git --git-dir=. --work-tree=/domains/site/test-workdir/. init git config receive.denycurrentbranch ignore cd /domains/git/site-bare.git/hooks nano post-receive # add the following content until # end #!/bin/sh export GIT_WORK_TREE=/domains/site/test-workdir/. export GIT_DIR=/domains/git/site-bare.git/.git ^^^ This. The GIT_DIR environment variable tells Git where the Git database directory is located. But a bare Git repo *is* the Git database directory in itself. That makes it different from a normal Git repository, in which the root directory is the so-called work tree, and the Git database directory is typically located beneath and called .git. Obviously, in a bare repo, there's no .git subdirectory. Bare repos even typically have the .git suffix appended to their names precisely to signify they already are .git directories. [...] git push web-remote master Once I also got the [...] remote: fatal: Not a git repository: '/domains/git/site-bare.git/.git' That most probably was the message a Git program run from your hook script yelled at you. Since you did not enable/provide proper error reporting in your hook script, even though `git checkout` failed with that error message, the script continued to chug along and hence the receive operation succeeded. [...] Later I did not get such Not a git repository error. Did the hook run? If you had no new commits to push, the hook was not run. But anyway, the workdir is not filled with content, this is my problem. UPDATE: If I do git checkout -f of the server, then the workdir is updated. So this means that the post-receive hook is not executed. Any idea why the remote workdir is not updated? There are many issues with your approach. The first one is that your GIT_DIR setting is incorrect (and outright nonsensical) as I expained above. But I'd say it is not needed at all: when the hook runs, it already has all the Git-related settings in its environment. So you only has to provide it with the location of your work tree. The second problem is that the hook is supposed to fail (that is, to exit with a non-zero exit code; supposedly having printed out an error message to the standard error stream before doing that) as soon as it encounters an error. In your case I'd start with placing the line set -e -u somewhere right after the shebang line (that #!/bin/sh thing). This would ask the shell to crash and burn as soon as any command it executed failed (and that was not properly handled by the script) or the script attempts to dereference a variable which was not assigned a value. I would also say that the correct event for the hook like yours is post-update, not post-receive. Receiving deals with, well, receiving, while post-update means the heads (branches) were already updated with their new commits. And another pro-tip. If you need to debug a script, running non-interactively, a useful trick is to wrap it in another script, something like this: #!/bin/sh set -e -u orig=`dirname '$0'`/post-update.orig exec /bin/sh -x $orig $@ /var/tmp/my-hook-trace.log 21 Where your post-update.orig is the original script to debug, and the script I showed is temporarily made the post-update hook. The -x command-line option instructs the shell to trace the execution of the script it's told to run, and that trace ends up in the log file -- with all the diagnostic and error messages. -- You received this message because you are subscribed to the
[git-users] Re: having trouble compile git from source
On Monday, April 27, 2015 at 11:49:36 PM UTC+3, Oscar wrote: I am trying to install git 2.3.6 on rhel6. Had trouble while it is installing gui, so I decided to turn off gui install by make NO_TCLTK=YesPlease. However, during the install step, it failed at git-gui again. Here is the error message. How do I force it not to install gui? make[1]: Leaving directory `/rsrch2/rists/djiao/Downloads/git-2.3.6/gitk-git' make -C git-gui gitexecdir='/rsrch2/rists/djiao/apps/git-2.3.6/libexec/git-core' install Comment out the line calling make -C git-gui in the top-level Makefile. [...] -- 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.