summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-08-15Introduce advise() to print hintsLibravatar Jonathan Nieder1-0/+9
Like error(), warn(), and die(), advise() prints a short message with a formulaic prefix to stderr. It is local to revert.c for now because I am not sure this is the right API (we may want to take an array of advice lines or a boolean argument for easy suppression of unwanted advice). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-15Eliminate “Finished cherry-pick/revert” messageLibravatar Jonathan Nieder4-21/+30
When cherry-pick was written (v0.99.6~63, 2005-08-27), “git commit” was quiet, and the output from cherry-pick provided useful information about the progress of a rebase. Now next to the output from “git commit”, the cherry-pick notification is so much noise (except for the name of the picked commit). $ git cherry-pick ..topic Finished cherry-pick of 499088b. [detached HEAD 17e1ff2] Move glob module to libdpkg Author: Guillem Jover <guillem@debian.org> 8 files changed, 12 insertions(+), 9 deletions(-) rename {src => lib/dpkg}/glob.c (98%) rename {src => lib/dpkg}/glob.h (93%) Finished cherry-pick of ae947e1. [detached HEAD 058caa3] libdpkg: Add missing symbols to Versions script Author: Guillem Jover <guillem@debian.org> 1 files changed, 2 insertions(+), 0 deletions(-) $ The noise is especially troublesome when sifting through the output of a rebase or multiple cherry-pick that eventually failed. With the commit subject, it is already not hard to figure out where the commit came from. So drop the “Finished” message. Cc: Christian Couder <chriscool@tuxfamily.org> Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-23t3508: add check_head_differs_from() helper function and use itLibravatar Christian Couder1-5/+17
In a test like: test "$(git rev-parse --verify HEAD)" != "$(git rev-parse --verify fourth)" the --verify does not accomplish much, since the exit status of git rev-parse is not propagated to test. So it is more robust to define and use the helper functions check_head_differs_from() and check_head_equals() as done by this patch. Suggested-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: improve success message by adding abbreviated commit sha1Libravatar Christian Couder2-10/+11
Instead of saying "Finished one cherry-pick." or "Finished one revert.", we now say "Finished cherry-pick of commit <abbreviated sha1>." or "Finished revert of commit <abbreviated sha1>." which is more informative, especially when cherry-picking or reverting many commits. In case of failure the message is now "Automatic cherry-pick of commit <abbreviated sha1> failed." instead of "Automatic cherry-pick failed." Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: don't print "Finished one cherry-pick." if commit failedLibravatar Christian Couder1-12/+5
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: refactor commit code into a new run_git_commit() functionLibravatar Christian Couder1-25/+27
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16revert: report success when using option --strategyLibravatar Christian Couder2-23/+54
"git cherry-pick foo" has always reported success with "Finished one cherry-pick" but "cherry-pick --strategy" does not print anything. So move the code to write that message from do_recursive_merge() to do_cherry_pick() so other strategies can share it. This patch also refactors the code that prints a message like "Automatic cherry-pick failed. <help message>". This code was duplicated in both do_recursive_merge() and do_pick_commit(). To do that, now do_recursive_merge() returns an int to signal success or failure. And in case of failure we just return 1 from do_pick_commit() instead of doing "exit(1)" from either do_recursive_merge() or do_pick_commit(). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15Merge branch 'jn/paginate-fix'Libravatar Junio C Hamano2-46/+200
* jn/paginate-fix: git --paginate: paginate external commands again git --paginate: do not commit pager choice too early tests: local config file should be honored from subdirs of toplevel t7006: test pager configuration for several git commands t7006 (pager): introduce helper for parameterized tests Conflicts: t/t7006-pager.sh
2010-07-15Merge branch 'wp/merge-tree-fix'Libravatar Junio C Hamano2-1/+259
* wp/merge-tree-fix: merge-tree: fix where two branches share no changes add basic tests for merge-tree
2010-07-15Merge branch 'js/merge-rr-fix'Libravatar Junio C Hamano2-3/+3
* js/merge-rr-fix: MERGE_RR is in .git, not .git/rr-cache
2010-07-15Merge branch 'jc/diff-merge-base-multi'Libravatar Junio C Hamano1-8/+23
* jc/diff-merge-base-multi: diff A...B: give one possible diff when there are more than one merge-base
2010-07-15Merge branch 'ns/merge-recursive-uptodate'Libravatar Junio C Hamano1-1/+1
* ns/merge-recursive-uptodate: merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency
2010-07-15Merge branch 'jn/tests'Libravatar Junio C Hamano1-47/+42
* jn/tests: t3000 (ls-files -o): modernize style
2010-07-15Merge branch 'eb/doc-log-manpage'Libravatar Junio C Hamano1-6/+9
* eb/doc-log-manpage: Reorganize `git-log' man page to clarify common diff options.
2010-07-15Merge branch 'jn/grep-open'Libravatar Junio C Hamano2-0/+16
* jn/grep-open: grep -O: Do not pass color sequences as filenames to pager
2010-07-15Merge branch 'mg/revision-doc'Libravatar Junio C Hamano20-222/+257
* mg/revision-doc: Documentation: link to gitrevisions rather than git-rev-parse Documentation: gitrevisions Documentation: split off rev doc into include file
2010-07-15Merge branch 'jk/maint-status-keep-index-timestamp'Libravatar Junio C Hamano1-5/+11
* jk/maint-status-keep-index-timestamp: do not write out index when status does not have to
2010-07-15Merge branch 'jc/rebase-i-commit-msg-fix'Libravatar Junio C Hamano2-9/+28
* jc/rebase-i-commit-msg-fix: rebase-i: do not get fooled by a log message ending with backslash rebase-i: style fix
2010-07-15Merge branch 'ab/submodule-add-f'Libravatar Junio C Hamano3-3/+29
* ab/submodule-add-f: git submodule: add submodules with git add -f <path>
2010-07-15Merge branch 'bc/maint-makefile-fixes'Libravatar Junio C Hamano1-5/+5
* bc/maint-makefile-fixes: Makefile: work around ksh's failure to handle missing list argument to for loop Makefile: remove some unnecessary curly braces
2010-07-15Merge branch 'maint'Libravatar Junio C Hamano3-2/+13
* maint: Documentation: add submodule.* to the big configuration variable list gitmodules.5: url can be a relative path gitweb: fix esc_url
2010-07-15Documentation: add submodule.* to the big configuration variable listLibravatar Jonathan Nieder1-0/+9
The url, path, and the update items in [submodule "foo"] stanzas are nicely explained in the .gitmodules and ‘git submodule’ documentation. Point there from the config documentation. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15gitmodules.5: url can be a relative pathLibravatar Jonathan Nieder1-0/+3
There is already excellent documentation for this facility in git-submodule.1, but it is not so discoverable. Relative paths in .gitmodules can be useful for serving the same repository over multiple protocols, for example. Thanks to Peter for pointing this out. Cc: Peter Krefting <peter@softwolves.pp.se> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15gitweb: fix esc_urlLibravatar Pavan Kumar Sunkara1-2/+1
Earlier, 452e225 (gitweb: fix esc_param, 2009-10-13) fixed CGI escaping rules used in esc_url. A very similar logic exists in esc_param and needs to be fixed the same way. Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14git --paginate: paginate external commands againLibravatar Jonathan Nieder2-12/+38
73e25e7c (git --paginate: do not commit pager choice too early, 2010-06-26) failed to take some cases into account. 1b. Builtins that do not use RUN_SETUP (like git config) do not find GIT_DIR set correctly when the pager is launched from run_builtin(). So the core.pager configuration is not honored from subdirectories of the toplevel for them. 4a. External git commands (like git request-pull) relied on the early pager launch to take care of handling the -p option. Ever since 73e25e7c, they do not honor the -p option at all. 4b. Commands invoked through ! aliases (like ls) were also relying on the early pager launch. Fix (4a) by launching the pager (if requested) before running such a “dashed external”. For simplicity, this still does not search for a .git directory before running the external command; when run from a subdirectory of the toplevel, therefore, the “[core] pager” configuration is still not honored. Fix (4b) by launching pager if requested before carrying out such an alias. Actually doing this has no effect, since the pager (if any) would have already been launched in a failed attempt to try a dashed external first. The choice-of-pager-not-honored-from- subdirectory bug still applies here, too. (1b) is not a regression. There is no need to fix it yet. Noticed by Junio. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14MERGE_RR is in .git, not .git/rr-cacheLibravatar Jay Soffian2-3/+3
0af0ac7 (Move MERGE_RR from .git/rr-cache/ into .git/) moved the location of MERGE_RR but I found a few references to the old location. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14merge-tree: fix where two branches share no changesLibravatar Will Palmer2-4/+5
15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16) introduced a regression to merge-tree to cause it to segfault when merging files which existed in one branch, but not in the other or in the merge-base. This was caused by referencing entry->path at a time when entry was known to be possibly-NULL. To correct the problem, we save the path of the entry we came in with, as the path should be the same among all the stages no matter which sides are involved in the merge. Signed-off-by: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14add basic tests for merge-treeLibravatar Will Palmer1-0/+257
merge-tree had no test cases, so here we add some very basic tests for it, including some known-breakages. [jc: with obvious/trivial fixups] Signed-off-by: Will Palmer <wmpalmer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14Git 1.7.2-rc3Libravatar Junio C Hamano1-1/+4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14Merge branch 'jc/read-tree-cache-tree-fix'Libravatar Junio C Hamano2-5/+16
* jc/read-tree-cache-tree-fix: Fix "read-tree -m A B" priming the cache-tree
2010-07-14Use dev_t for device id (st_dev) from stat in setup_git_directory_gently()Libravatar Raja R Harinath1-1/+2
The original declaration was int, which seems to cause trouble on my machine. It causes spurious "filesystem boundary" errors when running the testsuite. The cause seems to be $ stat -c%d . 2147549952 which is too large for a 32-bit int type. Using the correct type, dev_t, solves the issue. (Because I'm paranoid and forgetful, I checked -- yes, Unix v7 had dev_t.) Other uses of st_dev seem to be reasonably safe. fill_stat_cache_info truncates it to an 'unsigned int', but that value seems to be used only to validate the cache, and only if USE_STDEV is defined. Signed-off-by: Raja R Harinath <harinath@hurrynot.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13diff A...B: give one possible diff when there are more than one merge-baseLibravatar Junio C Hamano1-8/+23
We instead showed a combined diff that explains one of the randomly chosen merge-base as if it were the result of merging all the other merge bases and two tips given, which made no sense at all. An alternative is to simply fail such a request, telling the user that there are criss-cross merges, but it wouldn't be so helpful. Noticed by James Pickens. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13Merge branch 'maint'Libravatar Junio C Hamano2-2/+5
* maint: git fetch documentation: describe short '-p' synonym to '--prune' option format-patch: document the format.to configuration setting
2010-07-13git fetch documentation: describe short '-p' synonym to '--prune' optionLibravatar Oren Held1-0/+1
It's already implemented, just undocumented. Signed-off-by: Oren Held <orenhe@il.ibm.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13format-patch: document the format.to configuration settingLibravatar Miklos Vajna1-2/+4
[jc: with simplification from Jonathan Nieder] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-12test-lib: TAP compliance for skipping tests on requestLibravatar Michael J Gruber1-2/+2
Make the output TAP compliant for tests skipped on request (GIT_SKIP_TESTS). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-12test-lib: simplify GIT_SKIP_TESTS loopLibravatar Michael J Gruber1-10/+3
04ece59 (GIT_SKIP_TESTS: allow users to omit tests that are known to break, 2006-12-28) introduced GIT_SKIP_TESTS, and since then we have had two nested loops iterating over GIT_SKIP_TESTS with the same loop variable. Reduce this to one loop. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-11Merge branch 'maint'Libravatar Junio C Hamano3-2/+3
* maint: Documentation: Spelling fix in protocol-capabilities.txt checkout: accord documentation to what git does t0005: work around strange $? in ksh when program terminated by a signal
2010-07-11t3000 (ls-files -o): modernize styleLibravatar Jonathan Nieder1-47/+42
This script is part of the second batch of tests, from the same day the test infrastructure was added to git. Update it to use a more modern style in the spirit of v1.6.4-rc0~45^2~2 (2009-05-22). In particular: - Put setup code inside test assertions, to avoid unexpected breakages and avoid stray output without -v (as t/README recommends); and - Put the test title on the same line as the "test_expect_success", and end the line with a single-quote to begin the body of the test which is one multi-line string. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09Documentation: Spelling fix in protocol-capabilities.txtLibravatar Fredrik Skolmli1-1/+1
Signed-off-by: Fredrik Skolmli <fredrik@frsk.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09merge-recursive: use "up-to-date" instead of "uptodate" in error message for ↵Libravatar Nicolas Sebrecht1-1/+1
consistency Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09checkout: accord documentation to what git doesLibravatar Nicolas Sebrecht1-1/+1
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09t0005: work around strange $? in ksh when program terminated by a signalLibravatar Johannes Sixt1-0/+1
ksh93 is known to report $? of programs that terminated by a signal as 256 + signal number instead of 128 + signal number like other POSIX compliant shells (ksh's behavior is still POSIX compliant in this regard). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fixLibravatar Junio C Hamano997-17105/+82957
* ko/master: (2325 commits) Git 1.7.2-rc2 backmerge a few more fixes to 1.7.1.X series fix git branch -m in presence of cross devices t/t0006: specify timezone as EST5 not EST to comply with POSIX add missing && to submodule-merge testcase t/README: document more test helpers test-date: fix sscanf type conversion xdiff: optimise for no whitespace difference when ignoring whitespace. gitweb: Move evaluate_gitweb_config out of run_request parse_date: fix signedness in timezone calculation t0006: test timezone parsing rerere.txt: Document forget subcommand t/README: proposed rewording... t/README: Document the do's and don'ts of tests t/README: Add a section about skipping tests t/README: Document test_expect_code t/README: Document test_external* t/README: Document the prereq functions, and 3-arg test_* t/README: Typo: paralell -> parallel t/README: The trash is in 't/trash directory.$name' ... Conflicts: builtin-read-tree.c
2010-07-08diff.c: fix a graph output bugLibravatar Bo Yang1-2/+1
When --graph is in effect, the line-prefix typically has colored graph line segments and ends with reset. The color sequence "set" given to this function is for showing the metainfo part of the patch text and (1) it should not be applied to the graph lines, and (2) it will be reset at the end of line_prefix so it won't be in effect anyway. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08tests: Use skip_all=* to skip testsLibravatar Ævar Arnfjörð Bjarmason7-18/+17
Change tests to skip with skip_all=* + test_done instead of using say + test_done. This is a follow-up to "tests: Skip tests in a way that makes sense under TAP" (fadb5156e4). I missed these cases when prepearing that patch, hopefully this is all of them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08Fix "read-tree -m A B" priming the cache-treeLibravatar Junio C Hamano2-5/+16
In 456156d a shortcut to priming the index tree reference was introduced, but the justification for it was completely bogus. "read-tree -m A B" is to take the index (and the working tree) that is largely based on (but does not have to match exactly) A and update it to B, while carrying the local change that does not overlap the difference between A and B, so there is no reason to expect that the resulting index should match the tree B. Noticed and test provided by Heiko Voigt. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08Reorganize `git-log' man page to clarify common diff options.Libravatar Eli Barzilay1-6/+9
This will reduce considerably the common confusion where people miss the `--follow' option, and wonder why `-M'/`-C' is not working. * Move the diff options include to after the log-specific flags, and add a "Common diff options" subtitle before them. (These options apply only when patches are shown, which is not a common use case among newbies, so having them first is confusing.) * Move the `--follow' description to the top of the listed options. The options before that seem less important: `--full-diff' applies only when patches are shown, `--source' and `--decorate' are less useful with many common commit specifications. * Clarify that `--follow' works only for a single path argument. Signed-off-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-08t9118 (git-svn): prevent early failure from taking down later testsLibravatar Jonathan Nieder1-21/+25
When test #2 fails, the cwd is project/, causing all the remaining tests in the same script to get confused and fail. So in the spirit of v1.7.1.1~53^2~10 (t5550-http-fetch: Use subshell for repository operations, 2010-04-17), use a subshell for svn working copy operations. This way, the cwd will reliably return to the top of the trash directory and later tests can still be run when a command has failed. Reported-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-08t9118: avoid PEG revision identifier in testsLibravatar Michael J Gruber1-1/+1
@ is SVN's identifier for PEG revisions. But SVN's treatment of PEG identifiers in copy target URLs changed in r954995/r952973, i.e. between 1.6.11 and 1.6.12. They get eaten now (which is considered the right way). Therefore, avoid the @ in the tests with funky branch names. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Acked-by: Eric Wong <normalperson@yhbt.net>