summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-01-26user-manual: stub discussion of fsck and reflogLibravatar J. Bruce Fields1-0/+21
Have some sort of recovery/reliability section that deals with reflog and fsck. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21user-manual: update git-gc discussionLibravatar J. Bruce Fields1-5/+3
It appears git-gc will no longer prune automatically, so we don't need to tell people not to do other stuff while running it. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21user-manual: update references discussionLibravatar J. Bruce Fields1-27/+19
Since references may be packed, it's no longer as helpful to introduce references as paths relative to .git. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21user-manual: clarify difference between tag and branchLibravatar J. Bruce Fields1-0/+3
Explain the difference (well, one of the differences) between a tag and a branch. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-21user-manual: minor quickstart reorganizationLibravatar J. Bruce Fields1-8/+22
Move around some stuff in the quickstart, add "push" examples. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-20user-manual: add "quick start" as chapter 1Libravatar J. Bruce Fields1-2/+200
Add a "quick start" guide, modelled after Mercurial's, as the first chapter. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-14user-manual: rewrap, fix heading levelsLibravatar J. Bruce Fields1-17/+23
Fix some heading levels that prevented compile; rewrap some stuff. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-14Merge branch 'master' of git://git.kernel.org/pub/scm/git/gitLibravatar J. Bruce Fields133-1556/+3075
2007-01-14user-manual: reindentLibravatar J. Bruce Fields1-9/+22
Just some minor reindenting Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
2007-01-14Merge branch 'jc/int'Libravatar Junio C Hamano6-33/+333
* jc/int: More tests in t3901. Consistent message encoding while reusing log from an existing commit. t3901: test "format-patch | am" pipe with i18n Use log output encoding in --pretty=email headers.
2007-01-14Merge branch 'sp/merge' (early part)Libravatar Junio C Hamano1-17/+23
* 'sp/merge' (early part): Improve merge performance by avoiding in-index merges.
2007-01-14Merge branch 'jc/subdir'Libravatar Junio C Hamano9-31/+34
* jc/subdir: Allow whole-tree operations to be started from a subdirectory Use cd_to_toplevel in scripts that implement it by hand. Define cd_to_toplevel shell function in git-sh-setup
2007-01-14Remove read_or_die in favor of better error messages.Libravatar Shawn O. Pearce3-15/+4
Originally I introduced read_or_die for the purpose of reading the pack header and trailer, and I was too lazy to print proper error messages. Linus Torvalds <torvalds@osdl.org>: > For a read error, at the very least you have to say WHICH FILE > couldn't be read, because it's usually a matter of some file just > being too short, not some system-wide problem. and of course Linus is right. Make it so. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-14Hide output about SVN::Core not being found during tests.Libravatar Shawn O. Pearce1-1/+1
If the user doesn't have SVN::Core installed or working then the SVN tests properly turn themselves off. But the user doesn't need to know that SVN::Core isn't loadable as a Perl module. Unless of course they are trying to debug the test, so lets relegate the Perl failures to --verbose only. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13simplify the "no changes added to commit" messageLibravatar Nicolas Pitre1-1/+1
Suggesting the use of [-a|-i|-o] with git-commit is unnecessarily complex and confusing. In this context -o is totally useless and -i requires extra arguments which are not mentioned. The only sensible hint (besides reading the man page but let's not go there) is "commit -a". Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13More tests in t3901.Libravatar Junio C Hamano1-36/+137
This adds tests for "cherry-pick" and "rebase --merge" (and indirectly "commit -C" since it is used in the latter) to make sure they create a new commit with correct encoding. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13Consistent message encoding while reusing log from an existing commit.Libravatar Junio C Hamano2-6/+15
The following commands can reuse log message from an existing commit while creating a new commit: git-cherry-pick git-rebase (both with and without --merge) git-commit (-c and -C) When the original commit was made in a different encoding from the current i18n.commitencoding, "cat-file commit" would give a string that is inconsistent with what the resulting commit will claim to be in. Replace them with "git show -s --encoding". "git-rebase" without --merge is "git format-patch" piped to "git am" in essence, and has been taken care of before this commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13git-commit documentation: -a adds and also removesLibravatar Junio C Hamano1-1/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13t3901: test "format-patch | am" pipe with i18nLibravatar Junio C Hamano3-0/+162
This checks combinations of i18n.commitencoding (declares what encoding you are feeding commit-tree to make commits) and i18n.logoutputencoding (instructs what encoding to emit the commit message out to log output, including e-mail format) to make sure the "format-patch | am" pipe used in git-rebase works correctly. I suspect "git cherry-pick" and "git rebase --merge" may fail similar tests. We'll see. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13Use log output encoding in --pretty=email headers.Libravatar Junio C Hamano1-27/+55
Private functions add_rfc2047() and pretty_print_commit() assumed they are only emitting UTF-8. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13git-remote: no longer silent on unknown commands.Libravatar Quy Tonthat1-1/+6
Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-13git-svn: fix tests to work with older svnLibravatar Eric Wong2-2/+4
Some of the recent changes and shortcuts to the tests broke things for people using older versions of svn: t9104-git-svn-follow-parent.sh: v1.2.3 (from SuSE 10.0 as reported by riddochc on #git (thanks!)) required an extra 'svn up'. I was also able to reproduce this with v1.1.4 (Debian Sarge). lib-git-svn.sh: SVN::Repos bindings in versions up to and including 1.1.4 (Sarge again) do not pass fs-config options to the underlying library. BerkeleyDB repositories also seem completely broken on all my Sarge machines; so not using FSFS does not seem to be an option for most people. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12Allow whole-tree operations to be started from a subdirectoryLibravatar Junio C Hamano4-2/+12
This updates five commands (merge, pull, rebase, revert and cherry-pick) so that they can be started from a subdirectory. This may not actually be what we want to do. These commands are inherently whole-tree operations, and an inexperienced user may mistakenly expect a "git pull" from a subdirectory would merge only the subdirectory the command started from. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12Use cd_to_toplevel in scripts that implement it by hand.Libravatar Junio C Hamano4-29/+11
This converts scripts that do "cd $(rev-parse --show-cdup)" by hand to use cd_to_toplevel. I think git-fetch does not have to go to the toplevel, but that should be dealt with in a separate patch. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12Define cd_to_toplevel shell function in git-sh-setupLibravatar Junio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12Make git-prune-packed a bit more chatty.Libravatar Junio C Hamano3-9/+22
Steven Grimm noticed that git-repack's verbosity is inconsistent because pack-objects is chatty and prune-packed is not. This makes the latter a bit more chatty and gives -q option to squelch it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12glossary typofixLibravatar Junio C Hamano1-1/+1
Pointed out by Paul Witt <paul.witt@oxix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12use 'init' instead of 'init-db' for shipped docs and toolsLibravatar Nicolas Pitre29-45/+42
While 'init-db' still is and probably will always remain a valid git command for obvious backward compatibility reasons, it would be a good idea to move shipped tools and docs to using 'init' instead. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12Explain "Not a git repository: '.git'".Libravatar Junio C Hamano1-1/+5
Andy Parkins noticed that the error message some "whole tree" oriented commands emit is stated misleadingly when they refused to run from a subdirectory. We could probably allow some of them to work from a subdirectory but that is a semantic change that could have unintended side effects, so let's start at first by rewording the error message to be easier to read without doing anything else to be safe. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12merge-recursive: do not report the resulting tree object nameLibravatar Junio C Hamano1-6/+3
It is not available in the outermost merge, and it is only useful for debugging merge-recursive in the inner merges. Sergey Vlasov noticed that the old code accesses an uninitialized location. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12git-revert: Fix die before git-sh-setup defines it.Libravatar Bob Proulx1-1/+2
The code previously checked it's own name and called 'die' upon an error. However 'die' was not yet defined because git-sh-setup had not been sourced yet. Instead simply write the error message to stderr and exit with an error as was originally desired. Signed-off-by: Bob Proulx <bob@proulx.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-12fix documentation for git-commit --no-verifyLibravatar Michael S. Tsirkin1-6/+2
Despite what the documentation claims, git-commit does not check commit for suspicious lines: all hooks are disabled by default, and the pre-comit hook could be changed to do something else. Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Fix up totally buggered read_or_die()Libravatar Linus Torvalds1-14/+8
The "read_or_die()" function would silently NOT die for a partial read, and since it was of type "void" it obviously couldn't even return the partial number of bytes read. IOW, it was totally broken. This hopefully fixes it up. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Clean up write_in_full() usersLibravatar Linus Torvalds2-36/+4
With the new-and-improved write_in_full() semantics, where a partial write simply always returns a real error (and always sets 'errno' when that happens, including for the disk full case), a lot of the callers of write_in_full() were just unnecessarily complex. In particular, there's no reason to ever check for a zero length or return: if the length was zero, we'll return zero, otherwise, if a disk full resulted in the actual write() system call returning zero the write_in_full() logic would have correctly turned that into a negative return value, with 'errno' set to ENOSPC. I really wish every "write_in_full()" user would just check against "<0" now, but this fixes the nasty and stupid ones. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11reflog-expire: brown paper bag fix.Libravatar Junio C Hamano1-6/+12
When --stale-fix is not passed, the code did not initialize the two commit objects properly. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11GIT v1.5.0-rc1Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11plug a few leaks in revision walking used in describe.Libravatar Junio C Hamano2-3/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Chose better tag names in git-describe after merges.Libravatar Shawn O. Pearce1-11/+67
Recently git.git itself encountered a situation on its master and next branches where git-describe stopped reporting 'v1.5.0-rc0-gN' and instead started reporting 'v1.4.4.4-gN'. This appeared to be a backward jump in version numbering. maint o-------------------4 \ \ master o-o-o-o-o-o-o-5-o-C-o-W The issue is that commit C in the diagram claims it is version 1.5.0, as the tag v1.5.0 is placed on commit 5. Yet commit W claims it is version 1.4.4.4 as the tag v1.5.0 has an older tag date than the v1.4.4.4 tag. As it turns out this situation is very common. A bug fix applied to maint and later merged into master occurs frequently enough that it should Just Work Right(tm). Rather than taking the first tag that gets found git-describe will now generate a list of all possible tags and select the one which has the most number of commits in common with HEAD (or whatever revision the user requested the description of). This rule is based on the principle shown in the diagram above. There are a large number of commits on the primary development branch 'master' which do not appear in the 'maint' branch, and many of these are already tagged as part of v1.5.0-rc0. Additionally these commits are not in v1.4.4.4, as they are part of the v1.5.0 release still being developed. The v1.5.0-rc0 tag is more descriptive of W than v1.4.4.4 is, and therefore should be used. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Merge branch 'jc/bare'Libravatar Junio C Hamano17-15/+62
* jc/bare: Disallow working directory commands in a bare repository. git-fetch: allow updating the current branch in a bare repository. Introduce is_bare_repository() and core.bare configuration variable Move initialization of log_all_ref_updates
2007-01-11Merge branch 'ar/merge-recursive'Libravatar Junio C Hamano1-126/+46
* ar/merge-recursive: merge-recursive: do not use on-file index when not needed. Speed-up recursive by flushing index only once for all entries
2007-01-11Merge branch 'jc/detached-head'Libravatar Junio C Hamano7-42/+135
* jc/detached-head: git-checkout: handle local changes sanely when detaching HEAD git-checkout: safety check for detached HEAD checks existing refs git-checkout: fix branch name output from the command git-checkout: safety when coming back from the detached HEAD state. git-checkout: rewording comments regarding detached HEAD. git-checkout: do not warn detaching HEAD when it is already detached. Detached HEAD (experimental) git-branch: show detached HEAD git-status: show detached HEAD
2007-01-11git-status: wording update to deal with deleted files.Libravatar Junio C Hamano1-3/+16
If you do: $ /bin/rm foo $ git status we used to say "git add ... to add content to commit". But suggsting "git add" to record the deletion of a file is simply insane. So this rewords various things: - The section header is the old "Changed but not updated", instead of "Changed but not added"; - Suggestion is "git add ... to update what will be committed", instead of "... to add content to commit"; - If there are removed paths, the above suggestion becomes "git add/rm ... to update what will be committed"; - For untracked files, the suggestion is "git add ... to include in what will be committed". Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11git-rm: do not fail on already removed file.Libravatar Junio C Hamano1-1/+5
Often the user would do "/bin/rm foo" before telling git, but then want to tell git about it. "git rm foo" however would fail because it cannot unlink(2) foo. Treat ENOENT error return from unlink(2) as if a successful removal happened. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Avoid errors and warnings when attempting to do I/O on zero bytesLibravatar Eric Wong2-0/+10
Unfortunately, while {read,write}_in_full do take into account zero-sized reads/writes; their die and whine variants do not. I have a repository where there are zero-sized files in the history that was triggering these things. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Better error messages for corrupt databasesLibravatar Linus Torvalds2-1/+3
This fixes another problem that Andy's case showed: git-fsck-objects reports nonsensical results for corrupt objects. There were actually two independent and confusing problems: - when we had a zero-sized file and used map_sha1_file, mmap() would return EINVAL, and git-fsck-objects would report that as an insane and confusing error. I don't know when this was introduced, it might have been there forever. - when "parse_object()" returned NULL, fsck would say "object not found", which can be very confusing, since obviously the object might "exist", it's just unparseable because it's totally corrupt. So this just makes "xmmap()" return NULL for a zero-sized object (which is a valid thing pointer, exactly the same way "malloc()" can return NULL for a zero-sized allocation). That fixes the first problem (but we could have fixed it in the caller too - I don't personally much care whichever way it goes, but maybe somebody should check that the NO_MMAP case does something sane in this case too?). And the second problem is solved by just making the error message slightly clearer - the failure to parse an object may be because it's missing or corrupt, not necessarily because it's not "found". Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11config-set: check write-in-full returns in set_multivarLibravatar Junio C Hamano1-19/+24
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11index-pack: write-or-die instead of unchecked write-in-full.Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11write_in_full: really write in full or return error on disk full.Libravatar Linus Torvalds1-7/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11Document git-initLibravatar Junio C Hamano2-90/+115
These days, the command does a lot more than just initialise the object database (such as setting default config-variables, installing template hooks...), and "git init" is actually a more sensible name nowadays. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-11write-cache: do not leak the serialized cache-tree data.Libravatar Linus Torvalds1-1/+1
It is not used after getting written, and just is leaking every time we write the index out. Signed-off-by: Junio C Hamano <junkio@cox.net>