summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-12-21Re(-re)*fix trim_common_tail()Linus Torvalds
The tar-ball and the git archive itself is fine, but yes, the diff from 2.6.23 to 2.6.24-rc6 is bad. It's the "trim_common_tail()" optimization that has caused way too much pain. Very interesting breakage. The patch was actually "correct" in a (rather limited) technical sense, but the context at the end was missing because while the trim_common_tail() code made sure to keep enough common context to allow a valid diff to be generated, the diff machinery itself could decide that it could generate the diff differently than the "obvious" solution. Thee sad fact is that the git optimization (which is very important for "git blame", which needs no context), is only really valid for that one case where we really don't need any context. [jc: since this is shared with "git diff -U0" codepath, context recovery to the end of line needs to be done even for zero context case.] Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21gitweb: fix whitespace in config_to_multi (indent with tab)Jakub Narebski
Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21everyday: replace 'prune' and 'repack' with 'gc'Miklos Vajna
In everyday tasks, "repack -a -d -f" won't be used, so there is not much point mentioning "repack". By showing the --prune option to "gc", we can do without mentioning "git prune", too. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21Remove old generated files from .gitignore.Charles Bailey
Some entries in .gitignore are obselete. These should be cleaned up just for the sake of general tidiness and so that any developers who have a working tree that was moved forward without a clean know that they have old stuff in their work tree. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21clean up 1.5.4 release notesJeff King
Mostly typo and small grammatical fixes with one or two rewordings for clarity. But note the important fix for status.relativepaths. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-21Mention git-shell's "cvs" substitution in the RelNotesJohannes Schindelin
git shell became much more powerful for existing CVS setups. We should not hide from those people who only read release notes. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20shell-scripts usage(): consistently exit with non-zeroJunio C Hamano
Earlier conversion of shell scripts to parse-options made usage() to run "git cmd -h" which in turn emit LONG_USAGE and exit with 0 status. This is inconsistent with the scripts that do not use parse-options, whose usage() died with the message, exiting with 1. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20Reallow git-rebase --interactive --continue if commit is unnecessaryShawn O. Pearce
During git-rebase --interactive's --continue implementation we used to silently restart the rebase if the user had made the commit for us. This is common if the user stops to edit a commit and does so by amending it. My recent change to watch git-commit's exit status broke this behavior. Thanks to Bernt Hansen for catching it in 1.5.4-rc1. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20fix git commit --amend -m "new message"Junio C Hamano
The prepare_log_message() function serves two purposes: - Prepares the commit log message template, to be given to the end user; - Return true if there is something committable; 7168624c3530d8c7ee32f930f8fb2ba302b9801f (Do not generate full commit log message if it is not going to be used) cheated to omit the former when we know the log message template is not going to be used. However, its replacement logic to see if there is something committable was botched. When amending, it should compare the index with the parent of the HEAD, not the current HEAD. Otherwise you cannot run --amend to fix only the message without changing the tree. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20t4024: fix test script to use simpler sed patternJunio C Hamano
The earlier test stripped away expected number of 'z' but the output would have been very hard to read once somebody broke the common tail optimization. Instead, count the number of 'z' and show it, to help diagnosing the problem better in the future. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20Teach diff machinery to display other prefixes than "a/" and "b/"Johannes Schindelin
With the new options "--src-prefix=<prefix>", "--dst-prefix=<prefix>" and "--no-prefix", you can now control the path prefixes of the diff machinery. These used to by hardwired to "a/" for the source prefix and "b/" for the destination prefix. Initial patch by Pascal Obry. Sane option names suggested by Linus. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20GIT 1.5.4-rc1v1.5.4-rc1Junio C Hamano
It's been a week since -rc0, and we have quite a lot of fixes, so here it is. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20Catch and handle git-commit failures in git-rebase --interactiveShawn O. Pearce
If git-commit fails for any reason then git-rebase needs to stop and not plow through the rest of the series. Its unlikely that a future git-commit will succeed if the current attempt failed. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20Avoid update hook during git-rebase --interactiveShawn O. Pearce
If we are rebasing changes that contain potential whitespace errors that our .git/hooks/pre-commit hook looks for and fails on then git-commit will fail to commit that change. This causes git-rebase--interactive to squash commits together, even though it was not requested to do so by the todo file. Passing --no-verify to git-commit makes git-rebase -i behave more like git-rebase normally would in such conditions, providing more consistent behavior between the different rebase implementations. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-20Improved submodule merge supportFinn Arne Gangstad
When merging conflicting submodule changes from a supermodule, generate a conflict message saying what went wrong. Also leave the tree in a state where git status shows the conflict, and git submodule status gives the user enough information to do the merge manally. Previously this would just fail. Signed-off-by: Finn Arne Gangstad <finnag@pvv.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19Fix interactive rebase to preserve author email addressSean
Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19make 'git describe --all --contains' workNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19Fix git-instaweb breakage on MacOS X due to the limited sed functionalityCharles Bailey
git-instaweb relied on a pipe in a sed script, but this is not supported by MacOS X sed when using BREs. git-instaweb relies on a working perl in any case, and perl re are more consistent between platforms, so replace sed invocation with an equivalent perl invocation. Also, fix the documented -b "" to work without giving a spurious 'command not found' error. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19test "git clone -o"Jeff King
This tests a recently fixed regression in which "git clone -o" didn't work at all. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19clone: fix options '-o' and '--origin' to be recognised againMarco Roeland
Due to a subtle typo in a shell case pattern neither alternative worked. Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19git show <tag>: show the taggerJohannes Schindelin
For commit objects, the Author is shown, so do the equivalent for tag objects, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19git-svn: avoid warning when run without argumentsEric Wong
While we're in the area, finish writing a halfway-written comment describing what that block does... Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-12-19git-svn: workaround a for broken symlinks in SVNEric Wong
It's possible for bad clients to commit symlinks without the 5-character "link " prefix in symlinks. So guard around this bug in SVN and make a best effort to create symlinks if the "link " prefix is missing. More information on this SVN bug is described here: http://subversion.tigris.org/issues/show_bug.cgi?id=2692 To be pedantic, there is still a corner case that neither we nor SVN can handle: If somebody made a link using a broken SVN client where "link " is the first part of its path, e.g. "link sausage", then we'd end up having a symlink which points to "sausage" because we incorrectly stripped the "link ". Hopefully this hasn't happened in practice, but if it has, it's not our fault SVN is broken :) Thanks to Benoit Sigoure and Sverre Johansen for reporting and feedback. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-12-19git-svn: avoid leaving leftover committer/author info in rebaseEric Wong
We set the 6 environment variables for controlling committer/author email/name/time for every commit. We do this in the parent process to be passed to git-commit-tree, because open3() doesn't afford us the control of doing it only in the child process. This means we leave them hanging around in the main process until the next revision comes around and all 6 environment variables are overwridden again. Unfortunately, for the last commit, leaving them hanging around means the git-rebase invocation will pick it up, rewriting the rebased commit with incorrect author information. This should fix it. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2007-12-18fix style of a few comments in diff-delta.cNicolas Pitre
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18git-filter-branch.sh: more portable tr usage: use \012, not \n.Jim Meyering
I hesitate to suggest this, since GNU tr has accepted \n for 15 years, but there are supposedly a few crufty vendor-supplied versions of tr still in use. Also, all of the other uses of tr-with-newline in git use \012. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18filter-branch: Remove broken and unnecessary summary of rewritten refs.Johannes Sixt
There was an attempt to list the refs that were rewritten by filtering the output of 'git show-ref' for 'refs/original'. But it got the grep argument wrong, which did not account for the SHA1 that is listed before the ref. Moreover, right before this summary is the loop that actually does the rewriting, and the rewritten refs are listed there anyway. So this extra summary is plainly too verbose. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Fix some documentation typos.Ralf Wildenhues
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18builtin-blame.c: remove unneeded memclr()Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18unpack-trees: FLEX_ARRAY fixLinus Torvalds
In unpack-trees.c (line 593), we do .. if (same(old, merge)) { *merge = *old; } else { .. and that "merge" is a cache_entry pointer. If we have a non-zero FLEX_ARRAY size, it will cause us to copy the first few bytes of the name too. That is technically wrong even for FLEX_ARRAY being 1, but you'll never notice, since the filenames should always be the same with the current code. But if we do the same thing for a rename, we'd be screwed. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Fix segfault in diff-delta.c when FLEX_ARRAY is 1Pierre Habouzit
aka don't do pointer arithmetics on structs that have a FLEX_ARRAY member, or you'll end up believing your array is 1 cell off its real address. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Merge branch 'maint'Junio C Hamano
* maint: git-send-email: avoid duplicate message-ids clone: correctly report http_fetch errors
2007-12-18rebase -p -i: handle "no changes" gracefullyJohannes Schindelin
Since commit 376ccb8cbb453343998e734d8a1ce79f57a4e092 (rebase -i: style fixes and minor cleanups), unchanged SHA-1s are no longer mapped via $REWRITTEN. But the updating phase was not prepared for the old head not being rewritten. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Document diff.external and mergetool.<tool>.pathJohannes Schindelin
There was no documentation for the config variables diff.external and mergetool.<tool>.path. Noticed by Sebastian Schuberth. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Support config variable diff.externalJohannes Schindelin
We had the diff.external variable in the documentation of the config file since its conception, but failed to respect it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Clean up documentation that references deprecated 'git peek-remote'.Johannes Sixt
Now that 'git peek-remote' is deprecated and only an alias for 'git ls-remote', it should not be referenced from other manual pages. This also removes the description of the --exec option, which is no longer present. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Clarify error response from 'git fetch' for bad responsesSam Vilain
This error message prints the reponse from the server at this point. Label it as such in the output. Signed-off-by: Sam Vilain <sam@vilain.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18the use of 'tr' in the test suite isn't really portableH.Merijn Brand
Some versions of 'tr' only accept octal codes if entered with three digits, and therefor misinterpret the '\0' in the test suite. Some versions of 'tr' reject the (needless) use of character classes. Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-18Plug a resource leak in threaded pack-objects code.Johannes Sixt
A mutex and a condition variable is allocated for each thread and torn down when the thread terminates. However, for certain workloads it can happen that some threads are actually not started at all. In this case we would leak the mutex and condition variable. Now we allocate them only for those threads that are actually started. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17git-send-email: avoid duplicate message-idsJeff King
We used to unconditionally add a message-id to the outgoing email without bothering to check if it already had one. Instead, let's use the existing one. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17clone: correctly report http_fetch errorsJeff King
The exit status from curl was accidentally lost by the 'case' statement. We need to explicitly save it so that $? doesn't get overwritten. This improves the error message when fetching from an http repository which has never had update-server-info run. Previously, it would fail to note the fetch error and produce multiple errors about the lack of origin branches. It now correctly suggests running git-update-server-info. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17Documentation/git-submodule: refer to gitmodules(5)Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-17threaded pack-objects: Use condition variables for thread communication.Johannes Sixt
In the threaded pack-objects code the main thread and the worker threads must mutually signal that they have assigned a new pack of work or have completed their work, respectively. Previously, the code used mutexes that were locked in one thread and unlocked from a different thread, which is bogus (and happens to work on Linux). Here we rectify the implementation by using condition variables: There is one condition variable on which the main thread waits until a thread requests new work; and each worker thread has its own condition variable on which it waits until it is assigned new work or signaled to terminate. As a cleanup, the worker threads are spawned only after the initial work packages have been assigned. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16builtin-commit: make summary output consistent with statusJunio C Hamano
This enables -B -M to the summary output after a commit is made so that it is in line with what is shown in git-status and commit log template. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16builtin-commit: fix summary output.Junio C Hamano
Because print_summary() forgot to call diff_setup_done() after futzing with diff output options, it failed to activate recursive diff, which resulted in an incorrect summary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16builtin-apply: stronger indent-with-on-tab fixingJ. Bruce Fields
Fix any sequence of 8 spaces in initial indent, not just the case where the 8 spaces are the first thing on the line. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16builtin-apply: minor cleanup of whitespace detectionJ. Bruce Fields
Use 0 instead of -1 for the case where not tabs or spaces are found; it will make some later math slightly simpler. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16Re-re-re-fix common tail optimizationJunio C Hamano
We need to be extra careful recovering the removed common section, so that we do not break context nor the changed incomplete line (i.e. the last line that does not end with LF). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16whitespace: fix config.txt description of indent-with-non-tabJ. Bruce Fields
Fix garbled description. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16whitespace: more accurate initial-indent highlightingJ. Bruce Fields
Instead of highlighting the entire initial indent, highlight only the problematic spaces. In the case of an indent like ' \t \t' there may be multiple problematic ranges, so it's easiest to emit the highlighting as we go instead of trying rember disjoint ranges and do it all at the end. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>