- 07 6月, 2005 2 次提交
-
-
由 Daniel Barkalow 提交于
This patch adds code to read a hash out of a specified file under {GIT_DIR}/refs/, and to write such files atomically and optionally with an compare and lock. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Linus Torvalds 提交于
Only with gcc. It fixes some warnings for certain versions of gcc, but not apparently all.
-
- 06 6月, 2005 2 次提交
-
-
由 Linus Torvalds 提交于
Add a "-u" flag to update the tree as a result of a merge. Right now this code is way too anal about things, and fails merges it shouldn't, but let me fix up the different cases and this will allow for much smoother merging even in the presense of dirty data in the working tree.
-
由 Linus Torvalds 提交于
The merge stuff will want it soon, and we don't want to duplicate all the work..
-
- 03 6月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
This adds sha1_file_size() helper function and uses it in the rename/copy similarity estimator. The helper function handles deltified object as well. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Junio C Hamano 提交于
When a remote repository is deltified, we need to get the objects that a deltified object we want to obtain is based upon. The initial parts of each retrieved SHA1 file is inflated and inspected to see if it is deltified, and its base object is asked from the remote side when it is. Since this partial inflation and inspection has a small performance hit, it can optionally be skipped by giving -d flag to git-*-pull commands. This flag should be used only when the remote repository is known to have no deltified objects. Rsync transport does not have this problem since it fetches everything the remote side has. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 02 6月, 2005 2 次提交
-
-
由 Linus Torvalds 提交于
Make a separate helper for parsing the header of an object file (really carefully) and for unpacking the rest. This means that anybody who uses the "unpack_sha1_header()" interface can easily look at the header and decide to unpack the rest too, without doing any extra work.
-
由 Linus Torvalds 提交于
It's for people who aren't necessarily interested in the whole unpacked file, but do want to know the header information (size, type, etc..) For example, the delta code can use this to figure out whether an object is already a delta object, and what it is a delta against, without actually bothering to unpack all of the actual data in the delta.
-
- 23 5月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
Add <limits.h> to the include files handled by "cache.h", and remove extraneous #include directives from various .c files. The rule is that "cache.h" gets all the basic stuff, so that we'll have as few system dependencies as possible.
-
- 21 5月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
This one compares two pathnames that may be partial basenames, not full paths. We need to get the path sorting right, since a directory name will sort as if it had the final '/' at the end.
-
- 20 5月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
With -u flag, git-checkout-cache picks up the stat information from newly created file and updates the cache. This removes the need to run git-update-cache --refresh immediately after running git-checkout-cache. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 18 5月, 2005 1 次提交
-
-
由 Brian Gerst 提交于
- Raw hashes should be unsigned char. - String functions want signed char. - Hash and compress functions want unsigned char. Signed-off By: Brian Gerst <bgerst@didntduck.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 15 5月, 2005 4 次提交
-
-
由 Petr Baudis 提交于
Comment in entry.h said that the cache contents is in the native CPU byte format, which is really not true anymore for quite some time.
-
由 Brad Roberts 提交于
same_name -> ce_same_name() remove_entry_at() -> remove_cache_entry_at() Signed-off-by: NBrad Roberts <braddr@puremagic.com> Signed-off-by: NPetr Baudis <pasky@ucw.cz>
-
由 Brad Roberts 提交于
Signed-off-by: NBrad Roberts <braddr@puremagic.com> Signed-off-by: NPetr Baudis <pasky@ucw.cz>
-
由 Brad Roberts 提交于
xmalloc() and xrealloc() now take their sizes as size_t-type arguments. Introduced complementary xcalloc(). Signed-off-by: NBrad Roberts <braddr@puremagic.com> Signed-off-by: NPetr Baudis <pasky@ucw.cz>
-
- 13 5月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
It is kind of surprising that this was missed in the last round, but the work tree scanner in git-ls-files was still deliberately ignoring symlinks. This patch fixes it, so that --others will correctly report unregistered symlinks. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NPetr Baudis <pasky@ucw.cz>
-
- 11 5月, 2005 1 次提交
-
-
由 Petr Baudis 提交于
This allows git to be built even with linkers which are not smart enough to join those symbols, and makes this correct C. Pointed out by several people.
-
- 10 5月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
During the mailing list discussion on renaming GIT_ environment variables, people felt that having one environment that lets the user (or Porcelain) specify both SHA1_FILE_DIRECTORY (now GIT_OBJECT_DIRECTORY) and GIT_INDEX_FILE for the default layout would be handy. This change introduces GIT_DIR environment variable, from which the defaults for GIT_INDEX_FILE and GIT_OBJECT_DIRECTORY are derived. When GIT_DIR is not defined, it defaults to ".git". GIT_INDEX_FILE defaults to "$GIT_DIR/index" and GIT_OBJECT_DIRECTORY defaults to "$GIT_DIR/objects". Special thanks for ideas and discussions go to Petr Baudis and Daniel Barkalow. Bugs are mine ;-) Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
H. Peter Anvin mentioned that using SHA1_whatever as an environment variable name is not nice and we should instead use names starting with "GIT_" prefix to avoid conflicts. Here is what this patch does: * Renames the following environment variables: New name Old Name GIT_AUTHOR_DATE AUTHOR_DATE GIT_AUTHOR_EMAIL AUTHOR_EMAIL GIT_AUTHOR_NAME AUTHOR_NAME GIT_COMMITTER_EMAIL COMMIT_AUTHOR_EMAIL GIT_COMMITTER_NAME COMMIT_AUTHOR_NAME GIT_ALTERNATE_OBJECT_DIRECTORIES SHA1_FILE_DIRECTORIES GIT_OBJECT_DIRECTORY SHA1_FILE_DIRECTORY * Introduces a compatibility macro, gitenv(), which does an getenv() and if it fails calls gitenv_bc(), which in turn picks up the value from old name while giving a warning about using an old name. * Changes all users of the environment variable to fetch environment variable with the new name using gitenv(). * Updates the documentation and scripts shipped with Linus GIT distribution. The transition plan is as follows: * We will keep the backward compatibility list used by gitenv() for now, so the current scripts and user environments continue to work as before. The users will get warnings when they have old name but not new name in their environment to the stderr. * The Porcelain layers should start using new names. However, just in case it ends up calling old Plumbing layer implementation, they should also export old names, taking values from the corresponding new names, during the transition period. * After a transition period, we would drop the compatibility support and drop gitenv(). Revert the callers to directly call getenv() but keep using the new names. The last part is probably optional and the transition duration needs to be set to a reasonable value. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 08 5月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
When "path" exists as a file or a symlink in the index, an attempt to add "path/file" is refused because it results in file vs directory conflict. Similarly when "path/file1", "path/file2", etc. exist, an attempt to add "path" as a file or a symlink is refused. With git-update-cache --replace, these existing entries that conflict with the entry being added are automatically removed from the cache, with warning messages. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
- 07 5月, 2005 4 次提交
-
-
由 Junio C Hamano 提交于
SHA1_FILE_DIRECTORIES environment variable is a colon separated paths used when looking for SHA1 files not found in the usual place for reading. Creating a new SHA1 file does not use this alternate object database location mechanism. This is useful to archive older, rarely used objects into separate directories. Signed-off-by: NJunio C Hamano <junkio@cox.net>
-
由 Junio C Hamano 提交于
Now all the users have gone. Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
由 Linus Torvalds 提交于
It didn't properly mark all cache updates as being dirty, and causes merge errors due to that. In particular, it didn't notice when a file was force-removed. Besides, it was ugly as hell. I've put in place a slightly cleaner version, but I've not enabled the optimization because I don't want to be burned again.
-
由 Linus Torvalds 提交于
Kind of like ctime(), but not as broken.
-
- 06 5月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
We really always want to have S_IFREG there for non-symlinks, otherwise we create corrupt index files.
-
- 05 5月, 2005 1 次提交
-
-
由 Kay Sievers 提交于
Allow to store and track symlink in the repository. A symlink is stored the same way as a regular file, only with the appropriate mode bits set. The symlink target is therefore stored in a blob object. This will hopefully make our udev repository fully functional. :) Signed-off-by: NKay Sievers <kay.sievers@vrfy.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 04 5月, 2005 1 次提交
-
-
由 Linus Torvalds 提交于
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.
-
- 02 5月, 2005 2 次提交
-
-
由 Junio C Hamano 提交于
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: NJunio C Hamano <junkio@cox.net>
-
由 Linus Torvalds 提交于
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.
-
- 01 5月, 2005 3 次提交
-
-
由 Edgar Toernig 提交于
Not everybody has "d_type".
-
由 Edgar Toernig 提交于
Older zlib's don't have deflateBound()
-
由 Edgar Toernig 提交于
...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.
-
- 29 4月, 2005 1 次提交
-
-
由 Junio C Hamano 提交于
This patch renames read_tree_with_tree_or_commit_sha1() to read_object_with_reference() and extends it to automatically dereference not just "commit" objects but "tag" objects. With this patch, you can say e.g.: ls-tree $tag read-tree -m $(merge-base $tag $HEAD) $tag $HEAD diff-cache $tag diff-tree $tag $HEAD Signed-off-by: NJunio C Hamano <junkio@cox.net> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 27 4月, 2005 1 次提交
-
-
由 Christopher Li 提交于
Introduce xmalloc and xrealloc to die gracefully with a descriptive message when out of memory, rather than taking a SIGSEGV. Signed-off-by: Christopher Li<chrislgit@chrisli.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 26 4月, 2005 2 次提交
-
-
由 Linus Torvalds 提交于
Use "unsigned long" for the size, like we do everywhere else.
-
由 Linus Torvalds 提交于
The write function now adds the header to the file by itself, so there is no reason to duplicate it among all the users any more.
-
- 24 4月, 2005 1 次提交
-
-
由 Daniel Barkalow 提交于
This adds two functions: one to check if an object is present in the local database, and one to add an object to the local database by reading it from a file descriptor and checking its hash. Signed-Off-By: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
-
- 23 4月, 2005 2 次提交
-
-
由 Linus Torvalds 提交于
This one is about a million times simpler, and much more likely to be correct too. Instead of trying to match up a tree object against the index, we just read in the tree object side-by-side into the index, and just walk the resulting index file. This was what all the read-tree cleanups were all getting to.
-
由 Linus Torvalds 提交于
Next step: make "diff-cache" use it.
-