summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add --continue and --abort options to git-rebase.sean2006-04-262-37/+101
| | | | | | | | | | | | | | | | | | | | | git rebase [--onto <newbase>] <upstream> [<branch>] git rebase --continue git rebase --abort Add "--continue" to restart the rebase process after manually resolving conflicts. The user is warned if there are still differences between the index and the working files. Add "--abort" to restore the original branch, and remove the .dotest working files. Some minor additions to the git-rebase documentation. [jc: fix that applies to the maintenance track has been dealt with separately.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'fix'Junio C Hamano2006-04-266-25/+35
|\ | | | | | | | | | | | | | | * fix: commit-tree.c: check_valid() microoptimization. Fix filename verification when in a subdirectory rebase: typofix. socksetup: don't return on set_reuse_addr() error
| * commit-tree.c: check_valid() microoptimization.Junio C Hamano2006-04-261-6/+5
| | | | | | | | | | | | | | | | There is no point reading the whole object just to make sure it exists and it is of the expected type. We added sha1_object_info() for such need after this code was written, so use it. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Fix filename verification when in a subdirectoryLinus Torvalds2006-04-264-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are in a subdirectory of a git archive, we need to take the prefix of that subdirectory into accoung when we verify filename arguments. Noted by Matthias Lederhofer This also uses the improved error reporting for all the other git commands that use the revision parsing interfaces, not just git-rev-parse. Also, it makes the error reporting for mixed filenames and argument flags clearer (you cannot put flags after the start of the pathname list). [jc: with fix to a trivial typo noticed by Timo Hirvonen] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * rebase: typofix.Junio C Hamano2006-04-261-1/+1
| | | | | | | | | | | | Noticed by Sean. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * socksetup: don't return on set_reuse_addr() errorv1.3.1Serge E. Hallyn2006-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | The set_reuse_addr() error case was the only error case in socklist() where we returned rather than continued. Not sure why. Either we must free the socklist, or continue. This patch continues on error. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net> (cherry picked from 0032d548db56eac9ea09b4ba05843365f6325b85 commit)
* | commit-tree: allow generic object name for the tree as well.Junio C Hamano2006-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We use get_sha1() for -p (parent) objects, but still used get_sha1_hex() for the tree. Just to be consistent, allow extended SHA1 expression for the tree object name. Note that this is not to encourage funky things like this: git-commit-tree HEAD^{tree} -p HEAD Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Makefile: remove and create xdiff library from scratch.Junio C Hamano2006-04-261-1/+1
| | | | | | | | | | | | ... in the same spirit as 71459c193d04870076efa0a387c317390b53e3e2. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | t0000-basic: Add ls-tree recursive test back.Junio C Hamano2006-04-261-0/+21
| | | | | | | | | | | | | | | | | | | | | | When we updated ls-tree recursive output to omit the tree nodes, 246cc52f388cae8ca99e5a12b8458c9bfa467765 adjusted the old test so that we do not expect to see trees in its output. Later, with 0f8f45cb4a7e664b396f73c25891da46b953b8b8, we added back the ability to show both with -t option, but we forgot to update the test as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/diff'Junio C Hamano2006-04-259-2136/+2111
|\ \ | | | | | | | | | | | | | | | | | | * jc/diff: Libified diff-index: backward compatibility fix. Libify diff-index. Libify diff-files.
| * | Libified diff-index: backward compatibility fix.Junio C Hamano2006-04-223-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "diff-index -m" does not mean "do not ignore merges", but means "pretend missing files match the index". The previous round tried to address this, but failed because setup_revisions() ate "-m" flag before the caller had a chance to intervene. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Libify diff-index.Junio C Hamano2006-04-224-238/+231
| | | | | | | | | | | | | | | | | | | | | | | | The second installment to libify diff brothers. The pathname arguments are checked more strictly than before because we now use the revision.c::setup_revisions() infrastructure. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Libify diff-files.Junio C Hamano2006-04-227-1953/+1929
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first installment to libify diff brothers. The updated diff-files uses revision.c::setup_revisions() infrastructure to parse its command line arguments, which means the pathname arguments are checked more strictly than before. The tests are adjusted to separate possibly missing paths from the rest of arguments with double-dashes, to show the kosher way. As Linus pointed out, renaming diff.c to diff-lib.c was simply stupid, so I am renaming it back. The new diff-lib.c is to contain pieces extracted from diff brothers. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Makefile: remove and create libgit.a from scratch.Junio C Hamano2006-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Foolishly I renamed diff.o around which caused an old diff.o taken out of libgit.a and got linked into resulting binary and exhibited mysterious breakage for many people. This borrows from the kernel Makefile (scripts/Makefile.build) to first remove the target and then recreate. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'fix'Junio C Hamano2006-04-245-17/+212
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * fix: Document the configuration file Document git-var -l listing also configuration variables rev-parse: better error message for ambiguous arguments
| * | Document the configuration filePetr Baudis2006-04-243-14/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a Documentation/config.txt file included by git-repo-config and currently aggregating hopefully all the available git plumbing / core porcelain configuration variables, as well as briefly describing the format. It also updates an outdated bit of the example in git-repo-config(1). Signed-off-by: Petr Baudis <pasky@suse.cz>
| * | Document git-var -l listing also configuration variablesPetr Baudis2006-04-241-1/+4
| | | | | | | | | | | | Signed-off-by: Petr Baudis <pasky@suse.cz>
| * | rev-parse: better error message for ambiguous argumentsPaul Mackerras2006-04-241-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if git-rev-parse encounters an argument that is neither a recognizable revision name nor the name of an existing file or directory, and it hasn't encountered a "--" argument, it prints an error message saying "No such file or directory". This can be confusing for users, including users of programs such as gitk that use git-rev-parse, who may then think that they can't ask about the history of files that no longer exist. This makes it print a better error message, one that points out the ambiguity and tells the user what to do to fix it. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | | Merge branch 'ar/chmod-series'Junio C Hamano2006-04-241-7/+16
|\ \ \ | | | | | | | | | | | | | | | | * ar/chmod-series: make update-index --chmod work with multiple files and --stdin
| * | | make update-index --chmod work with multiple files and --stdinAlex Riesen2006-04-231-7/+16
| | |/ | |/| | | | | | | | | | | | | | | | | | | The patch makes "--chmod=-x" and "--chmod=+x" act like "--add" and "--remove" to affect the behaviour of the command for the rest of the path parameters, not just the following one. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'sh/daemon'Junio C Hamano2006-04-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | * sh/daemon: socksetup: don't return on set_reuse_addr() error
| * | | socksetup: don't return on set_reuse_addr() errorSerge E. Hallyn2006-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set_reuse_addr() error case was the only error case in socklist() where we returned rather than continued. Not sure why. Either we must free the socklist, or continue. This patch continues on error. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/cc-stat'Junio C Hamano2006-04-241-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jc/cc-stat: Fix "git show --stat"
| * | | | Fix "git show --stat"Junio C Hamano2006-04-211-1/+2
| | |/ / | |/| | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'jc/unresolve'Junio C Hamano2006-04-241-0/+127
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jc/unresolve: git-update-index --unresolve Add git-unresolve <paths>...
| * | | | git-update-index --unresolveJunio C Hamano2006-04-194-149/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Retire git-unresolve and make it into "git-update-index --unresolve". It processes all paths that follow. During a merge, you would mark a path that is dealt with with: $ git update-index hello and you would "undo" it with: $ git update-index --unresolve hello Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Add git-unresolve <paths>...Junio C Hamano2006-04-193-1/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an attempt to address the issue raised on #git channel recently by Carl Worth. After a conflicted automerge, "git diff" shows a combined diff to give you how the tentative automerge result differs from what came from each branch. During a complex merge, it is tempting to be able to resolve a few paths at a time, mark them "I've dealt with them" with git-update-index to unclutter the next "git diff" output, and keep going. However, when the final result does not compile or otherwise found to be a mismerge, the workflow to fix the mismerged paths suddenly changes to "git diff HEAD -- path" (to get a diff from our HEAD before merging) and "git diff MERGE_HEAD -- path" (to get a diff from theirs), and it cannot show the combined anymore. With git-unresolve <paths>..., the versions from our branch and their branch for specified blobs are placed in stage #2 and stage #3, without touching the working tree files. This gives you the combined diff back for easier review, along with "diff --ours" and "diff --theirs". One thing it does not do is to place the base in stage #1; this means "diff --base" would behave differently between the run immediately after a conflicted three-way merge, and the run after an update-index by mistake followed by a git-unresolve. We could theoretically run merge-base between HEAD and MERGE_HEAD to find which tree to place in stage #1, but reviewing "diff --base" is not that useful so.... Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'jc/color'Junio C Hamano2006-04-242-0/+198
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/color: Add colordiff for git to contrib/colordiff.
| * | | | | Add colordiff for git to contrib/colordiff.Junio C Hamano2006-04-212-0/+198
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I hacked it up to teach it the git extended diff headers, made it not to read the whole patch in the array. Also, the original program, when arguments are given, ran "diff" with the given arguments and showed the output from it. Of course, I changed it to run "git diff" ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2006-04-241-18/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Let git-rev-list do the argument list parsing
| * | | | gitk: Let git-rev-list do the argument list parsingPaul Mackerras2006-04-231-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix for a problem reported by Jim Radford where an argument list somewhere overflows on repositories with lots of tags. In fact it's now unnecessary to use git-rev-parse since git-rev-list can take all the arguments that git-rev-parse can. This is inspired by but not the same as the solutions suggested by Jim Radford and Linus Torvalds. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | | | | Merge branch 'jc/diff'Junio C Hamano2006-04-211-9/+68
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/diff: diff --stat: do not drop rename information.
| * | | | | diff --stat: do not drop rename information.Junio C Hamano2006-04-191-9/+68
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a verbatim rename or copy is detected, we did not show anything on the "diff --stat" for the filepair. This makes it to show the rename information. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Makefile: dependency for builtin-help.oJunio C Hamano2006-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | builtin-help.c wants to include common-cmds.h which is a generated file. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Split up builtin commands into separate files from git.cLinus Torvalds2006-04-215-305/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now it split it into "builtin-log.c" for log-related commands ("log", "show" and "whatchanged"), and "builtin-help.c" for the informational commands (usage printing and "help" and "version"). This just makes things easier to read, I find. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'fix'Junio C Hamano2006-04-211-0/+2
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | * fix: git-log produces no output
| * | | | git-log produces no outputLinus Torvalds2006-04-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When $PAGER is set to 'less -i', we used to fail because we assumed the $PAGER is a command and simply exec'ed it. Try exec first, and then run it through shell if it fails. This allows even funkier PAGERs like these ;-): PAGER='sed -e "s/^/`date`: /" | more' PAGER='contrib/colordiff.perl | less -RS' Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'fix'Junio C Hamano2006-04-213-8/+12
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix: fix pack-object buffer size mailinfo: decode underscore used in "Q" encoding properly. Reintroduce svn pools to solve the memory leak. pack-objects: do not stop at object that is "too small"
| * | | | fix pack-object buffer sizeNicolas Pitre2006-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The input line has 40 _chars_ of sha1 and no 20 _bytes_. It should also account for the space before the pathname, and the terminating \n and \0. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | mailinfo: decode underscore used in "Q" encoding properly.Junio C Hamano2006-04-211-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quoted-Printable (RFC 2045) and the "Q" encoding (RFC 2047) are subtly different; the latter is used on the mail header and an underscore needs to be decoded to 0x20. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | Reintroduce svn pools to solve the memory leak.Santi_Béjar2006-04-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in 4802426. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | pack-objects: do not stop at object that is "too small"Junio C Hamano2006-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we sort the delta window by name-hash and then size, hitting an object that is too small to consider as a delta base for the current object does not mean we do not have better candidate in the window beyond it. Noticed by Shawn Pearce, analyzed by Nico, Linus and me. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'fix'Junio C Hamano2006-04-202-7/+16
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | * fix: git-commit --amend: two fixes.
| * | | git-commit --amend: two fixes.Junio C Hamano2006-04-202-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "git commit --amend" only to fix the commit log message without any content change, we mistakenly showed the git-status output that says "nothing to commit" without commenting it out. If you have already run update-index but you want to amend the top commit, "git commit --amend --only" without any paths should have worked, because --only means "starting from the base commit, update-index these paths only to prepare the index to commit, and perform the commit". However, we refused -o without paths. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'lt/xsha1'Junio C Hamano2006-04-193-1/+67
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/xsha1: get_tree_entry(): make it available from tree-walk sha1_name.c: no need to include diff.h; tree-walk.h will do. sha1_name.c: prepare to make get_tree_entry() reusable from others. get_sha1() shorthands for blob/tree objects
| * | | | get_tree_entry(): make it available from tree-walkJunio C Hamano2006-04-193-52/+52
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | sha1_name.c: no need to include diff.h; tree-walk.h will do.Junio C Hamano2006-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | sha1_name.c: prepare to make get_tree_entry() reusable from others.Junio C Hamano2006-04-191-9/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | get_sha1() shorthands for blob/tree objectsLinus Torvalds2006-04-181-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fairly straightforward patch to allow "get_sha1()" to also have shorthands for tree and blob objects. The syntax is very simple and intuitive: you can specify a tree or a blob by simply specifying <revision>:<path>, and get_sha1() will do the SHA1 lookup from the tree for you. You can currently do it with "git ls-tree <rev> <path>" and parsing the output, but that's actually pretty awkward. With this, you can do something like git cat-file blob v1.2.4:Makefile to get the contents of "Makefile" at revision v1.2.4. Now, this isn't necessarily something you really need all that often, but the concept itself is actually pretty powerful. We could, for example, allow things like git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh to see the difference between two arbitrary files in two arbitrary revisions. To do that, the only thing we'd have to do is to make git-diff-tree accept two blobs to diff, in addition to the two trees it now expects. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'maint'Junio C Hamano2006-04-192-1/+4
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | * maint: pre-commit hook: complain about conflict markers. git-merge: a bit more readable user guidance.