git mailing list

FromSubjectsort iconDate
Junio C Hamano
Re: git-checkout and SUBDIRECTORY_OK='Yes'
Personally, I do not like this kind of question. If it were known to be safe we would have set it so already. Ah, I must be tired. Sorry. Let's try again. git-checkout does two very different things, and what they should do when run from subdirectory are probably quite different. It does not make any sense to run the one that switches the current head from anywhere other than the toplevel: git-checkout [-f] <branch> git-checkout [-b <branch>] <committish> We could of ...
Dec 22, 9:58 pm 2005
Jon Nelson
git-checkout and SUBDIRECTORY_OK='Yes'
Is it safe to set SUBDIRECTORY_OK='Yes' in git-checkout.sh? What about the other *.sh that don't already set it? -- Jon Nelson <jnelson-git@jamponi.net> -
Dec 22, 9:20 pm 2005
Junio C Hamano
Re: git /objects directory created 755 by default?
Do you need a working tree to run gitk? -
Dec 22, 9:19 pm 2005
Junio C Hamano
Re: [PATCH] whatchanged: customize diff-tree output
For scripted use you can give command line arguments yourself to whatchanged and you can bypass the repoconfig. I do not think whatchanged is meant for scripted use, though --- it is such a simple script, and if you want to build on it to do something more elaborate, I think you would be better off writing those rev-list and diff-tree in your script. -
Dec 22, 9:19 pm 2005
Junio C Hamano
Re: [PATCH] git-daemon --base-path
This is much nicer than chrooting or having a symlink hanging under /. Another possibility would be to have ~git/ a symlink to such directory and make it a whitelist -- then you do not need this patch. The URL would be "git://ho.st/~git/xxx" which We probably would want to verify base_path exists and is without excess trailing slash when parsing arguments, if we are going to do this. -
Dec 22, 9:19 pm 2005
Petr Baudis
[PATCH] git-daemon --base-path
Tommi Virtanen expressed a wish on #git to be able to use short and elegant git URLs by making git-daemon 'root' in a given directory. This patch implements this, causing git-daemon to interpret all paths relative to the given base path if any is given. Signed-off-by: Petr Baudis <pasky@suse.cz> --- Documentation/git-daemon.txt | 11 ++++++++++- daemon.c | 21 ++++++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git ...
Dec 22, 6:27 pm 2005
Johannes Schindelin
[PATCH] git-init-db: initialize shared repositories with ...
Now you can say git-init-db --shared if you want other users to be able to push into that repository. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- So, I lied in my last message. This patch actually changes the modes of the $GIT_DIR/{objects,objects/pack,refs,refs/heads, refs/tags} directories. I just forgot to commit this before sending the patch :-( cache.h | 1 + init-db.c | 36 ++++++++++++++++++++++++++---------- sha1_file.c | 2 ...
Dec 22, 3:19 pm 2005
Junio C Hamano
Re: [PATCH] Introduce core.sharedrepository
Wouldn't this safe_create_leading_directories("/pub/git.git/objects") try chmod "/pub" and fail? -
Dec 22, 3:40 pm 2005
Johannes Schindelin
Re: [PATCH] Introduce core.sharedrepository
Hi, D'oh! Time to head to bed now: if (mkdir(path, 0777) < 0) { if (errno != EEXIST) { *pos = '/'; return -1; } } else if (shared_repository && make_group_writable(path)) { *pos = '/'; return -2; } Ciao, Dscho -
Dec 22, 4:04 pm 2005
Johannes Schindelin
[PATCH] Introduce core.sharedrepository
This is the second attempt, after Junio convinced me that my simple approach to set umask was misguided. If the config variable 'core.sharedrepository' is set, the directories $GIT_DIR/objects/ $GIT_DIR/objects/?? $GIT_DIR/objects/pack $GIT_DIR/refs $GIT_DIR/refs/heads $GIT_DIR/refs/heads/tags are set group writable (and g+s, since the git group may be not the primary group of all users). Since all files are written as lock files first, and then moved to their destination, ...
Dec 22, 3:13 pm 2005
Johannes Schindelin
Re: [PATCH] Introduce core.sharedrepository
Hi, Okay: if (S_ISDIR(st.st_mode)) Yes. How about an "else" in front of the "if"? Like so: if (mkdir(path, 0777) < 0) if (errno != EEXIST) { *pos = '/'; return -1; } else if (shared_repository && make_group_writable(path)) { *pos = '/'; return -2; } You want me to ...
Dec 22, 3:59 pm 2005
Johannes Schindelin
[PATCH] git-format-patch should show the correct version
We want to record the version of the tools the patch was generated with. While these tools could be rebuilt, git-format-patch stayed the same and report the wrong version. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) ca85baee8d11e5c4c6de4678fecf311a029c1d7c diff --git a/Makefile b/Makefile index d35637c..5dec33a 100644 --- a/Makefile +++ b/Makefile @@ -406,6 +406,9 @@ $(patsubst ...
Dec 22, 12:38 pm 2005
Junio C Hamano
Re: [PATCH] Add suggestion to hard-to-understand error message
Perhaps. I was suggesting to say that in *both* places, not just one. -
Dec 22, 12:27 pm 2005
Johannes Schindelin Dec 22, 1:53 pm 2005
Junio C Hamano
[PATCH] send-pack: reword non-fast-forward error message.
That is reasonable. How about this? -- >8 -- Wnen refusing to push a head, we said cryptic "remote 'branch' object X does not exist on local" or "remote ref 'branch' is not a strict subset of local ref 'branch'". That was gittish. Since the most likely reason this happens is because the pushed head was not up-to-date, clarify the error message to say that straight, and suggest pulling first. First noticed by Johannes and seconded by Andreas. Signed-off-by: Junio C Hamano ...
Dec 22, 1:41 pm 2005
Junio C Hamano
Re: [ANNOUNCE] GIT 1.0.0b quickfix
FWIW, fourthed ;-) commit c894168631e4b7da66ed3993a4c92380d38599a8 Author: Junio C Hamano <junkio@cox.net> Date: Wed Dec 21 22:33:37 2005 -0800 Versioning scheme changes. HPA suggests it is simply silly to imitate Linux versioning scheme where the leading "2" does not mean anything anymore, and I tend to agree. The first feature release after 1.0.0 will be 1.1.0, and the development path leading to 1.1.0 will carry 1.0.GIT as the version number ...
Dec 22, 12:22 pm 2005
Johannes Schindelin
[PATCH] git-clone-pack: do not silently overwrite an exi ...
When cloning a repository which already contains a branch called 'origin', do not silently overwrite it with the remote 'master' ref. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- This happened to me with a project I track via git-cvsimport. The clone strangely suffered a time warp ;-) git-clone.sh | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) f0d4ef72573488410a1e8eb0198e347630d6e2c9 diff --git a/git-clone.sh b/git-clone.sh index ...
Dec 22, 10:59 am 2005
Junio C Hamano
Re: [PATCH] git-clone-pack: do not silently overwrite an ...
If we consider the "origin is special and is used to track upstream" convention pretty much ingrained, then unconditionally overwriting origin without saying anything is the right approach. After all, you do not care what upstream your upstream is keeping track of, and you would want to use 'origin' for the usual purpose of keeping track of upstream. Otherwise, if we do not treat "origin" specially, we could do something like this. If "origin" exists, then we do not overwrite upon clone, ...
Dec 22, 2:12 pm 2005
Johannes Schindelin
Re: [PATCH] git-clone-pack: do not silently overwrite an ...
Hi, As I said, I use git to keep track of a few CVS projects. I like to fetch all branches, one being the upstream branch, so that I can compare what --- [PATCH] git-clone: Support changing the origin branch with -o Earlier, git-clone stored upstream's master in the branch named 'origin', possibly overwriting an existing such branch. Now you can change it by calling git-clone with '-o <other_name>'. Signed-off-by: Johannes Schindelin ...
Dec 22, 3:37 pm 2005
Junio C Hamano
Re: [PATCH] sha1_to_hex: properly terminate the SHA1
Good catch, thanks. The worst one is: diff.c:727: memcpy(one_sha1, sha1_to_hex(one->sha1), 41); -
Dec 22, 1:51 pm 2005
Johannes Schindelin
[PATCH] sha1_to_hex: properly terminate the SHA1
sha1_to_hex() returns a pointer to a static buffer. Some of its users modify that buffer by appending a newline character. Other users rely on the fact that you can call printf("%s", sha1_to_hex(sha1)); Just to be on the safe side, terminate the SHA1 in sha1_to_hex(). Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> --- sha1_file.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 3a743c154546e4937b4afdc7848d9943ec2f4148 diff --git a/sha1_file.c ...
Dec 22, 10:55 am 2005
Nick Hengeveld
[PATCH] Fix for http-fetch from file:// URLs
Recognize missing files when using http-fetch with file:// URLs Signed-off-by: Nick Hengeveld <nickh@reactrix.com> --- By way of explanation, our content distribution clients use a self-referential file:// URL when fetching updates, and all actual content servers are listed in http-alternates. This removes the dependency on a single external primary server so updates will continue to work as long as any one server is available. http-fetch.c | 12 ++++++++---- 1 files changed, 8 ...
Dec 22, 10:09 am 2005
Mauro Carvalho Chehab Dec 22, 3:56 am 2005
Mauro Carvalho Chehab
problems when pushing to a master repository
I've started working recently with git, and I'm suffering problems to update a master repository. Sometimes, git refuses to update a master repository: git push ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master error: src refspec master matches more than one. fatal: unexpected EOF Even removing the branch, git-prune and reimporting doesn't work. I have to reimport the tree from master repository. Any sugestions? Cheers, Mauro. -
Dec 22, 3:18 am 2005
Junio C Hamano
Re: [PATCH] sanity check in add_packed_git()
How about doing something like this, then? I haven't tried this with http-fetch but with this I think we can unconditionally assign p->sha1 in add_packed_git(). -- >8 -- Subject: [PATCH] Require packfiles to follow the naming convention. With this, pack files must be named "pack-[0-9a-f]{40}.pack", with corresponding .idx file, and the hexadecimal part must match the SHA1 checksum git-pack-objects computed when the pack was created originally (i.e. sum over sorted object names of ...
Dec 22, 2:39 am 2005
Andreas Ericsson
Re: [PATCH] Add suggestion to hard-to-understand error message
In non-git'ish, does this mean "you're not up to date, so pull before pushing" ? If so, why not say so? I'm sure it could prevent a fair few problems for users (not least those new to scm's). -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Dec 22, 3:03 am 2005
Daniel Barkalow
Re: [PATCH] GIT: Support [address] in URLs
Would it work to strip out all of the characters which are only in the disallowed character set, change the character set to ascii, and check the message like that? (Of course, empty or substantially reduced messages should be discarded instead) It looks like the non-spam in these character sets only has a few non-ascii characters, and those are transliterated into ascii nearby anyway, and I doubt that there's much spam in non-ascii with only a few characters in some other character set ...
Dec 22, 9:48 am 2005
Johannes Schindelin
Re: [PATCH] whatchanged: customize diff-tree output
Hi, And that makes the script not stop how? Ciao, Dscho -
Dec 22, 3:24 pm 2005
Linus Torvalds
Re: [PATCH] whatchanged: customize diff-tree output
I'm certainly ok with the short format by default. And making it configurable per repo sounds fine, although at the same time I wonder if that perhaps confuses people more (something that works in one project one way works subtly differently in another project..) Linus -
Dec 21, 11:48 pm 2005
Junio C Hamano
[PATCH] whatchanged: customize diff-tree output
You already know I am in favor of this; it was the motivation behind --abbrev. With an 80-column terminal, especially with the hardcoded LESS=-S switch, the default diff-raw output was unusable. How about doing something like this patch first, and then decide what the default should be? I would recommend "--pretty -r --name-status -M" as the default. But I am not particularly interested in imposing my preference over that of Linus to the end users. -- >8 -- This allows the ...
Dec 21, 11:21 pm 2005
Johannes Schindelin
Re: [PATCH] whatchanged: customize diff-tree output
Hi, I cannot think of a saner way to have an overridable policy. Just provide a template config, and you're done. Everyone gets those flags per default, and if someone does not like it: go ahead, change it yourself! Besides, you are usually calling git-whatchanged in your private working tree, where not many people can change the config. Ciao, Dscho -
Dec 22, 4:16 am 2005
Alex Riesen
Re: [PATCH] whatchanged: customize diff-tree output
That's the point, isn't it? A script from ~user1/bin, which calls git-whatchanged suddenly stops working in ~user2/repo. Besides, how can user1 know what he has to specify to git-whatchanged (I assume the command line overrides .git/config) so that his script works everywhere? Maybe such configuration better left to environment variables? -
Dec 22, 2:06 pm 2005
Linus Torvalds
Re: [ANNOUNCE] GIT 1.0.0b quickfix
FWIW, thirded. The kernel used to use letters too, and it's cute, but just using multiple levels of release numbers is much more common. Linus -
Dec 22, 10:46 am 2005
Benjamin Herrenschmidt
Re: [ANNOUNCE] GIT 1.0.0b quickfix
Seconded. letters in versions are bad. With my MacOS background, for me, "b" means "beta" :) Ben. -
Dec 22, 2:39 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, Better to do this with a post-update hook, right? You can't forget to checkout this way. *Plus* you can make sure the umask is correct in the In my very special setup, it is a server on which you have your personal files, too. So, setting umask = 0002 globally is not an option. Furthermore, it just feels wrong to set an option outside of git which is Problem is, what if one of your users is a tcsh zealot? Or simply forgot to set it. Trouble in China. Also, I simply can not ...
Dec 22, 7:37 am 2005
Alex Riesen
Re: git /objects directory created 755 by default?
I mean it to be set only when git-shell called, but with explicit semantics shared.mask = shell.mask. Just a name to express what it is for -
Dec 22, 7:38 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, It was the thread "How to set up a shared repository". Okay, so there you are. You have a write-shared repository with the HEAD checked out. Somebody wants to push to that with different credentials than the user who checked out the files. Do you plainly deny updating the current HEAD? If you do, then you better give the pushing user (pun intended) a way to update the checked out files. You can do this by (tadaah) setting the umask to 0002 also for working files. Yes, we ...
Dec 22, 4:27 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, What would shell.umask do? Be set only when git-shell is called? Then you better have the policy to access that particular repository *only* via git-shell. Voila, it is the same effect as of core.umask. What would shared.umask do? Be set only when writing to GIT_DIR? This is a major task, since you have to find out which writes are to the working directory, which ones go to GIT_DIR. And you have to workout a policy (as I just answered in this thread) how to deal with a checked ...
Dec 22, 4:35 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, My point is: regardless if you allow different access methods or not, you only need one method to set a repository-wide umask. Ciao, Dscho -
Dec 22, 8:52 am 2005
Alex Riesen
Re: git /objects directory created 755 by default?
May be "shell.umask" or "shared.umask" ? -
Dec 22, 3:11 am 2005
Andreas Ericsson
Re: git /objects directory created 755 by default?
Which thread was that? I see no particular problem with having a working directory in a write-shared repo. The same care has to be taken there as everywhere (pull before push), but that's nothing new. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 -
Dec 22, 2:45 am 2005
Andreas Ericsson
Re: git /objects directory created 755 by default?
You're simplifying. Your question was "How can I set up a repository for multiple users to write to without setting a global umask for non-interactive shells?" Junio said: "I agree the setting should not be limited to git-shell, but I do not think setting "umask" from git configuration is the right way either. For files and directories under $GIT_DIR, maybe imposing the policy git configuration file has is OK, but I think honoring the user's umask is the right thing for working tree ...
Dec 22, 9:52 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, this is getting silly. The problem is: how to setup a shared repository, i.e. a repository into which different users can push their updates. Yes, I can work around the fact that git (in its current official version) does not have an option to make that happen. It is just awfully cumbersome. And that is what good software should prevent. Especially if it is *that* easy. Hth, Dscho -
Dec 22, 9:03 am 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, No, I am not. My question really was: how do I setup a shared repository? IMHO Junio is wrong here. If the repository is write-shared, then the working directory should be write-shared as well (or checkout should be I do not understand what you mean by "repositories cloned remotely". And if you really are working in the working directory of the shared repository, and a user (I know I would do it just to annoy you) pushes a new HEAD while you have modified files, you deserve ...
Dec 22, 10:31 am 2005
Alex Riesen
Re: git /objects directory created 755 by default?
No, just different names for the same access method. -
Dec 22, 8:14 am 2005
Andreas Ericsson
Re: git /objects directory created 755 by default?
Ahh. Sorry. We use this method a lot, really, but always only for running gitk and archaeology tools to check newly pushed changes, so the write-shared repo is only write-shared for remote users, and the local one never does a commit. It's perhaps a bit of a weird setup, but it lets you get an overview faster than gitweb and works well enough with samba. Noted should be that having the repo checked out is merely a convenience thing to let one browse the files at leisure. People know to ...
Dec 22, 5:28 am 2005
Andreas Ericsson
Re: git /objects directory created 755 by default?
What prevents you from setting umask 002 in the hook? If the files are already checked out with some other (write-denying) umask by some other scp -p preserves the umask you have on your desktop/laptop, so unless you frequently do ssh somewhere "echo 'Gawds, this is an awkward way of editing files' >> somefile" you should be good with the bashrc setting. You can override it from bash_profile to make sure you get a safely sane umask when logging in tcsh zealot? Not familiar ...
Dec 22, 8:53 am 2005
Junio C Hamano
Re: git /objects directory created 755 by default?
That somebody has to be somebody who owns .git directory not just a group member, so that is not a serious objection either, but you need to realize I was joking with 0777 -- a saner default would obviously be 0775. Otherwise you would not be able to server it from gitweb safely -- http server is typically I am afraid that is going backwards. Nobody *needs* core.umask either, but we are still talking about this. That is because you wanted to make things easier for people, and I agree ...
Dec 22, 1:15 pm 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, This has some merit, for example, when some of the contributors have no And then somebody comes along and allows world access by chmod(0775) and does not realize that *everybody* can delete packs, objects and what-nots in GIT_DIR. Given the complexity we are talking about, and the needs which are not at all that complicated, why not just go with core.umask until somebody *needs* core.repositoryumask? Ciao, Dscho -
Dec 22, 12:28 pm 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, But if somebody writes to the same repository with another umask, say 0022, you have problems. Example: - I push -- via ssh/bash -- to the repository. The ref refs/heads/bruchpilot is updated (mode: 0644). - My colleague pushes -- via ssh/git-shell -- to the repository. When she tries to write refs/heads/bruchpilot, it fails, even if she set the correct umask. See what I mean? It makes no sense to allow different umasks on the You do mean different umasks for different ...
Dec 22, 8:09 am 2005
Junio C Hamano
Re: git /objects directory created 755 by default?
I think this needs qualifying. When we talk about "CVS-style shared repository", we know what it is -- there is no such thing as "*the* working tree associated with the repository" and there is no room for disagreement. The workflow your shared repository implies is that there is an associated working tree with that repository, and the working tree should allow updates by participants who are allowed to create new things in .git/objects and update .git/refs/. If you assume that is the ...
Dec 22, 12:14 pm 2005
Johannes Schindelin
Re: git /objects directory created 755 by default?
Hi, I was talking about somebody who has only one server for everything: mail, Yes, I tried to avoid that. Ciao, Dscho -
Dec 22, 1:27 pm 2005
previous daytodaynext day
December 21, 2005December 22, 2005December 21, 2005