aboutsummaryrefslogtreecommitdiffstats
path: root/commit-reach.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2018-06-27 00:23:14 -0700
committerJunio C Hamano <gitster@pobox.com>2018-06-27 11:23:22 -0700
commitc840e1af09fcf9bb4420a504820314b67fbe18d2 (patch)
tree833caa350f80b9a1c73bd98ffa7d92546734bbeb /commit-reach.c
parentt3422: new testcases for checking when incompatible options passed (diff)
downloadgit-c840e1af09fcf9bb4420a504820314b67fbe18d2.tar.gz
git-c840e1af09fcf9bb4420a504820314b67fbe18d2.zip
git-rebase: error out when incompatible options passed
git rebase has three different types: am, merge, and interactive, all of which are implemented in terms of separate scripts. am builds on git-am, merge builds on git-merge-recursive, and interactive builds on git-cherry-pick. We make use of features in those lower-level commands in the different rebase types, but those features don't exist in all of the lower level commands so we have a range of incompatibilities. Previously, we just accepted nearly any argument and silently ignored whichever ones weren't implemented for the type of rebase specified. Change this so the incompatibilities are documented, included in the testsuite, and tested for at runtime with an appropriate error message shown. Some exceptions I left out: * --merge and --interactive are technically incompatible since they are supposed to run different underlying scripts, but with a few small changes, --interactive can do everything that --merge can. In fact, I'll shortly be sending another patch to remove git-rebase--merge and reimplement it on top of git-rebase--interactive. * One could argue that --interactive and --quiet are incompatible since --interactive doesn't implement a --quiet mode (perhaps since cherry-pick itself does not implement one). However, the interactive mode is more quiet than the other modes in general with progress messages, so one could argue that it's already quiet. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-reach.c')
0 files changed, 0 insertions, 0 deletions
urly bracket. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-25GIT 1.6.1.1v1.6.1.1Junio C Hamano2-8/+18 Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-23Fix Documentation for git-describeBoyd Stephen Smith Jr1-1/+1 The documentation for git-describe says the default abbreviation is 8 hexadecimal digits while cache.c clearly shows DEFAULT_ABBREV set to 7. This patch corrects the documentation. Signed-off-by: Boyd Stephen Smith Jr <bss@iguanasuicide.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-21Rename diff.suppress-blank-empty to diff.suppressBlankEmptyJohannes Schindelin3-6/+8 All the other config variables use CamelCase. This config variable should not be an exception. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-21Rename detection: Avoid repeated filespec populationBjörn Steinbrink1-2/+7 In diffcore_rename, we assume that the blob contents in the filespec aren't required anymore after estimate_similarity has been called and thus we free it. But estimate_similarity might return early when the file sizes differ too much. In that case, cnt_data is never set and the next call to estimate_similarity will populate the filespec again, eventually rereading the same blob over and over again. To fix that, we first get the blob sizes and only when the blob contents are actually required, and when cnt_data will be set, the full filespec is populated, once. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-19shell: Document that 'cvs server' is a valid commandLars Noschinski1-2/+3 git-shell's man page explicitly lists all allowed commands, but 'cvs server' was missing. Add it. Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-18Documentation: avoid using undefined parametersAnders Melchiorsen1-2/+2 The <ref> parameter has not been introduced, so rewrite to avoid it. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-18Documentation: mention branches rather than headsAnders Melchiorsen1-2/+2 The "matching refs" semantics works only on matching branches these days. Instead of using "heads" which traditionally has been used more or less interchangeably with "refs", say "branch" explicitly here. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-18Documentation: remove a redundant elaborationAnders Melchiorsen1-2/+1 The comment in parentheses is wrong, as one has to leave out both the colon and <dst>. This situation is covered by the section a few lines down: A parameter <ref> without a colon pushes the <ref> from the source repository to the destination repository under the same name. So, just remove the parentheses. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-18Documentation: git push repository can also be a remoteAnders Melchiorsen1-1/+3 This is copied from pull-fetch-param.txt and helps the reader to not get stuck in the URL section. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17Update draft release notes for 1.6.1.1Junio C Hamano1-1/+6 Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17builtin-fsck: fix off by one head countChristian Couder1-1/+1 According to the man page, if "git fsck" is passed one or more heads, it should verify connectivity and validity of only objects reachable from the heads it is passed. However, since 5ac0a20 (Make builtin-fsck.c use parse_options., 2007-10-15) the command behaved as if no heads were passed, when given only one argument. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17t5540: clarify that http-push does not handle packed-refs on the remoteJohannes Schindelin1-3/+15 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17http-push: when making directories, have a trailing slash in the path nameJohannes Schindelin3-2/+11 The function lock_remote() sends MKCOL requests to make leading directories; However, if it does not put a forward slash '/' at the end of the path, the server sends a 301 redirect. By leaving the '/' in place, we can avoid this additional step. Incidentally, at least one version of Curl (7.16.3) does not resend credentials when it follows a 301 redirect, so this commit also fixes a bug. Original patch by Tay Ray Chuan <rctay89@gmail.com>. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17http-push: fix off-by-path_lenJohannes Schindelin1-3/+7 When getting the result of remote_ls(), we were advancing the variable "path" to the relative path inside the repository. However, then we went on to malloc a bogus amount of memory: we were subtracting the prefix length _again_, quite possibly getting something negative, which xmalloc() interprets as really, really much. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17Documentation: let asciidoc align related optionsMarkus Heidelberg1-1/+4 Command line options can share the same paragraph of description, if they are related or synonymous. In these cases they should be written among each other, so that asciidoc can format them itself. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17githooks.txt: add missing wordStephan Beyer1-1/+1 Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-17builtin-commit.c: do not remove COMMIT_EDITMSGStephan Beyer1-1/+0 git-commit tries to remove the file ./COMMIT_EDITMSG instead of $GIT_DIR/COMMIT_EDITMSG after commit preparation (e.g. running hooks, launching editor). This behavior exists since f5bbc3225c4b07 "Port git commit to C". Some test cases (e.g. t/t7502-commit.sh) rely on the existence of $GIT_DIR/COMMIT_EDITMSG after committing and, I guess, many people are used to it. So it is best not to remove it. This patch just removes the removal of COMMIT_EDITMSG. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-15t3404: Add test case for auto-amending only edited commits after "edit"Stephan Beyer1-0/+17 Add a test case for the bugfix introduced by commit c14c3c82d "git-rebase--interactive: auto amend only edited commit". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-15t3404: Add test case for aborted --continue after "edit"Stephan Beyer1-0/+15 Add a test case for the bugfix introduced by commit 8beb1f33d "git-rebase-interactive: do not squash commits on abort". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-15t3501: check that commits are actually doneStephan Beyer1-0/+2 The basic idea of t3501 is to check whether revert and cherry-pick works on renamed files. But as there is no pure cherry-pick/revert test, it is good to also check if commits are actually done in that scenario. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-14Update draft release notes to 1.6.1.1Junio C Hamano1-2/+23 2009-01-14Make t3411 executableMiklos Vajna1-0/+0 Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-14fix handling of multiple untracked files for git mv -kMichael J Gruber2-1/+2 The "-k" option to "git mv" should allow specifying multiple untracked files. Currently, multiple untracked files raise an assertion if they appear consecutively as arguments. Fix this by decrementing the loop index after removing one entry from the array of arguments. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-14add test cases for "git mv -k"Michael J Gruber1-0/+25 Add test cases for ignoring nonexisting and untracked files using the -k option to "git mv". There is one known breakage related to multiple untracked files specfied as consecutive arguments. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-13fast-import: Cleanup mode setting.Felipe Contreras1-3/+4 "S_IFREG | mode" makes only sense for 0644 and 0755. Even though doing (S_IFREG | mode) may not hurt when mode is any other supported value, that is only true because S_IFREG mode bit happens to be already on for S_IFLNK or S_IFGITLINK. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-13Git.pm: call Error::Simple() properlyJay Soffian1-2/+2 The error message to Error::Simple() must be passed as a single argument. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> 2009-01-13Avoid spurious error messages on error mistakes.Pierre Habouzit1-1/+1 Prior to that, if the user chose "squash" as a first action, the stderr looked like: grep: /home/madcoder/dev/scm/git/.git/rebase-merge/done: No such file or directory Cannot 'squash' without a previous commit Now the first line is gone. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>