summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Fix memory leaks in git-fsck-cacheSergey Vlasov2005-05-045-11/+27
| | | | | | | | This patch fixes memory leaks in parse_object() and related functions; these leaks were very noticeable when running git-fsck-cache. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-pull-script: add a final "diffstat" to show the result of the merge.Linus Torvalds2005-05-041-0/+1
| | | | This is useful to verify that you got the right thing.
* sha1_file: make the new sha1 object writing be coda-friendly.Linus Torvalds2005-05-031-1/+14
| | | | | Coda doesn't like cross-directory hardlinks. So try to fall back on a plain rename instead.
* Improve sha1 object file writing.Linus Torvalds2005-05-032-96/+39
| | | | | | | | | | | Make it much safer: we write to a temporary file, and then link that temporary file to the final destination. This avoids all the nasty races if several people write the same object at the same time. It should also result in nicer on-disk layout, since it means that objects all get created in the same subdirectory. That makes a lot of block allocation algorithms happier, since the objects will now be allocated from the same zone.
* fsck-cache: fix SIGSEGV on bad tag objectLinus Torvalds2005-05-031-5/+8
| | | | | | | | | | | fsck_tag() failes to notice that the parsing of the tag may have failed in the parse_object() call on the object that it is tagging. Noticed by Junio. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Automatic merge of /home/torvalds/junkio/.git/Linus Torvalds2005-05-037-90/+114
|\
| * Update git-merge-one-file-script.Junio C Hamano2005-05-011-38/+26
| | | | | | | | | | | | | | | | | | With this change, git-merge-one-file-script ceases to smudge files in the work tree when recording the trivial merge results (conflicting auto-merge failure case does not touch the work tree file as before). Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Implement git-update-cache --force-remove <path>Junio C Hamano2005-05-011-0/+9
| | | | | | | | | | | | | | | | This new flag tells git-update-cache to remove the named path even when the work tree still happens to have the file. It is used to update git-merge-one-file-script not to smudge the work tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Add git-write-blob.Junio C Hamano2005-05-015-52/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A new command, git-write-blob, is introduced. This registers the contents of any file on the filesystem as a blob in the object database and reports its SHA1 to the standard output. To implement it, the patch promotes index_fd() from a static function in update-cache.c to extern and moves it to a library source, sha1_file.c. This command is used to update git-merge-one-file-script so that it does not smudge the work tree. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Make git-apply-patch-script executable.Junio C Hamano2005-05-011-0/+0
| |
* | fsck-cache: report broken links correctlyLinus Torvalds2005-05-021-1/+1
| | | | | | | | | | We reported the type of te missing object incorrectly: we reported it as the type of the referrer object, not the object that was referred to.
* | Make fsck-cache do better tree checking.Linus Torvalds2005-05-023-7/+57
| | | | | | | | | | | | | | We check the ordering of the entries, and we verify that none of the entries has a slash in it (this allows us to remove the hacky "has_full_path" member from the tree structure, since we now just test it by walking the tree entries instead).
* | [PATCH] Fix warning in convert-cachetony.luck@intel.com2005-05-021-1/+1
| | | | | | | | | | | | | | | | | | gcc 3.4.3 kicks out this warning: convert-cache.c: In function `write_subdirectory': convert-cache.c:102: warning: field precision is not type int (arg 4) Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | fsck-cache: sort entries by inode numberLinus Torvalds2005-05-021-16/+73
|/ | | | | | | | | This improves the cold-cache behaviour on most filesystems, since it makes the fsck access patterns more regular on the disk, rather than seeking back and forth. Note the "most". Not all filesystems have any relationship between inode number and location on disk.
* Change the prefix for builtin diff generation.Linus Torvalds2005-05-011-1/+1
| | | | | | | | | | It's silly, and it shouldn't matter, but every time I look at the diffs, I ended up just worrying why "l/" and "k/" as the prefixes. Junio says it's a tribute to linux-kernel, but graciously also said I can change it to something else. So make it "a/" and "b/" until somebody else complains ;)
* [PATCH] git-export complains about mising cat-fileAlexey Nezhdanov2005-05-012-5/+5
| | | | | | | Fixes bits leaved during name change. Signed-off-by: Alexey Nezhdanov <snake@penza-gsm.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] git-local-pull updatesJunio C Hamano2005-05-011-24/+41
| | | | | | | | | | | This is to be applied on top of the previous patch to add git-local-pull command. In addition to the '-l' (attempt hardlink before anything else) and the '-s' (then attempt symlink) flags, it adds '-n' (do not fall back to file copy) flag. Also it updates the comments. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] typo fixes to git-apply-patch-scriptJunio C Hamano2005-05-011-4/+2
| | | | | | | | | | | When git-apply-patch-script creates a new file without executable mode set, a typo caused it not to report that activity to the user. Also it was mistakenly running git-update-cache twice for newly created or deleted paths. This patch fixes these problems. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Add git-local-pull.Junio C Hamano2005-05-012-1/+112
| | | | | | | | This adds the git-local-pull command as a smaller brother of http-pull and rpull. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Do not call fetch() when we have it.Junio C Hamano2005-05-013-11/+12
| | | | | | | | | | | | | Currently pull() calls fetch() without checking whether we have the wanted object but all of the existing fetch() implementations perform this check and return success themselves. This patch moves the check to the caller. I will be sending a trivial git-local-pull which depends on this in the next message. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Make git-update-cache --refresh fail if update/merge needed.Junio C Hamano2005-05-011-5/+10
| | | | | | | | | | | | Scripts may find it useful if they do not have to parse the output from the command but just can rely on its exit status. Earlier both Linus and myself thought this would be necessary to make git-prune-script safer but it turns out that the issue was somewhere else and not related to what this patch addresses. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Fix missing '\n' at end of git-cat-file -t output.Linus Torvalds2005-05-011-0/+1
|
* Make "cat-file" use "read_object_with_reference()"Linus Torvalds2005-05-011-9/+12
| | | | | | | | | | | | | | | | | This means that you can take a tag object, and do git-cat-file commit tagname and it will cat the commit that the tag points to. Or you can cat the tree that a commit (or tag) points to. It still gives the old behaviour if you just give it the original type, ie if you want to see the tag object itself, you'd do git-cat-file -t tagname and you'd get the expected tag output.
* Remove the ugly jit-style parent syntax.Linus Torvalds2005-05-011-44/+0
| | | | | | | | If somebody wants it later, we can re-do it, but for now we consider it an experiment that wasn't worth it. Git will still honor symbolic names, it just won't look up parents for you. Of course, you can always do it by hand if you want to.
* Add "look up parent" logic for the simple names.Linus Torvalds2005-05-011-5/+62
| | | | | | | It uses the jit syntax, at least for now. 0-xxxx is the first parent of xxxx, while 1-xxxx is the second, and so on. You can use just "-xxxx" for the first parent, but a lot of commands will think that the initial '-' implies a command line flag.
* Add "get_sha1()" helper function.Linus Torvalds2005-05-0116-16/+46
| | | | | | | | | | | | This allows the programs to use various simplified versions of the SHA1 names, eg just say "HEAD" for the SHA1 pointed to by the .git/HEAD file etc. For example, this commit has been done with git-commit-tree $(git-write-tree) -p HEAD instead of the traditional "$(cat .git/HEAD)" syntax.
* date handling: handle "AM"/"PM" on timeLinus Torvalds2005-05-012-9/+23
| | | | | | | | And be a bitmore careful about matching: if we don't recognize a word or a number, we skip the whole thing, rather than trying the next character in that word/number. Finally: since ctime() adds the final '\n', don't add another one in test-date.
* date.c: allow even more varied time formatsLinus Torvalds2005-05-011-54/+152
| | | | (and some added checks for truly non-sensical stuff)
* [PATCH] Allow removing files in a subdirectory.Junio C Hamano2005-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I found this during a conflict merge testing. The original did not have either DF (a file) or DF/DF (a file DF/DF under a directory DF). One side created DF, the other created DF/DF. I first resolved DF as a new file by taking what the first side did. After that, the entry DF/DF cannot be resolved by running git-update-cache --remove although it does not exist on the filesystem. $ /bin/ls -F AN DF MN NM NN SS Z/ $ git-ls-files --stage | grep DF 100644 71420ab81e254145d26d6fc0cddee64c1acd4787 0 DF 100644 68a6d8b91da11045cf4aa3a5ab9f2a781c701249 2 DF/DF $ git-update-cache --remove DF/DF fatal: Unable to add DF/DF to database It turns out that the errno from open() in this case was not ENOENT but ENOTDIR, which the code did not check. Here is a fix. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Really fix git-merge-one-file-script this time.Junio C Hamano2005-05-011-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The merge-cache program was updated to pass executable bits when calling git-merge-one-file-script, but the called script supplied as an example were not using them carefully. This patch fixes the following problems in the script: * When a new file is created in a directory, which is a file in the work tree, it tried to create leading directory but did not check for failure from the "mkdir -p" command. * The script did not check the exit status from the git-update-cache command at all. * The parameter "$4" to the script is a file name that can contain almost any characters, so it must be quoted with double quotes and also needs to be preceded with -- to mark it as a non-option when passed to certain commands. * The chmod command was used with parameter "$6" or "$7" to set the mode bits. This contradicts with the strategy taken by checkout-cache, where we honor user's umask and force only the executable bits. With this patch, it creates a new file by redirecting into it (thus honoring user's default umask), and then uses "chmod +x" if we want the resulting file executable. Without this fix, the merge result becomes 0644 or 0755 for users whose umask is 002 for whom it should become 0664 or 0775. * When "$1 -> $2 -> $3" case was not handled, the script did not say which path it was working on, which was not so useful when used with the -a option of git-merge-cache. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Add git-apply-patch-script.Junio C Hamano2005-05-012-2/+62
| | | | | | | | | | | | | | | | | | | | | | | I said: - Stop attempting to be compatible with cg-patch, and drop (mode:XXXXXX) bits from the diff. - Do keep the /dev/null change for created and deleted case. - No "Index:" line, no "Mode change:" line, anywhere in the output. Anything that wants the mode bits and sha1 hash can do things from GIT_EXTERNAL_DIFF mechanism. Maybe document suggested usage better. This adds an example script git-apply-patch-script, that can be used as the GIT_EXTERNAL_DIFF to apply changes between two trees directly on the current work tree, like this: GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p <tree> <tree> Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Rework built-in diff to make its output more dense.Junio C Hamano2005-05-011-11/+15
| | | | | | | | | | | | | | Linus says, The fewer lines there are that don't usually tell a human anything, the better. Dense is good. This patch makes the default diff output more dense. This removes the previous misguided attempt to be cg-patch compatible. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Resurrect diff-tree-helper -RJunio C Hamano2005-04-301-6/+11
| | | | | | | | | | | Diff-tree-helper take two patch inadvertently dropped the support of -R option, which is necessary to produce reverse diff based on diff-cache and diff-files output (diff-tree does not matter since you can feed two trees in reverse order). This patch restores it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Split out "pull" from particular methodsDaniel Barkalow2005-04-305-154/+114
| | | | | | | | | | The method for deciding what to pull is useful separately from any of the ways of actually fetching the objects. So split out "pull" functionality from http-pull and rpull Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* rev-tree.c: don't include unnecessary header filesLinus Torvalds2005-04-301-5/+0
| | | | We used to have all these time-related issues, long gone now.
* date.c: fix printout of timezone offsets that aren't exact hoursLinus Torvalds2005-04-301-2/+8
| | | | We'd get the sign wrong for the minutes part of a negative offset.
* date.c: only use the TZ names if we don't have anything better.Linus Torvalds2005-04-301-1/+5
| | | | Also, add EEST (hey, it's Finland).
* date.c: split up dst information in the timezone tableLinus Torvalds2005-04-301-45/+51
| | | | | | | | | This still doesn't actually really _use_ it properly, nor make any distinction between different DST rules, but at least we could (if we wanted to) fake it a bit better. Right now the code actually still says "it's always summer". I'm from Finland, I don't like winter.
* date.c: fix parsing of dates in mm/dd/yy formatLinus Torvalds2005-04-301-1/+3
| | | | | We looked at the year one character too early, and we didn't accept a two-character year date after 2000.
* date.c: use the local timezone if none specifiedLinus Torvalds2005-04-301-2/+7
|
* [PATCH] fix usage string for renamed git commandsNicolas Pitre2005-04-302-6/+6
| | | | | Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Make the date parsing accept pretty much any random crap.Linus Torvalds2005-04-303-106/+238
| | | | This date parser turns line-noise into a date. Cool.
* Make git-fsck-cache error printouts a bit more informative.Linus Torvalds2005-04-301-12/+18
| | | | | | Show the types of objects involved in broken links, and don't bother warning about unreachable tag files (if somebody cares about tags, they'll use the --tags flag to see them).
* Rename "show-files" to "ls-files"Linus Torvalds2005-04-302-2/+2
| | | | As suggested by Nicolas Pitre
* Fix up d_type handling - we need to include <dirent.h> beforeLinus Torvalds2005-04-301-2/+1
| | | | we play with the d_type compatibility macros.
* [PATCH] compat: replace AF_LOCAL with AF_UNIXEdgar Toernig2005-04-302-5/+5
| | | | | There's no AF_LOCAL in POSIX
* [PATCH] compat: missing dirent.d_type fieldEdgar Toernig2005-04-302-1/+10
| | | | | Not everybody has "d_type".
* [PATCH] compat: support pre-1.2 zlibEdgar Toernig2005-04-301-0/+4
| | | | | Older zlib's don't have deflateBound()
* [PATCH] Do date parsing by hand...Edgar Toernig2005-04-304-27/+191
| | | | | | | | | | | | | | ...since everything out there is either strange (libc mktime has issues with timezones) or introduces unnecessary dependencies for people (libcurl). This goes back to the old date parsing, but moves it out into a file of its own, and does the "struct tm" to "seconds since epoch" handling by hand. I grepped through the tz-database and it seems there's one "country" left that has non-60-minute DST: Lord Howe Island. All others dropped that before 1970.
* [PATCH] Fix AUTHOR_DATE timezone confusiontony.luck@intel.com2005-04-292-133/+11
| | | | | | | | | | This switches git-commit-tree to using curl_getdate() for the AUTHOR_DATE, and thus fixes the problem with "mktime()" parsing dates in the local timezone. It also ends up being more permissive about the format of the date. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>