aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [PATCH] Document config.mak in INSTALL.Jason Riedy2005-12-05
| | | | | | | | | | The existing config.mak should satisfy almost everyone... You can change the prefix and other vars catch the new setting anyways. I had forgotten that ?= acts as = (lazy value binding) and as not := (immediate value binding). Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* config.c: remove unnecessary header in minimum configuration file.Junio C Hamano2005-12-05
| | | | | | | It is just silly to start the file called "config" with a comment that says "This is the config file." Signed-off-by: Junio C Hamano <junkio@cox.net>
* server-info.c: and two functions are not used anymore.Junio C Hamano2005-12-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* server-info.c: use pack_local like everybody else.Junio C Hamano2005-12-05
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: shared repository management in tutorial.Junio C Hamano2005-12-05
| | | | | | | | | | | | The branch policy script I outlined was improved and polished by Carl and posted on the list twice since then. It is a shame not to pick it up, so replace the original outline in howto/update-hook-example.txt with the latest from Carl. Also talk about setting up git-shell to allow git-push/git-fetch only SSH access to a shared repository host in the tutorial. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: push/receive hook references.Junio C Hamano2005-12-05
| | | | | | | | | | Mention documentation pages that talk about update and post-update hooks from git-push, because a frequently asked question is "I want X to happen when I push" and people would not know to look at git-receive-pack documentation until they understand that is what runs on the other end. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: git-diff asciidoc table workaround.Junio C Hamano2005-12-05
| | | | | | | The table facility was nice in rendering HTML but was disastrous for man page. Reword the text and do not use table for now. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: git-mv manpage workaround.Junio C Hamano2005-12-05
| | | | | | | Work-around asciidoc manpage trouble that does not seem to allow more than one line in the SYNOPSIS section. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: talk about pathspec in bisect.Junio C Hamano2005-12-05
| | | | | | | Also work-around asciidoc manpage trouble that does not seem to allow more than one line in the SYNOPSIS section. Signed-off-by: Junio C Hamano <junkio@cox.net>
* server-info: throw away T computation as well.Junio C Hamano2005-12-04
| | | | | | | | | | | Again, dumb transport clients are too dumb to make use of the top objects information to make a choice among multiple packs, so computing these lines are useless for now. We could resurrect them if needed later. Also dumb transport clients presumably can do their own approximation by downloading idx files to see how relevant each pack is for their fetch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* server-info: stop sorting packs by latest date.Junio C Hamano2005-12-04
| | | | | | | This does not seem to buy us much, for the same reason as the previous change. Dumb clients are still too dumb. Signed-off-by: Junio C Hamano <junkio@cox.net>
* server-info.c: drop unused D lines.Junio C Hamano2005-12-04
| | | | | | | | | We tried to compute pack interdependency information in $GIT_DIR/objects/info/packs, hoping that dumb transports would make use of it when choosing from multiple choice, but that has never materialized, so stop computing D lines for now. Signed-off-by: Junio C Hamano <junkio@cox.net>
* sha1_file.c: make sure packs in an alternate odb is named properly.Junio C Hamano2005-12-04
| | | | | | | | | | | | We somehow ended up registering packs in alternate object directories as "dir/object//pack/pack-*", which confusd the update-server-info code very badly. Also we did not attempt to detect a mistake of listing the object directory itself as one of the alternates. This does not lead to incorrect behaviour, but is simply wasteful, so try to do so when we are trivially able to. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.c: remove excess output for debugging when command is too long.Junio C Hamano2005-12-04
| | | | | | | | | When the given command name was too long, we exited with a message with the number of bytes of the final command name inside parentheses, without saying what that number is. It was only meant as a debugging aid while development, so remove it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* struct tree: remove unused field "parent"Junio C Hamano2005-12-04
| | | | | | The field is not used anymore, after the recent ls-tree rewrite. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: rebase does not use cherry-pick anymore.Junio C Hamano2005-12-04
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document the --(no-)edit switch of git-revert and git-cherry-pickPetr Baudis2005-12-04
| | | | | | | | | This switch was not documented properly. I decided not to mention the --no-edit switch in the git-cherry-pick documentation since we always default to no editing. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* show-branch: allow glob pattern to name branches to show.Junio C Hamano2005-12-04
| | | | | | | | | | | With this, you can say "git-show-branch topic/* master" to show all the topic branches you have under .git/refs/heads/topic/ and your master branch. Another example is "git-show-branch --list v1.0*" to show all the v1.0 tags. You can disambiguate by saying "heads/topic/*" to show only topic branches if you have tags under .git/refs/tags/topic/ as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update the git-ls-tree documentationPetr Baudis2005-12-04
| | | | | | | | | | | | | | This patch aims to freshen up a bit the git-ls-tree documentation. It hints that the list of paths are in fact patterns to be matched, explains the new -t, --name-only and --name-status options, corrects the original autorship information to refer to yours sincerely, corrects several grammar mistakes, etc. Since the documentation still deserves some significant work (at least proper description of the pattern matching), I also added the stub notice. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git.c: two fixes, gitsetenv type and off-by-one error.Junio C Hamano2005-12-04
| | | | | | | | | | | | gitsetenv as implemented in compat/setenv.c takes two const char* and int; match that. Also fix an incorrect attempt in prepend_to_path() to NUL-terminate the string which stuffed the NUL character at one past the end of allocation, and was not needed to begin with (we copy the old_path string including the NUL which terminates it). Signed-off-by: Junio C Hamano <junkio@cox.net>
* compat/setenv: do not free what we fed putenv(3).Junio C Hamano2005-12-04
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Warn when send-pack does nothingDaniel Barkalow2005-12-04
| | | | | | | | | | If you try to push into an empty repository with no ref arguments to git push, it doesn't do anything and doesn't say anything. This adds a warning when send-pack isn't going to push anything, so you don't assume that it silently did what you wanted. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] daemon.c and path.enter_repo(): revamp path validation.Junio C Hamano2005-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The whitelist of git-daemon is checked against return value from enter_repo(), and enter_repo() used to return the value obtained from getcwd() to avoid directory aliasing issues as discussed earier (mid October 2005). Unfortunately, it did not go well as we hoped. For example, /pub on a kernel.org public machine is a symlink to its real mountpoint, and it is understandable that the administrator does not want to adjust the whitelist every time /pub needs to point at a different partition for storage allcation or whatever reasons. Being able to keep using /pub/scm as the whitelist is a desirable property. So this version of enter_repo() reports what it used to chdir() and validate, but does not use getcwd() to canonicalize the directory name. When it sees a user relative path ~user/path, it internally resolves it to try chdir() there, but it still reports ~user/path (possibly after appending .git if allowed to do so, in which case it would report ~user/path.git). What this means is that if a whitelist wants to allow a user relative path, it needs to say "~" (for all users) or list user home directories like "~alice" "~bob". And no, you cannot say /home if the advertised way to access user home directories are ~alice,~bob, etc. The whole point of this is to avoid unnecessary aliasing issues. Anyway, because of this, daemon needs to do a bit more work to guard itself. Namely, it needs to make sure that the accessor does not try to exploit its leading path match rule by inserting /../ in the middle or hanging /.. at the end. I resurrected the belts and suspender paranoia code HPA did for this purpose. This check cannot be done in the enter_repo() unconditionally, because there are valid callers of enter_repo() that want to honor /../; authorized users coming over ssh to run send-pack and fetch-pack should be allowed to do so. Signed-off-by: Junio C Hamano <junkio@cox.net>
* A few more options for git-cat-fileH. Peter Anvin2005-12-03
| | | | | | | | | | | | | This adds '-e' option to git-cat-file, to test for the existence of the object. This also cleans up the option-parsing in git-cat-file slightly. [jc: HPA version had -n option which did rev-parse --verify; the real value of this patch is the option parsing cleanup.] Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add compat/setenv.c, use in git.c.Jason Riedy2005-12-03
| | | | | | | | | | | | | | There is no setenv() in Solaris 5.8. The trivial calls to setenv() were replaced by putenv() in a much earlier patch, but setenv() was used again in git.c. This patch just adds a compat/setenv.c. The rule for building git$(X) also needs to include compat. objects and compiler flags. Those are now in makefile vars COMPAT_OBJS and COMPAT_CFLAGS. Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu> Signed-off-by: Junio C Hamano <junkio@cox.net>
* New test case: Criss-cross mergeFredrik Kuivinen2005-12-03
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* New test case: merge with directory/file conflictsFredrik Kuivinen2005-12-03
| | | | | Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* test-lib.sh: Add new function, test_expect_codeFredrik Kuivinen2005-12-03
| | | | | | | The test is considered OK if it exits with code $1 Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-merge: Exit with code 2 if no strategy was able to handle the merge.Fredrik Kuivinen2005-12-03
| | | | | | | | This way it is possible to test in scripts if the merge was non-clean or if the strategy had other problems with the merge. Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
* documentation: git-tagNo name2005-12-02
| | | | | | [jc: light edit applied on top of the original] Signed-off-by: Junio C Hamano <junkio@cox.net>
* documentation: git-bisect (help HTML break man)Junio C Hamano2005-12-02
| | | | | | | | | | Use the same trick Josef used to introduce line breaks for git-mv documentation for now, to help HTML rendering. This breaks manpages and we need to come up with a better solution. Noticed by linux@horizon.com (No Name). Signed-off-by: Junio C Hamano <junkio@cox.net>
* documentation: clarify read-tree --resetNo name2005-12-02
| | | | | | [jc: light edit applied on top of the original] Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-merge documentation: conflicting merge leaves higher stages in indexJunio C Hamano2005-12-02
| | | | | | | | | | This hopefully concludes the latest updates that changes the behaviour of the merge on an unsuccessful automerge. Instead of collapsing the conflicted path in the index to show HEAD, we leave it unmerged, now that diff-files can compare working tree files with higher stages. Signed-off-by: Junio C Hamano <junkio@cox.net>
* merge-one-file: make sure we do not mismerge symbolic links.Junio C Hamano2005-12-02
| | | | | | | We ran "merge" command on O->A, O->B, A!=B case without verifying the path involved is not a symlink. Signed-off-by: Junio C Hamano <junkio@cox.net>
* merge-one-file: make sure we create the merged file.Junio C Hamano2005-12-02
| | | | | | | | | | | The "update-index followed by checkout-index" chain served two purposes -- to collapse the index to "our" version, and make sure that file exists in the working tree. In the recent update to leave the index unmerged on conflicting path, we wanted to stop doing the former, but we still need to do the latter (we allow merging to work in an un-checked-out working tree). Signed-off-by: Junio C Hamano <junkio@cox.net>
* t3100: add ls-tree -t and -d tests.Junio C Hamano2005-12-01
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* merge-recursive: adjust git-ls-tree use for the latest.Junio C Hamano2005-12-01
| | | | | | | | | You need to pass -t flag if you want to see tree objects in "git-ls-tree -r" output these days. This change broke the tree structure reading code in git-merge-recursive used to detect D/F conflicts. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git wrapper: more careful argument stuffingAlex Riesen2005-12-01
| | | | | | | | | | | | - Use stderr for error output - Build git_command more careful - ENOENT is good enough for check of failed exec to show usage, no access() check needed [jc: Originally from Alex Riesen with inputs from Sven Verdoolaege mixed in.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-merge-one-file: do not worry about 'rmdir -p' not removing directory.Junio C Hamano2005-12-01
| | | | | | | | 9ae2172aed289f2706a0e88288909fa47eddd7e7 used "rmdir -p" carelessly, causing the more important "git-update-index --remove" to be skipped. Signed-off-by: Junio C Hamano <junkio@cox.net>
* ls-tree: --name-onlyJunio C Hamano2005-12-01
| | | | | | | | | | | | | | Fingers of some "git diff" users are trained to do --name-only which git-ls-tree unfortunately does not take. With this, cd sub/directory && git-ls-tree -r --name-only .. would show only the names not object names nor modes. I threw in another synonym --name-status only for usability, but obviously ls-tree does not do any comparison so what it does is the same as --name-only. Signed-off-by: Junio C Hamano <junkio@cox.net>
* ls-tree: resurrect '-d' to mean 'show trees only'Junio C Hamano2005-12-01
| | | | | | | | | | | | | | | | | | | | With this: git-ls-tree -d HEAD -- drivers/net/ shows only immediate subtrees of drivers/net. git-ls-tree -d -t HEAD -- drivers/net/ shows drivers, drivers/net and immediate subtrees of drivers/net. git-ls-tree -d -r HEAD -- drivers/net/ shows drivers, drivers/net and all subtrees of drivers/net (but not blobs). Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-ls-tree: add "-t" option to always show the tree entriesLinus Torvalds2005-12-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old (new) behaviour was that it only shows trees if the object is specified exactly, and recursive is not set. That makes sense, because there is obviously nothing else it can show for that case. However, with the new "-t" option, it will show the tree even with "-r", as it traverses down into it. NOTE! This also means that it will show all trees leading up to that tree. For example, if you do a git-ls-tree -t HEAD -- drivers/char/this/file/does/not/exist it will show the trees that lead up to the files that do not exist: [torvalds@g5 linux]$ git-ls-tree -t HEAD -- drivers/char/this/file/does/not/exist 040000 tree 9cb687b77dcd64bf82e9a73214db467c964c1266 drivers 040000 tree 298e2fadf0ff3867d1ef49936fd2c7bf6ce1eb66 drivers/char [torvalds@g5 linux]$ and note how this is true even though I didn't specify "-r": the fact that I supplied a pathspec automatically implies "enough recursion" for that particular pathspec. I think the code is cleaner and easier to understand too: the patch looks bigger, but it's really just splitting up the "should we recurse into this tree" into a function of its own. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Makefile: say the default target upfront.Junio C Hamano2005-12-01
| | | | | | | | Alex Riesen wants to keep extra makefile targets in config.mak, but the file is included before any of our real targets. Having this at the beginning allows you to do so. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Documentation: describe '-f' option to git-fetch.Junio C Hamano2005-12-01
| | | | | | | | | The option description header was there without body text, confusingly getting rendered as if the description for --tags applied to the option. Noticed by Carl Baldwin. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move couple of ifdefs after "include config.mk"Timo Hirvonen2005-11-30
| | | | | | | | This makes it possible to define WITH_SEND_EMAIL etc. in config.mak. Also remove GIT_LIST_TWEAK because it isn't used anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/subdir'Junio C Hamano2005-11-30
|\
| * hash-object.c: type-fix to squelch compiler warnings.Junio C Hamano2005-11-28
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * define die() for scripts that use it.Junio C Hamano2005-11-28
| | | | | | | | | | | | | | | | | | As a fallout from not using git-sh-setup in scripts that can operate from a subdirectory, we lost definition of die() from them. It might make sense to do some cleanup to consolidate them back again, but this should suffice for now. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * verify-tag: make it operable from a subdirectory.Junio C Hamano2005-11-28
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * tag: make it operable from a subdirectory.Junio C Hamano2005-11-28
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>