summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-06-25git-pack-objects: fix typoLibravatar Linus Torvalds1-1/+1
("<" should be "=")
2005-06-25git-pack-objects: create a packed object representation.Libravatar Linus Torvalds2-1/+406
This is kind of like a tar-ball for a set of objects, ready to be shipped off to another end. Alternatively, you could use is as a packed representation of the object database directly, if you changed "read_sha1_file()" to read these kinds of packs. The latter is partiularly useful to generate a "packed history", ie you could pack up your old history efficiently, but still have it available (at a performance hit, of course). I haven't actually written an unpacker yet, so the end result has not been verified in any way yet. I obviously always write bug-free code, so it just has to work, no?
2005-06-25[PATCH] git-write-tree doesn't check alternate directoriesLibravatar Jan Harkes1-5/+4
git-write-tree failed when referenced objects only exist in the GIT_ALTERNATE_OBJECT_DIRECTORIES path. Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Acked-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-24git-rev-list: add option to list all objects (not just commits)Libravatar Linus Torvalds1-0/+91
When you do git-rev-list --objects $(git-rev-parse HEAD^..HEAD) it now lists not only the "commit difference" between the parent of HEAD and HEAD itself (which is normally just the parent, but in the case of a merge will be all the newly merged commits), but also all the new tree and blob objects that weren't in the original. NOTE! It doesn't walk all the way to the root, so it doesn't do a full object search in the full old history. Instead, it will only look as far back in the history as it needs to resolve the commits. Thus, if the commit reverts a blob (or tree) back to a state much further back in history, we may end up listing some blobs (or trees) as "new" even though they exist further back. Regardless, the list of objects will be a superset (usually exact) list of objects needed to go from the beginning commit to ending commit. As a particularly obvious special case, git-rev-list --objects HEAD will end up listing every single object that is reachable from the HEAD commit. Side note: the objects are sorted by "recency", with commits first.
2005-06-24git-rev-parse: re-organize and be more carefulLibravatar Linus Torvalds1-26/+81
Output default revisions as their hex SHA1 names to be consistent. Add "--verify" flag that verifies that we output a single ref and not more (and disables ref arguments).
2005-06-23Add "git-patch-id" program to generate patch ID's.Libravatar Linus Torvalds2-1/+81
A "patch ID" is nothing but a SHA1 of the diff associated with a patch, with whitespace and line numbers ignored. As such, it's "reasonably stable", but at the same time also reasonably unique, ie two patches that have the same "patch ID" are almost guaranteed to be the same thing. IOW, you can use this thing to look for likely duplicate commits.
2005-06-23Clean up git-diff-tree 'header' generationLibravatar Linus Torvalds1-12/+6
2005-06-23git-apply: take "--apply" flag to force an apply even if we also ask for a ↵Libravatar Linus Torvalds1-1/+4
diffstat Also, remove debugging statement about applying a fragment at an offset.
2005-06-23Make "git fetch" able to fetch a named tagLibravatar Linus Torvalds1-2/+8
Use "git fetch <repo> tag <tagname>" to get the named tag and everything it points to.
2005-06-22[PATCH] Fix to how --merge-order handles multiple rootsLibravatar Jon Seymour1-4/+7
This patch addresses the problem reported by Paul Mackerras such that --merge-order did not report the last root of a graph with merge of two independent roots. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[PATCH] A test case that demonstrates a problem with merges with two roots.Libravatar Jon Seymour1-0/+61
git-rev-list --merge-order is omitting one of the roots when displaying a merge containing two distinct roots. A subsequent patch will fix the problem. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22Don't ignore reachability of tag objects in fsckLibravatar Linus Torvalds1-4/+0
We used to ignore unreachable tags, which just causes problems: it makes "git prune" leave them around, but since we'll have prune everything that tag points to, the tag object really should be removed too. So remove the code that made us think tags were always reachable.
2005-06-22Add "git-clone-script" thingyLibravatar Linus Torvalds2-1/+9
It's just a trivial wrapper, but it should make Jeff's kernel developer guide to git look a bit less intimidating.
2005-06-22[PATCH] Fix --merge-order unit test breaks introduced by ↵Libravatar Jon Seymour1-12/+3
6c88be169881c9223532796bd225e79afaa115e1 The sensible cleanup of the in-memory storage order of commit parents broke the --merge-order code which was dependent on the previous behaviour of parse_commit(). This patch restores the correctness --merge-order behaviour by taking account of the new behaviour of parse_commit. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22Add "gitk" to the list of scripts to be installed automatically.Libravatar Linus Torvalds1-1/+1
Btw, it's fun just looking at the merged git repository itself with gitk, now that it has two "roots".
2005-06-22Do a cross-project merge of Paul Mackerras' gitk visualizerLibravatar Linus Torvalds1-0/+1711
gitk is really quite incredibly cool, and is great for visualizing what is going on in a git repository. It's especially useful when you are looking at what has changed since a particular version, since it gracefully handles partial trees (and this also avoids the expense of looking at _all_ changes in a big project). For example, to see what changed in a merge after a "git pull", do gitk ORIG_HEAD.. to see only the new things. Or you can simply do "gitk v2.6.12.." to see what has changed since the v2.6.12 tag etc. This merge itself is pretty interesting too, since it shows off a feature of git itself that is incredibly cool: you can merge a _separate_ git project into another git project. Not only does this keep all the history of the original project, it also makes it possible to continue to merge with the original project and the union of the two projects. I don't think anybody else can do that.
2005-06-22[PATCH] git-apply: tests for --stat and --summary.Libravatar Junio C Hamano15-0/+2152
This adds tests (which also serves demonstration) for the --stat and --summary flags to the git-apply command. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[PATCH] git-apply: documentation.Libravatar Junio C Hamano1-0/+72
Add missing documentation for git-apply. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[PATCH] git-apply: implement --summary option.Libravatar Junio C Hamano1-1/+93
Typical expected usage is "git-apply --stat --summary" to show diffstat plus dense description of information available in git extended headers, such as creations, renames, and mode changes. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[PATCH] git-apply --stat: show new filename for rename/copy patch.Libravatar Junio C Hamano1-2/+2
When a patch is a git extended rename/copy patch, "git-apply --stat" showed the old filename. Change it to show the new filename, because most of the time we are interested in looking at the resulting tree. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[PATCH] local-pull: implement fetch_ref()Libravatar Junio C Hamano2-5/+33
This makes "-w ref" usable for git-local-pull. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22Try to assign colors so crossing lines have different colorsLibravatar Paul Mackerras1-11/+71
In particular try hard to give different colors to lines that cross at a corner in one of the lines.
2005-06-22Account for indentation of the checkin comments by git-rev-listLibravatar Paul Mackerras1-1/+6
This involves adding indentation when we read a commit with git-cat-file and trimming the whitespace from the headline.
2005-06-21git-apply: create subdirectories leading up to a new fileLibravatar Linus Torvalds1-2/+47
Applying Andrew's latest patch-bomb showed us failing miserably if a new subdirectory needed to be created.. That said, it's uncommon enough that it's worth optimistically assuming it won't be needed, and then creating the subdirectories only on failure.
2005-06-21[PATCH] Pull refs by HTTPLibravatar Daniel Barkalow1-2/+47
This adds support for refs to http-pull, both the -w option and reading the target from a served file. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] Pull misc objectsLibravatar Daniel Barkalow1-1/+34
Make pull fetch whatever is specified, parse it to figure out what it is, and then process it appropriately. This also supports getting tag objects, and getting whatever they tag. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] Parse tags for absent objectsLibravatar Daniel Barkalow3-4/+27
Handle parsing a tag for a non-present object. This adds a function to lookup an object with lookup_* for * in a string, so that it can get the right storage based on the "type" line in the tag. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22Use git-rev-list --header.Libravatar Paul Mackerras1-94/+94
With --header, git-rev-list gives us the contents of the commit in-line, so we don't need to exec a git-cat-file to get it, and we don't need the readobj command either. Also fixed a residual problem with handling the commit that has a parent listed twice.
2005-06-21Fix typo in git-checkout-script.Libravatar Linus Torvalds1-1/+1
The confusion between "revs" vs "refs" caused us to not find the branch name, which in turn meant that we never switched the HEAD over to it.
2005-06-21Remove MERGE_HEAD in "git checkout/reset"Libravatar Linus Torvalds2-1/+14
Both of these scripts will end up resetting the index to some specific head, and any unresolved merge will be forgotten.
2005-06-21Clean up different special *HEAD handlingLibravatar Linus Torvalds3-5/+5
We codify the following different heads (in addition to the main "HEAD", which points to the current branch, of course): - FETCH_HEAD Populated by "git fetch" - ORIG_HEAD The old HEAD before a "git pull/resolve" (successful or not) - LAST_MERGE The HEAD we're currently merging in "git pull/resolve" - MERGE_HEAD The previous head of a unresolved "git pull", which gets committed by a "git commit" after manually resolving the result We used to have "MERGE_HEAD" be populated directly by the fetch, and we removed ORIG_HEAD and LAST_MERGE too aggressively.
2005-06-21[PATCH] Fix several gcc4 signedness warningsLibravatar Mika Kukkonen5-12/+12
Here is a patch that fixes several gcc4 warnings about different signedness, all between char and unsigned char. I tried to keep the patch minimal so resertod to casts in three places. Signed-off-by: Mika Kukkonen <mikukkon@iki.fi> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21git checkout: fix default head caseLibravatar Linus Torvalds1-1/+1
The "${new=$old}" syntax only works for an undefined 'new', not for an empty one. I knew that. Really. I'm not stupid.
2005-06-21Make "git checkout" know about different branchesLibravatar Linus Torvalds1-16/+23
Now "git checkout xyzzy" will check out branch "xyzzy" and switch the HEAD to it.
2005-06-21"git checkout": add "-u" flag to update HEAD conditionallyLibravatar Linus Torvalds1-6/+9
And fix braino on testing "-f".
2005-06-21Add "git checkout" that does what the name suggestsLibravatar Linus Torvalds2-1/+31
It is careful by default and refuses to overwrite old info, but if you want to force everything to be re-read, use the "-f" flag. Some day I'll make it take individual filenames too. Right now it's all-or-nothing.
2005-06-21[PATCH] fix scalability problems with git-deltafy-scriptLibravatar Nicolas Pitre1-18/+32
Current version would spin forever and exhaust memory while attempting to sort all files from all revisions at once, until it dies before even doing any real work. This is especially noticeable when used on a big repository like the imported bkcvs repo for the Linux kernel. This patch allows for batching the sort to put a bound on needed resources and making progress early, as well as including some small cleanups. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21[PATCH] git-apply: Don't barf when --stat'ing a diff with no line changes.Libravatar Sven Verdoolaege1-3/+5
Diffs with only mode changes didn't pass through git-apply --stat. [ Linus' note: they did for me, on my ppc64, where division by zero just silently returns zero. Duh. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20Let "git commit" take arguments for files to commit.Libravatar Linus Torvalds1-0/+1
It does a "git-update-cache" on the arguments, meaning that you can commit files without doing a separate "git-update-cache". This commit was done with git commit git-commit-script for example.
2005-06-20Add "-q" flag to git-update-cacheLibravatar Linus Torvalds1-5/+11
It suppresses the "needs update" message for subsequent "--refresh" cases (but not other errors). Will be useful for "git commit". Stay tuned.
2005-06-20Change parent syntax to "xyz^" instead of "xyz.p"Libravatar Linus Torvalds1-5/+5
The ".pN" thing might be a common ending of a tag, and in contrast, ^ already is a special character for revisions so use that instead.
2005-06-20Make rev-parse understand "extended sha1" syntaxLibravatar Linus Torvalds1-4/+57
You can say "HEAD.p" for the "parent of HEAD". It nests, so HEAD.p2.p means parent of second parent of HEAD (which obviously depends on HEAD being a merge).
2005-06-20Keep the parents in order when parsing commitsLibravatar Linus Torvalds1-1/+3
We used to keep the parents in reverse order in the commit_list. Most users don't care, but it's wrong, and the next commit does care.
2005-06-21Pass arguments through git-rev-parse.Libravatar Paul Mackerras1-4/+12
This allows the user to specify ranges more flexibly; for instance the user can now do "gitk v2.6.12.." and see all the changes since 2.6.12.
2005-06-21Handle the case of a parent being listed twice in a merge.Libravatar Paul Mackerras1-58/+78
This happens in the linux-2.6 tree. We draw the graph line double-thick to show that this happened. Also fix a bug where we got a bogus "No commit information available" line at the end on simple repositories like this one.
2005-06-20git-rev-parse: flush "default" head when encountering something unexpectedLibravatar Linus Torvalds1-1/+4
The unexpected thing is likely a pathname, we need the default for that too.
2005-06-20[PATCH] git-resolve-script: Add LAST_MERGE and use git-rev-parseLibravatar Dan Holmsand1-9/+15
Make git-resolve-script only write MERGE_HEAD if a merge actually occurred. All merge failures leave ORIG_HEAD and LAST_MERGE behind (instead of ORIG_HEAD and MERGE_HEAD). Use git-rev-parse to expand arguments (and check for bad ones). Signed-off-by: Dan Holmsand <holmsand@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-20git-rev-parse: parse ".." before simple SHA1'sLibravatar Linus Torvalds1-14/+14
This fixes "<hexsha1>..*", since get_sha1() will happily ignore any garbage at the end and thus we never got to the ".." check before.
2005-06-19Avoid gcc warning in diff-stages.cLibravatar Linus Torvalds1-1/+1
Put explicit parentheses around && in ||-expression.
2005-06-19[PATCH] Fix for --merge-order, --max-age interaction issueLibravatar Jon Seymour1-2/+11
This patch fixes a problem reported by Paul Mackerras regarding the interaction of the --merge-order and --max-age switches of git-rev-list. This patch applies to the current Linus HEAD. A cleaner fix for the same problem in my current HEAD will follow later. With this change, --merge-order produces the same result as no --merge-order on the linux-2.6 git repository, to wit: $> git-rev-list --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l 655 $> git-rev-list --merge-order --max-age=1116330140 bcfff0b471a60df350338bcd727fc9b8a6aa54b2 | wc -l 655 Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>