summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-05-06diff-tree: support list if input trees on stdinLibravatar Linus Torvalds1-9/+77
This means that you can do git-rev-list HEAD --max-count=10 | git-diff-tree --stdin update-cache.c to see which (if any) of the last ten commits changed update-cache.c. Use the "-m" flag to see merges too. Normally they are suppressed.
2005-05-06[PATCH] control/limit output of git-rev-listLibravatar Kay Sievers1-2/+31
gitweb.cgi's default view is the log of the last day and git-rev-list can stop crawling the whole repo if we have all our data to display in the browser. Also the rss-feed query needs only the last 20 items. This will speeds up these queries dramatically. usage: rev-list [OPTION] commit-id --max-count=nr --max-age=epoch --min-age=epoch Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06update-cache: remove compiler warningLibravatar Linus Torvalds1-1/+0
"Unused variable len"
2005-05-06[PATCH] fix compare symlink against readlink not dataLibravatar Kay Sievers3-9/+49
Fix update-cache to compare the blob of a symlink against the link-target and not the file it points to. Also ignore all permissions applied to links. Thanks to Greg for recognizing this while he added our list of symlinks back to the udev repository. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-06Steal -t option to git-ls-files from Cogito fork.Libravatar Petr Baudis2-10/+36
This backports the -t option git-ls-files in Cogito added to the Linus version. Signed-off-by: Petr Baudis <pasky@ucw.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-06Implement -v (verbose) option for pull methods other than local transport.Libravatar Junio C Hamano6-15/+60
This moves the private "say()" function to pull.c, renames it to "pull_say()", and introduces a global variable "get_verbosely" that makes the pull backends report what they fetch. The -v option is added to git-rpull and git-http-pull to match git-local-pull. The documentation is updated to describe these pull commands. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-06Add http and local transport support for git-pull-script.Libravatar Junio C Hamano1-6/+31
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Add documentation for the rest of commands.Libravatar Junio C Hamano1-0/+104
This adds descriptions for the core GIT commands that were not mentioned in the previous version. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Adjust core-git documentation to more recent Linus GIT.Libravatar Junio C Hamano1-287/+294
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Reference documentation for the core git commands.Libravatar David Greaves1-0/+1128
Signed-off-by: David Greaves <david@dgreaves.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Merge of http://members.cox.net/junkio/git-jc.gitLibravatar Linus Torvalds5-67/+217
2005-05-05[PATCH] create subdirs for symlinksLibravatar Kay Sievers1-0/+1
We may need to create subdirectories, before we can create a symlink. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05Be more careful about tree entry modes.Libravatar Linus Torvalds3-2/+28
The tree object parsing used to get the executable bit wrong, and didn't know about symlinks. Also, fsck really wants the full mode value so that it can verify the other bits for sanity, so save it all in struct tree_entry.
2005-05-05Octopus merge of the following five patches.Libravatar Junio C Hamano4-29/+116
Update git-apply-patch-script for symbolic links. Make git-prune-script executable again. Do not write out new index if nothing has changed. diff-cache shows differences for unmerged paths without --cache. Update diff engine for symlinks stored in the cache. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Update git-apply-patch-script for symbolic links.Libravatar Junio C Hamano1-38/+101
This patch updates the git-apply-patch-script for the symbolic links in the cache, recently added by Kay Sievers. It currently is very anal about symbolic link changes. It refuses to change between a regular file and a symbolic link, and only allows symbolic link changes if the patch is based on the same original. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Update diff engine for symlinks stored in the cache.Libravatar Junio C Hamano1-22/+56
This patch updates the external diff interface engine for the change to store the symbolic links in the cache, recently done by Kay Sievers. The main thing it does is when comparing with the work tree, it prepares the counterpart to the blob being compared by doing a readlink followed by sending that result to a temporary file to be diffed. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Fix git-resolve-script.Libravatar Linus Torvalds1-1/+1
I'd stupidly forgotten one merge_head -> merge conversion, and all my tests were for the fast-forward case that never triggered the bug.
2005-05-05Fix symlink handlingLibravatar Linus Torvalds1-3/+1
We really always want to have S_IFREG there for non-symlinks, otherwise we create corrupt index files.
2005-05-05diff-cache shows differences for unmerged paths without --cache.Libravatar Junio C Hamano1-4/+19
While manually resolving a merge conflict, being able to run diff-cache without --cache option between files in the work tree and either of the ancestor trees is helpful to verify the hand merged result. However, diff-cache refuses to handle unmerged paths, even when run without --cache option. This changes the behaviour so that the above use case will report the differences between the compared tree and the magic 0{40} SHA1 (i.e. "look at the work tree"). When there is no corresponding file in the work tree, or when the command is run with "--cache" option, it continues to report "unmerged". Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Do not write out new index if nothing has changed.Libravatar Junio C Hamano1-3/+41
The git-update-cache command, especially with --refresh, may not change anything. In such a case, writing 1.6MB of the same thing is a waste. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05Make git-prune-script executable again.Libravatar Junio C Hamano1-0/+0
I do not know why the executable bit was lost since the change went in as GIT pull, not via e-mail patch, but here is a fix. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-05[PATCH] git: Mention the '-p' option in the usage help string if git-diff-tree.Libravatar Thomas Glanzmann1-1/+1
Mention the '-p' option in the usage help string of git-diff-tree. Signed-Off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de> Signed-Off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05Split "git-pull-script" into two partsLibravatar Linus Torvalds3-46/+58
Separate out the merge resolve from the actual getting of the data. Also, update the resolve phase to take advantage of the fact that we don't need to do the commit->tree object lookup by hand, since all the actors involved happily just act on a commit object these days.
2005-05-05git-diff-cache: add "-m" flag to match all non-checked-out files with the index.Libravatar Linus Torvalds1-2/+13
This allows you to work with a directory tree that isn't fully populated, without making diff-cache say that all the files are gone.
2005-05-05[PATCH] git and symlinks as tracked contentLibravatar Kay Sievers7-27/+74
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: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05[PATCH] Fix git rpush.Libravatar Anton Altaparmakov1-1/+1
Following up from my fix to rpull, please also apply this, which fixes rpush.c to call git-rpull rather than rpull which no longer exists after the Big Rename(TM)... Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05[PATCH] Fix git rpull.Libravatar Anton Altaparmakov1-1/+1
This fixes rpull.c to call git-rpush rather than rpush which no longer exists after the Big Rename(TM)... Signed-off-by: Anton Altaparmakov <aia21@cantab.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05git-pull-script: do the diffstat also for the fast-forward caseLibravatar Linus Torvalds1-0/+1
This way you always see what the state change was.
2005-05-04Merge http://members.cox.net/junkio/git-jc.git/Libravatar Linus Torvalds8-87/+231
2005-05-04Make "git-prune-script" take all refs into account.Libravatar Linus Torvalds1-1/+3
This avoids pruning the kernel v2.6.11 tree that now has a tag.
2005-05-04Teach fsck-cache to accept non-commits for reachability analysis.Libravatar Linus Torvalds2-5/+5
In particular, teach it about tags. Also, to make reachability actually work for tags, we need to add the ref to the tagged object.
2005-05-04Teach "git-pull-script" about alternate HEAD's to pull..Libravatar Linus Torvalds1-2/+3
People are already starting to use a multi-head model.
2005-05-04[PATCH] Fix memory leaks in git-fsck-cacheLibravatar Sergey Vlasov5-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>
2005-05-04When the patch tries to create a new file and the file exists, abort.Libravatar Junio C Hamano1-0/+9
This fixes an error introduced to git-apply-patch-script in the previous round. We do not invoke patch for create/delete case, so we need to be a bit careful about detecting conflicts like this. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-04git-pull-script: add a final "diffstat" to show the result of the merge.Libravatar Linus Torvalds1-0/+1
This is useful to verify that you got the right thing.
2005-05-04Optimize diff-cache -p --cachedLibravatar Junio C Hamano3-24/+62
This patch optimizes "diff-cache -p --cached" by avoiding to inflate blobs into temporary files when the blob recorded in the cache matches the corresponding file in the work tree. The file in the work tree is passed as the comparison source in such a case instead. This optimization kicks in only when we have already read the cache this optimization and this is deliberate. Especially, diff-tree does not use this code, because changes are contained in small number of files relative to the project size most of the time, and reading cache is so expensive for a large project that the cost of reading it outweighs the savings by not inflating blobs. Also this patch cleans up the structure passed from diff clients by removing one unused structure member. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-04Terminate diff-* on non-zero exit from GIT_EXTERNAL_DIFFLibravatar Junio C Hamano2-40/+55
(slightly updated from the version posted to the GIT mailing list with small bugfixes). This patch changes the git-apply-patch-script to exit non-zero when the patch cannot be applied. Previously, the external diff driver deliberately ignored the exit status of GIT_EXTERNAL_DIFF command, which was a design mistake. It now stops the processing when GIT_EXTERNAL_DIFF exits non-zero, so the damages from running git-diff-* with git-apply-patch-script between two wrong trees can be contained. The "diff" command line generated by the built-in driver is changed to always exit 0 in order to match this new behaviour. I know Pasky does not use GIT_EXTERNAL_DIFF yet, so this change should not break Cogito, either. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-04Git-prune-script loses blobs referenced from an uncommitted cache.Libravatar Junio C Hamano2-5/+60
(updated from the version posted to GIT mailing list). When a new blob is registered with update-cache, and before the cache is written as a tree and committed, git-fsck-cache will find the blob unreachable. This patch adds a new flag, "--cache" to git-fsck-cache, with which it keeps such blobs from considered "unreachable". The git-prune-script is updated to use this new flag. At the same time it adds .git/refs/*/* to the set of default locations to look for heads, which should be consistent with expectations from Cogito users. Without this fix, "diff-cache -p --cached" after git-prune-script has pruned the blob object will fail mysteriously and git-write-tree would also fail. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-04Short-cut error return path in git-local-pull.Libravatar Junio C Hamano1-9/+16
When git-local-pull with -l option gets ENOENT attempting to create a hard link, there is no point falling back to other copy methods. With this patch, git-local-pull detects such a case and gives up copying the file early. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-04Make git-*-pull say who wants them for missing objects.Libravatar Junio C Hamano1-7/+30
This patch updates pull.c, the engine that decides which objects are needed, given a commit to traverse from, to report which commit was calling for the object that cannot be retrieved from the remote side. This complements git-fsck-cache in that it checks the consistency of the remote repository for reachability. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-05-03sha1_file: make the new sha1 object writing be coda-friendly.Libravatar Linus Torvalds1-1/+14
Coda doesn't like cross-directory hardlinks. So try to fall back on a plain rename instead.
2005-05-03Improve sha1 object file writing.Libravatar Linus Torvalds2-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.
2005-05-03fsck-cache: fix SIGSEGV on bad tag objectLibravatar Linus Torvalds1-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>
2005-05-03Automatic merge of /home/torvalds/junkio/.git/Libravatar Linus Torvalds7-90/+114
2005-05-02fsck-cache: report broken links correctlyLibravatar Linus Torvalds1-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.
2005-05-02Make fsck-cache do better tree checking.Libravatar Linus Torvalds3-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).
2005-05-02[PATCH] Fix warning in convert-cacheLibravatar tony.luck@intel.com1-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>
2005-05-02fsck-cache: sort entries by inode numberLibravatar Linus Torvalds1-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.
2005-05-01Update git-merge-one-file-script.Libravatar Junio C Hamano1-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>
2005-05-01Implement git-update-cache --force-remove <path>Libravatar Junio C Hamano1-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>