summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-10-16filter-branch: update current branch when rewrittenLibravatar Johannes Schindelin2-1/+18
Earlier, "git filter-branch --<options> HEAD" would not update the working tree after rewriting the branch. This commit fixes it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16fix filter-branch documentationLibravatar Johannes Schindelin1-2/+1
The man page for filter-branch still talked about writing the result to the branch "newbranch". This is hopefully the last place where the old behaviour was described. Noticed by Bill Lear. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16helpful error message when send-pack finds no refs in common.Libravatar Andrew Clausen1-1/+2
Signed-off-by: Andrew Clausen <clausen@econ.upenn.edu> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16Fix setup_git_directory_gently() with relative GIT_DIR & GIT_WORK_TREELibravatar Johannes Schindelin2-1/+21
There are a few programs, such as config and diff, which allow running without a git repository. Therefore, they have to call setup_git_directory_gently(). However, when GIT_DIR and GIT_WORK_TREE were set, and the current directory was a subdirectory of the work tree, setup_git_directory_gently() would return a bogus NULL prefix. This patch fixes that. Noticed by REPLeffect on IRC. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-16Correct typos in release notes for 1.5.3.5Libravatar Shawn O. Pearce1-2/+2
Noticed by Michele Ballabio. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15Whip post 1.5.3.4 maintenance series into shape.Libravatar Shawn O. Pearce2-1/+26
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15rebase -i: use diff plumbing instead of porcelainLibravatar Johannes Schindelin1-2/+2
When diff drivers are installed, calling "git diff <tree1>..<tree2>" calls those drivers. This borks the patch generation of rebase -i. So use "git diff-tree -p" instead, which does not call diff drivers. Noticed by Johannes Sixt. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15Do not remove distributed configure scriptLibravatar Mathias Megyei1-1/+4
Before this patch the clean target has removed the configure script that comes with Git tar file. That made compiling Git for different architectures inconvenient. This patch excludes configure from the files to be deleted by 'make clean' and adds new target 'distclean' to preserve old functionality. Signed-off-by: Mathias Megyei <mathias@mnet-mail.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git-archive: document --execLibravatar Michele Ballabio1-1/+6
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git-reflog: document --verboseLibravatar Michele Ballabio1-1/+4
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git-config: handle --file option with relative pathname properlyLibravatar Gerrit Pape1-2/+7
When calling git-config not from the top level directory of a repository, it changes directory before trying to open the config file specified through the --file option, which then fails if the config file was specified by a relative pathname. This patch adjusts the pathname to the config file if applicable. The problem was noticed by Joey Hess, reported through http://bugs.debian.org/445208 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15clear_commit_marks(): avoid deep recursionLibravatar Johannes Schindelin1-9/+14
Before this patch, clear_commit_marks() recursed for each parent. This could be potentially very expensive in terms of stack space. Probably the only reason that this did not lead to problems is the fact that we typically call clear_commit_marks() after marking a relatively small set of commits. Use (sort of) a tail recursion instead: first recurse on the parents other than the first one, and then continue the loop with the first parent. Noticed by Shawn Pearce. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git add -i: Remove unused variablesLibravatar Jean-Luc Herren1-10/+6
Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git add -i: Fix parsing of abbreviated hunk headersLibravatar Jean-Luc Herren1-6/+5
The unified diff format allows one-line ranges to be abbreviated by omiting the size. The hunk header "@@ -10,1 +10,1 @@" can be expressed as "@@ -10 +10 @@", but this wasn't properly parsed in all cases. Such abbreviated hunk headers are generated when a one-line change (add, remove or modify) appears without context; for example because the file is a one-liner itself or because GIT_DIFF_OPTS was set to '-u0'. If the user then runs 'git add -i' and enters the 'patch' command for that file, perl complains about undefined variables. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15git-config: don't silently ignore options after --listLibravatar Frank Lichtenheld1-1/+4
Error out if someone gives options after --list since that is not a valid syntax. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15Clean up "git log" format with DIFF_FORMAT_NO_OUTPUTLibravatar Linus Torvalds3-3/+3
This fixes an unnecessary empty line that we add to the log message when we generate diffs, but don't actually end up printing any due to having DIFF_FORMAT_NO_OUTPUT set. This can happen with pickaxe or with rename following. The reason is that we normally add an empty line between the commit and the diff, but we do that even for the case where we've then suppressed the actual printing of the diff. This also updates a couple of tests that assumed the extraneous empty line would exist at the end of output. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15Fix embarrassing "git log --follow" bugLibravatar Linus Torvalds1-2/+2
It turns out that I completely broke "git log --follow" with my recent patch to revision.c ("Fix revision log diff setup, avoid unnecessary diff generation", commit b7bb760d5ed4881422673d32f869d140221d3564). Why? Because --follow obviously requires the diff machinery to function, exactly the same way pickaxe does. So everybody is away right now, but considering that nobody even noticed this bug, I don't think it matters. But for the record, here's the trivial one-liner fix (well, two, since I also fixed the comment). Because of the nature of the bug, if you ask for patches when following (which is one of the things I normally do), the bug is hidden, because then the request for diff output will automatically also enable the diffs themselves. So while "git log --follow <filename>" didn't work, adding a "-p" magically made it work again even without this fix. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-03GIT 1.5.3.4Libravatar Junio C Hamano2-11/+18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-03Add test case for ls-files --with-treeLibravatar Carl Worth1-0/+71
This tests basic functionality and also exercises a bug noticed by Keith Packard, (prune_cache followed by add_index_entry can trigger an attempt to realloc a pointer into the middle of an allocated buffer). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Must not modify the_index.cache as it may be passed to realloc at some point.Libravatar Keith Packard1-1/+2
The index cache is not static, growing as new entries are added. If entries are added after prune_cache is called, cache will no longer point at the base of the allocation, and realloc will not be happy. I verified that this was the only place in the current source which modified any index_state.cache elements aside from the alloc/realloc calls in read-cache by changing the type of the element to 'struct cache_entry ** const cache' and recompiling. A more efficient patch would create a separate 'cache_base' value to track the allocation and then fix things up when reallocation was necessary, instead of the brute-force memmove used here. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02the ar tool is called gar on some systemsLibravatar Robert Schiele1-1/+1
Some systems that have only installed the GNU toolchain (prefixed with "g") do not provide "ar" but only "gar". Make configure find this tool as well. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02rename diff_free_filespec_data_large() to diff_free_filespec_blob()Libravatar Junio C Hamano3-5/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02diffcore-rename: cache file deltasLibravatar Jeff King3-4/+11
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-10-02Mention 'cpio' dependency in INSTALLLibravatar Johan Herland1-0/+3
Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Make git-pull complain and give advice when there is nothing to merge withLibravatar Federico Mena Quintero1-4/+18
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Note that git-branch will not automatically checkout the new branchLibravatar Federico Mena Quintero1-0/+4
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Add documentation for --track and --no-track to the git-branch docs.Libravatar Federico Mena Quintero1-0/+15
Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Say when --track is useful in the git-checkout docs.Libravatar Federico Mena Quintero1-1/+3
The documentation used to say what the option does, but it didn't mention a use case. Signed-off-by: Federico Mena Quintero <federico@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02Fix typo in config.txtLibravatar Johannes Schindelin1-1/+1
There was an 'l' (ell) instead of a '1' (one) in one of the gitlinks. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02for-each-ref: fix %(numparent) and %(parent)Libravatar Junio C Hamano1-4/+6
The string value of %(numparent) was not returned correctly. Also %(parent) misbehaved for the root commits (returned garbage) and merge commits (returned first parent, followed by a space). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02git-commit: initialize TMP_INDEX just to be sure.Libravatar Junio C Hamano1-0/+1
We rely on TMP_INDEX variable to decide if we are doing a partial commit, as it is only set in the partial commit codepath. But the variable is never initialized. A stray environment variable from outside could ruin the day. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01fixed link in documentation of diff-optionsLibravatar Steffen Prohaska1-2/+2
Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01Whip post 1.5.3.3 maintenance series into shape.Libravatar Junio C Hamano4-8/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01git stash: document apply's --index switchLibravatar Miklos Vajna1-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01post-receive-hook: Remove the From field from the generated email header so ↵Libravatar Andy Parkins1-1/+0
that the pusher's name is used Using the name of the committer of the revision at the tip of the updated ref is not sensible. That information is available in the email itself should it be wanted, and by supplying a "From", we were effectively hiding the person who performed the push - which is useful information in itself. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-remote: exit with non-zero status after detecting errors.Libravatar Jari Aalto1-4/+10
Some subcommands of "git-remote" detected and issued error messages but did not signal that to the calling process with exit status. Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29rebase -i: squash should retain the authorship of the _first_ commitLibravatar Johannes Schindelin3-3/+3
It was determined on the mailing list, that it makes more sense for a "squash" to keep the author of the first commit as the author for the result of the squash. Make it so. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-add--interactive: Improve behavior on bogus inputLibravatar Jean-Luc Herren1-4/+3
1) Previously, any menu would cause a perl error when entered '0', which is never a valid option. 2) Entering a bogus choice (like 998 or 4-2) surprisingly caused the same behavior as if the user had just hit 'enter', which means to carry out the selected action on the selected items. Entering such bogus input is now a no-op and the sub-menu doesn't exit. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29git-add--interactive: Allow Ctrl-D to exitLibravatar Jean-Luc Herren1-1/+6
Hitting Ctrl-D (EOF) is a common way to exit shell-like tools. When in a sub-menu it will still behave as if an empty line had been entered, carrying out the action on the selected items and returning to the previous menu. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29GIT 1.5.3.3Libravatar Junio C Hamano2-1/+38
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29Fix revision log diff setup, avoid unnecessary diff generationLibravatar Linus Torvalds1-2/+8
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 manpageLibravatar Miklos Vajna1-0/+8
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 maintLibravatar Junio C Hamano1-7/+8
* '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-28mergetool: Fix typo in options passed to kdiff3Libravatar Theodore Ts'o1-2/+2
Fix missing double hyphens in "-L1" and "-L2" Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-28mergetool: fix emerge when running in a subdirectoryLibravatar Theodore Ts'o1-2/+2
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-28Mergetool generating blank files (1.5.3)Libravatar Junio C Hamano1-3/+4
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 patchesLibravatar Dan Nicholson1-0/+4
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-26apply: get rid of --index-info in favor of --build-fake-ancestorLibravatar Johannes Schindelin3-21/+31
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.cLibravatar Carlos Rica3-24/+26
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-25core-tutorial: correct URLLibravatar Randy Dunlap1-1/+2
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>