summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-01-25Fix seriously broken "git pack-refs"Libravatar Linus Torvalds2-1/+12
Do *NOT* try this on a repository you care about: git pack-refs --all --prune git pack-refs because while the first "pack-refs" does the right thing, the second pack-refs will totally screw you over. This is because the second one tries to pack only tags; we should also pack what are already packed -- otherwise we would lose them. [jc: with an additional test] Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24New files in git weren't being downloaded during CVS updateLibravatar Andy Parkins1-3/+3
If a repository was checked out via git-cvsserver and then later a new file is added to the git repository via some other method; a CVS update wasn't fetching the new file. It would be reported as a new file as A some/dir/newfile.c but would never appear in the directory. The problem seems to be that git-cvsserver was treating these two cases identically, as "A" type results. 1. New file in repository 2. New file locally In fact, traditionally, case 1 is treated as a "U" result, and case 2 only is treated as an "A" result. "A", should just report that the file is added locally and then skip that file during an update as there is (of course) nothing to send. In both these cases there is no working revision, so the checking for "is there no working revision" will return true. The test for case 2 needs refining to say "if there is no working revision and no upstream revision". This patch does just that, leaving case 1 to be handled by the normal "U" handler. I've also updated the log message to more accurately describe the operation. i.e. that "A" means that content is scheduled for addition; not that it actually has been added. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24make --upload-pack option to git-fetch configurableLibravatar Uwe Kleine-König3-1/+24
This introduces the config item remote.<name>.uploadpack to override the default value (which is "git-upload-pack"). Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Consolidate {receive,fetch}.unpackLimitLibravatar Junio C Hamano4-10/+35
This allows transfer.unpackLimit to specify what these two configuration variables want to set. We would probably want to deprecate the two separate variables, as I do not see much point in specifying them independently. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24fetch-pack: remove --keep-auto and make it the default.Libravatar Junio C Hamano3-15/+29
This makes git-fetch over git native protocol to automatically decide to keep the downloaded pack if the fetch results in more than 100 objects, just like receive-pack invoked by git-push does. This logic is disabled when --keep is explicitly given from the command line, so that a very small clone still keeps the downloaded pack as before. The 100 threshold can be adjusted with fetch.unpacklimit configuration. We might want to introduce transfer.unpacklimit to consolidate the two unpacklimit variables, which will be a topic for the next patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Allow fetch-pack to decide keeping the fetched pack without explodingLibravatar Junio C Hamano1-32/+59
With --keep-auto option, fetch-pack decides to keep the pack without exploding it just like receive-pack does. We may want to later make this the default. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Refactor the pack header reading function out of receive-pack.cLibravatar Junio C Hamano3-12/+40
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Allow default core.logallrefupdates to be overridden with template's configLibravatar Alex Riesen1-1/+3
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24ls-remote and clone: accept --upload-pack=<path> as well.Libravatar Junio C Hamano3-6/+15
This makes them consistent with other commands that take the path to the upload-pack program. We also pass --upload-pack instead of --exec to the underlying fetch-pack, although it is not strictly necessary. [jc: original motivation from Uwe] Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24rename --exec to --upload-pack for fetch-pack and peek-remoteLibravatar Uwe Kleine-König4-12/+26
Just some option name disambiguation. This is the counter part to commit d23842fd which made a similar change for push and send-pack. --exec continues to work. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Documentation: --amend cannot be combined with -c/-C/-F.Libravatar Peter Eriksen2-5/+5
We used to get the following confusing error message: $ git commit --amend -a -m foo Option -m cannot be combined with -c/-C/-F This is because --amend cannot be combined with -c/-C/-F, which makes sense, because they try to handle the same log message in different ways. So update the documentation to reflect this. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24Documentation/config.txt: Correct info about subsection nameLibravatar Jakub Narebski1-2/+2
Contrary to variable values, in subsection names parsing character escape codes (besides literal escaping of " as \", and \ as \\) is not performed; subsection name cannot contain newlines. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24git-daemon documentation on enabling services.Libravatar Junio C Hamano1-2/+2
Noticed by Franck Bui-Huu. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24reflog inspection: introduce shortcut "-g"Libravatar Johannes Schindelin4-6/+9
A short-hand "-g" for "git log --walk-reflogs" and "git show-branch --reflog" makes it easier to access the reflog info. [jc: added -g to show-branch for symmetry] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24annotate: use pagerLibravatar Johannes Schindelin1-1/+1
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-23t/t1300-repo-config.sh: value continued on next lineLibravatar Jakub Narebski1-0/+20
Documentation/config.txt: Variable value ending in a '`\`' is continued on the next line in the customary UNIX fashion. Test it. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-23git-checkout -m: fix merge caseLibravatar Junio C Hamano2-11/+32
Commit c1a4278e switched the "merging checkout" implementation from 3-way read-tree to merge-recursive, but forgot that merge-recursive will signal an unmerged state with its own exit status code. This prevented the clean-up phase (paths cleanly merged should not be updated in the index) from running. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22reflog gc: a tag that does not point at a commit is not a crime.Libravatar Junio C Hamano1-3/+0
Although unusual, tags can point at any object. Warning only once is fine, but warning every time about the same tag gets annoying. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22contrib/vim: update syntax for changed commit templateLibravatar Jeff King1-2/+2
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22format-patch: fix bug with --stdout in a subdirectoryLibravatar Jeff King1-1/+1
We set the output directory to the git subdirectory prefix if one has not already been specified. However, in the case of --stdout, we explicitly _don't_ want the output directory to be set. The result was that "git-format-patch --stdout" in a directory besides the project root produced the "standard output, or directory, which one?" error message. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22[PATCH] honor --author even with --amend, -C, and -c.Libravatar Junio C Hamano1-9/+10
Earlier code discarded GIT_AUTHOR_DATE taken from the base commit when --author was specified. This was often wrong as that use is likely to fix the spelling of author's name. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22.mailmap: fix screw-ups in Uwe's nameLibravatar Junio C Hamano1-0/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22git-svn: remove leading slash when printing removed directoriesLibravatar Eric Wong1-1/+1
Not sure why it was there in the first place, we always do our work relative to the URL we're connected to; even if that URL is the root of the repository, so the leading slash is pointless... Lets be consistent when printing things for the user to see. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22sha1_file.c: Avoid multiple calls to find_pack_entry().Libravatar Peter Eriksen1-10/+9
We used to call find_pack_entry() twice from read_sha1_file() in order to avoid printing an error message, when the object did not exist. This is fixed by moving the call to error() to the only place it really could be called. Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22Documentation/config.txt: Document config file syntax betterLibravatar Jakub Narebski1-7/+69
Separate part of Documentation/config.txt which deals with git config file syntax into "Syntax" subsection, and expand it. Add information about subsections, boolean values, escaping and escape sequences in string values, and continuing variable value on the next line. Add also proxy settings to config file example to show example of partially enclosed in double quotes string value. Parts based on comments by Junio C Hamano, Johannes Schindelin, config.c, and the smb.conf(5) man page. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22cvsimport: activate -a option, really.Libravatar Junio C Hamano1-1/+1
An earlier commit ded9f400 added $opt_a support to disable the cvsps grace period mechanism, but forgot to tell the option parser about it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22Cleanup uninitialized value in chompLibravatar Alex Riesen1-1/+1
which happens if you use ActiveState Perl and a pipe workaround specially for it. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22Force Activestate Perl to tie git command pipe handle to a handle classLibravatar Alex Riesen1-1/+7
Otherwise it tries to tie it to a scalar and complains about missing method. Dunno why, may be ActiveState brokenness again. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22Insert ACTIVESTATE_STRING in Git.pmLibravatar Alex Riesen1-3/+4
Also add "git" to the pipe parameters, otherwise it does not work at all, as no git commands are usable out of git context. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21fsck-objects: refactor checking for connectivityLibravatar Linus Torvalds1-38/+95
This separates the connectivity check into separate codepaths, one for reachable objects and the other for unreachable ones, while adding a lot of comments to explain what is going on. When checking an unreachable object, unlike a reachable one, we do not have to complain if it does not exist (we used to complain about a missing blob even when the only thing that references it is a tree that is dangling). Also we do not have to check and complain about objects that are referenced by an unreachable object. This makes the messages from fsck-objects a lot less noisy and more useful. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21git-gc: do not run git-prune by default.Libravatar Junio C Hamano2-3/+32
git-prune is not safe when run uncontrolled in parallel while other git operations are creating new objects. To avoid mistakes, do not run git-prune by default from git-gc. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21shallow repository: disable unsupported operations for now.Libravatar Junio C Hamano2-1/+5
We currently do not support fetching/cloning from a shallow repository nor pushing into one. Make sure these are not attempted so that we do not have to worry about corrupting repositories needlessly. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21is_repository_shallow(): prototype fix.Libravatar Junio C Hamano2-2/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21Make sure git_connect() always give two file descriptors.Libravatar Junio C Hamano2-1/+2
Earlier, git_connect() returned the same fd twice or two separate fds, depending on the way the connection was made (when we are talking to the other end over a single socket, we used the same fd twice, and when our end is connected to a pipepair we used two). This forced callers who do close() and dup() to really care which was which, and most of the existing callers got this wrong, although without much visible ill effect. Many were closing the same fd twice when we are talking over a single socket, and one was leaking a fd. This fixes it to uniformly use two separate fds, so if somebody wants to close only reader side can just do close() on it without worrying about it accidentally also closing the writer side or vice versa. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-21Revert "prune: --grace=time"Libravatar Junio C Hamano6-48/+12
This reverts commit 9b088c4e394df84232cfd37aea78349a495b09c1. Protecting 'mature' objects does not make it any safer. We should admit that git-prune is inherently unsafe when run in parallel with other operations without involving unwarranted locking overhead, and with the latest git, even rebase and reset would not immediately create crufts anyway.
2007-01-21Documentation/tutorial-2: Fix interesting typo in an example.Libravatar Junio C Hamano1-2/+2
Marco Candrian noticed that one cat-file example refers to a blob object that is never used in the example sequence. The bug is interesting in that the output from the botched sample command is consistent with the incorrect blob object name ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20GIT v1.5.0-rc2Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20prune: --grace=timeLibravatar Matthias Lederhofer6-12/+48
This option gives grace period to objects that are unreachable from the refs from getting pruned. The default value is 24 hours and may be changed using gc.prunegrace. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20--walk-reflogs: do not crash with cyclic reflog ancestryLibravatar Johannes Schindelin1-2/+5
Since you can reset --hard to any revision you already had, when traversing the reflog ancestry, we may not free() the commit buffer. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20--walk-reflogs: actually find the right commit by date.Libravatar Johannes Schindelin1-1/+1
Embarassing thinko. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2007-01-20Fix --walk-reflog with --pretty=onelineLibravatar Junio C Hamano4-14/+28
Now, "git log --abbrev-commit --pretty=o --walk-reflogs HEAD" is reasonably pleasant to use. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20reflog-walk: build fixesLibravatar Junio C Hamano2-1/+2
Dependency on reflog-walk.h was missing in the Makefile, and reflog-walk.c did not even include it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20log --walk-reflog: documentationLibravatar Junio C Hamano1-0/+15
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20--walk-reflogs: disallow uninteresting commitsLibravatar Johannes Schindelin1-0/+3
Do not allow uninteresting commits with --walk-reflogs, since it is not clear what should be shown in these cases: $ git log --walk-reflogs master..next $ git log --walk-reflogs ^master Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2007-01-20Teach the revision walker to walk by reflogs with --walk-reflogsLibravatar Johannes Schindelin6-1/+263
When called with "--walk-reflogs", as long as there are reflogs available, the walker will take this information into account, rather than the parent information in the commit object. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20git-rebase: allow rebasing a detached HEAD.Libravatar Junio C Hamano1-2/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20branch -f: no reason to forbid updating the current branch in a bare repo.Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20git-tag -d: allow deleting multiple tags at once.Libravatar Junio C Hamano2-10/+19
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20Do not verify filenames in a bare repositoryLibravatar Johannes Schindelin3-0/+56
For example, it makes no sense to check the presence of a file named "HEAD" when calling "git log HEAD" in a bare repository. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2007-01-20Stop ignoring Documentation/READMELibravatar Junio C Hamano1-1/+0
We do not copy this file from elsewhere anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>