summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-09-29Merge branch 'ml/submodule'Junio C Hamano
* ml/submodule: git-submodule - allow a relative path as the subproject url
2007-09-29Merge branch 'jb/remote-rm'Junio C Hamano
* jb/remote-rm: git-remote rm: add tests and minor fix-ups remote: document the 'rm' subcommand remote: add 'rm' subcommand
2007-09-29Merge branch 'jk/diff-rename'Junio C Hamano
* jk/diff-rename: diffcore-rename: cache file deltas
2007-09-29Sync with GIT 1.5.3.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29GIT 1.5.3.3v1.5.3.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Fix revision log diff setup, avoid unnecessary diff generationLinus Torvalds
We used to incorrectly start calculating diffs whenever any argument but '-z' was recognized by the diff options parsing. That was bogus, since not all arguments result in diffs being needed, so we just waste a lot of time and effort on calculating diffs that don't matter. This actually also fixes another bug in "git log". Try this: git log -C and notice how it prints an extra empty line in between log entries, even though it never prints the actual diff (because we didn't ask for any diff format, so the diff machinery never prints anything). With this patch, that bogus empty line is gone, because "revs->diff" is never set. So this isn't just a "wasted time and effort" issue, it's also a slight semantic fix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-bundle: fix commandline examples in the manpageMiklos Vajna
Multiple commands were displayed in one line, making the manpage hard to read. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Merge branch 'mergetool' of git://repo.or.cz/git/mergetool into maintJunio C Hamano
* 'mergetool' of git://repo.or.cz/git/mergetool: mergetool: Fix typo in options passed to kdiff3 mergetool: fix emerge when running in a subdirectory Mergetool generating blank files (1.5.3)
2007-09-29strbuf change: be sure ->buf is never ever NULL.Pierre Habouzit
For that purpose, the ->buf is always initialized with a char * buf living in the strbuf module. It is made a char * so that we can sloppily accept things that perform: sb->buf[0] = '\0', and because you can't pass "" as an initializer for ->buf without making gcc unhappy for very good reasons. strbuf_init/_detach/_grow have been fixed to trust ->alloc and not ->buf anymore. as a consequence strbuf_detach is _mandatory_ to detach a buffer, copying ->buf isn't an option anymore, if ->buf is going to escape from the scope, and eventually be free'd. API changes: * strbuf_setlen now always works, so just make strbuf_reset a convenience macro. * strbuf_detatch takes a size_t* optional argument (meaning it can be NULL) to copy the buffer's len, as it was needed for this refactor to make the code more readable, and working like the callers. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29double free in builtin-update-index.cPierre Habouzit
path_name is either ptr that should not be freed, or a pointer to a strbuf buffer that is deallocated when exiting the loop. Don't do that ! Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29mergetool: Fix typo in options passed to kdiff3Theodore Ts'o
Fix missing double hyphens in "-L1" and "-L2" Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-29mergetool: fix emerge when running in a subdirectoryTheodore Ts'o
Only pass the basename of the output filename when to emerge, since emerge interprets non-absolute pathnames relative to the containing directory of the output buffer. Thanks to Kelvie Wong for pointing this out. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-29Mergetool generating blank files (1.5.3)Junio C Hamano
When mergetool is run from a subdirectory, "ls-files -u" nicely limits the output to conflicted files in that directory, but we need to give the full path to cat-file plumbing to grab the contents of stages. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-27quiltimport: Skip non-existent patchesDan Nicholson
When quiltimport encounters a non-existent patch in the series file, just skip to the next patch. This matches the behavior of quilt. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-27Clean up stripspace a bit, use strbuf even more.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-27Add strbuf_read_file().Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-27rerere: Fix use of an empty strbuf.bufJunio C Hamano
The code incorrectly assumed that strbuf.buf is always an allocated piece of memory that has NUL at offset strbuf.len. That assumption does not hold for a freshly initialized empty strbuf. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26apply: get rid of --index-info in favor of --build-fake-ancestorJohannes Schindelin
git-am used "git apply -z --index-info" to find the original versions of the files touched by the diff, to be able to do an inexpensive three-way merge. This operation makes only sense in a repository, since the index information in the diff refers to blobs, which have to be present in the current repository. Therefore, teach "git apply" a mode to write out the result as an index file to begin with, obviating the need for scripts to do it themselves. The sole user for --index-info is "git am" is converted to use --build-fake-ancestor in this patch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Move make_cache_entry() from merge-recursive.c into read-cache.cCarlos Rica
The function make_cache_entry() is too useful to be hidden away in merge-recursive. So move it to libgit.a (exposing it via cache.h). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26send-email --smtp-server-port: allow overriding the default portJunio C Hamano
You can use --smtp-server-port option to specify a port different from the default (typically, SMTP servers listen to smtp port 25 and ssmtp port 465). Users should be aware that sending auth info over non-ssl connections may be unsafe or just may not work at all depending on SMTP server config. Signed-off-by: Glenn Rempe <glenn@rempe.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Small cache_tree_write refactor.Pierre Habouzit
This function cannot fail, make it void. Also make write_one act on a const char* instead of a char*. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Make builtin-rerere use of strbuf nicer and more efficient.Pierre Habouzit
memory is now reused across hunks. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Add strbuf_cmp.Pierre Habouzit
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26strbuf_setlen(): do not barf on setting length of an empty buffer to 0Junio C Hamano
strbuf_setlen() expect to be able to NUL terminate the buffer, but a completely empty strbuf could have an empty buffer with 0 allocation; both the assert() and the assignment for NUL termination would fail. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: work on a detached HEADJohannes Schindelin
Earlier, rebase -i refused to rebase a detached HEAD. Now it no longer does. Incidentally, this fixes "git gc --auto" shadowing the true exit status. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Merge branch 'jc/autogc' into js/rebase-iJunio C Hamano
* jc/autogc: git-gc --auto: run "repack -A -d -l" as necessary. git-gc --auto: restructure the way "repack" command line is built. git-gc --auto: protect ourselves from accumulated cruft git-gc --auto: add documentation. git-gc --auto: move threshold check to need_to_gc() function. repack -A -d: use --keep-unreachable when repacking pack-objects --keep-unreachable Export matches_pack_name() and fix its return value Invoke "git gc --auto" from commit, merge, am and rebase. Implement git gc --auto Conflicts: builtin-pack-objects.c
2007-09-26diffcore-rename: cache file deltasJeff King
We find rename candidates by computing a fingerprint hash of each file, and then comparing those fingerprints. There are inherently O(n^2) comparisons, so it pays in CPU time to hoist the (rather expensive) computation of the fingerprint out of that loop (or to cache it once we have computed it once). Previously, we didn't keep the filespec information around because then we had the potential to consume a great deal of memory. However, instead of keeping all of the filespec data, we can instead just keep the fingerprint. This patch implements and uses diff_free_filespec_data_large to accomplish that goal. We also have to change estimate_similarity not to needlessly repopulate the filespec data when we already have the hash. Practical tests showed 4.5x speedup for a 10% memory usage increase. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: create .dotest-merge after validating options.Matt Kraai
Creating .dotest-merge before validating the options prevents both --continue and --interactive from working if the options are invalid, so only create it after validating the options. [jc: however, just moving the creation of DOTEST breaks output] Signed-off-by: Matt Kraai <kraai@ftbfs.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26core-tutorial: correct URLRandy Dunlap
The tinyurl is incorrect -- it attempts to go to groups.osdl.org, which is gone. Either use the full URL (in patch) or create a new tinyurl for this URL. Is the web page (where I first saw this problem) generated from this txt file? http://www.kernel.org/pub/software/scm/git/docs/core-tutorial.html If not, it needs to be updated also. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Fix spelling of overridden in documentationShawn Bohrer
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: avoid exporting GIT_AUTHOR_* variablesJohannes Schindelin
It is somewhat unsafe to export the GIT_AUTHOR_* variables, since a later call to git-commit or git-merge could pick them up inadvertently. So avoid the export, using a recipe provided by Johannes Sixt. Incidentally, this fixes authorship of merges with "rebase --preserve -i". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: Fix numbers in progress reportJohannes Schindelin
Instead of counting all lines in done and todo, we now count the actions before outputting "$Rebasing ($count/$total)". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: style fixes and minor cleanupsJohannes Schindelin
This patch indents ";;" consistently with the rest of git's shell scripts, and makes sure that ";;" are before each "esac". It introduces a helper function "has_action", to make it easier to read the intentions of the code. Errors from "git rev-parse --verify" are no longer ignored. Spaces are quoted using single quotes instead of a backslash, for readability. A "test $preserve=f" (missing spaces) was fixed; hashes are no longer written to "$DOTEST"/rewritten/ unnecessarily. We used to quote the message for a squash, only to have "echo" unquote it. Now we use "printf" and do not need to quote to start with. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26rebase -i: commit when continuing after "edit"Johannes Schindelin
When doing an "edit" on a commit, editing and git-adding some files, "git rebase -i" complained about a missing "author-script". The idea was that the user would call "git commit --amend" herself. But we can be nice and do that for the user. Noticed by Dmitry Potapov. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26gitattributes.txt: Be more to the point in the filter driver description.Johannes Sixt
The description was meant to emphasizes that the project should remain usable even if the filter driver was not used. This makes it more explicit and removes the "here is rope to hang yourself" paraphrase. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26gitattributes.txt: Remove a duplicated paragraph about 'ident' and 'crlf' ↵Johannes Sixt
interaction. The order in which 'ident' and 'crlf' are carried out is documented a few paragraphs later again, after 'filter' was introduced. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Make merge-recursive honor diff.renamelimitLars Hjemli
It might be a sign of source code management gone bad, but when two branches has diverged almost beyond recognition and time has come for the branches to merge, the user is going to need all the help his tool can give him. Honoring diff.renamelimit has great potential as a painkiller in such situations. The painkiller effect could have been achieved by e.g. 'merge.renamelimit', but the flexibility gained by a separate option is questionable: our user would probably expect git to detect renames equally good when merging as when diffing (I known I did). Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26Move convert-objects to contrib.Matt Kraai
convert-objects was needed to convert from an old-style repository, which hashed the compressed contents and used a different date format. Such repositories are presumably no longer common and, if such conversions are necessary, should be done by writing a frontend for git-fast-import. Linus, the original author, is OK with moving it to contrib. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-26user-manual: Explain what submodules are good for.Michael Smith
Rework the introduction to the Submodules section to explain why someone would use them, and fix up submodule references from the tree-object and todo sections. Signed-off-by: Michael Smith <msmith@cbnco.com> Acked-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25Merge branch 'jn/web' into maintJunio C Hamano
* jn/web: gitweb: No difftree output for trivial merge gitweb: Remove parse_from_to_diffinfo code from git_patchset_body
2007-09-25git-submodule - allow a relative path as the subproject urlMark Levedahl
This allows a subproject's location to be specified and stored as relative to the parent project's location (e.g., ./foo, or ../foo). This url is stored in .gitmodules as given. It is resolved into an absolute url by appending it to the parent project's url when the information is written to .git/config (i.e., during submodule add for the originator, and submodule init for a downstream recipient). This allows cloning of the project to work "as expected" if the project is hosted on a different server than when the subprojects were added. Signed-off-by: Mark Levedahl <mdl123@verizon.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25Merge branch 'maint'Junio C Hamano
* maint: Do not over-quote the -f envelopesender value. unexpected Make output (e.g. from --debug) causes build failure Fixed minor typo in t/t9001-send-email.sh test command line.
2007-09-25Do not over-quote the -f envelopesender value.Jim Meyering
Without this, the value passed to sendmail would have an extra set of single quotes. At least exim's sendmail emulation would object to that: exim: bad -f address "'list-addr@example.org'": malformed address: ' \ may not follow 'list-addr@example.org error: hooks/post-receive exited with error code 1 Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25unexpected Make output (e.g. from --debug) causes build failureJim Meyering
Without this, the extra output produced e.g., by "make --debug" would go into $INSTLIBDIR and then cause the sed command to fail. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25Fixed minor typo in t/t9001-send-email.sh test command line.Glenn Rempe
The git-send-email command line in the test was missing a single hyphen. Signed-off-by: Glenn Rempe <glenn@rempe.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25Fix pool handling in git-svnimport to avoid memory leaks.Stefan Sperling
- Create an explicit one-and-only root pool. - Closely follow examples in SVN::Core man page. Before calling a subversion function, create a subpool of our root pool and make it the new default pool. - Create a subpool for looping over svn revisions and clear this subpool (i.e. it mark for reuse, don't decallocate it) at the start of the loop instead of allocating new memory with each iteration. See http://marc.info/?l=git&m=118554191513822&w=2 for a detailed explanation of the issue. Signed-off-by: Stefan Sperling <stsp@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-24Start RelNotes for 1.5.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-24Merge branch 'jn/web'Junio C Hamano
* jn/web: gitweb: No difftree output for trivial merge gitweb: Remove parse_from_to_diffinfo code from git_patchset_body
2007-09-24gitweb: No difftree output for trivial mergeJakub Narebski
In 'commitdiff' view, for the merge commit, there is an extra header for the difftree table, with links to commitdiffs to individual parents. Do not show such header when there is nothing to show, for trivial merges. This means that for trivial merge you have to go to 'commit' view to get links to diffs to each parent. Signed-off-by: Jakub Narebski <jnareb@gmail.com>
2007-09-24gitweb: Remove parse_from_to_diffinfo code from git_patchset_bodyJakub Narebski
In commit 90921740bd00029708370673fdc537522aa48e6f "gitweb: Split git_patchset_body into separate subroutines" a part of git_patchset_body code was separated into parse_from_to_diffinfo subroutine. But instead of replacing the separated code by the call to mentioned subroutine, the call to subroutine was placed before the separated code. This patch removes parse_from_to_diffinfo code from git_patchset_body subroutine. Signed-off-by: Jakub Narebski <jnareb@gmail.com>