1
0
mirror of https://github.com/git/git.git synced 2024-10-04 23:51:24 +02:00
Commit Graph

11613 Commits

Author SHA1 Message Date
Junio C Hamano
fed276e752 Sync with GIT 1.5.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-03 03:03:15 -07:00
Junio C Hamano
4c75136f76 GIT 1.5.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.3.4
2007-10-03 02:33:48 -07:00
Carl Worth
54e1abce90 Add test case for ls-files --with-tree
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-03 00:53:24 -07:00
Keith Packard
95af39fcb2 Must not modify the_index.cache as it may be passed to realloc at some point.
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-02 23:18:58 -07:00
Robert Schiele
96e24abc9f the ar tool is called gar on some systems
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-02 21:10:25 -07:00
Junio C Hamano
8ae92e6389 rename diff_free_filespec_data_large() to diff_free_filespec_blob()
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 21:02:09 -07:00
Jeff King
eede7b7d11 diffcore-rename: cache file deltas
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-02 21:02:03 -07:00
Johan Herland
2ff5e18a93 Mention 'cpio' dependency in INSTALL
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:35:29 -07:00
Federico Mena Quintero
8fc293cb1e Make git-pull complain and give advice when there is nothing to merge with
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:27:48 -07:00
Federico Mena Quintero
46749204e9 Note that git-branch will not automatically checkout the new branch
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:27:00 -07:00
Federico Mena Quintero
84d176cef6 Add documentation for --track and --no-track to the git-branch docs.
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-02 17:26:52 -07:00
Federico Mena Quintero
ac150747d7 Say when --track is useful in the git-checkout docs.
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-02 17:26:40 -07:00
Johannes Schindelin
6ea9c7eb27 Fix typo in config.txt
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-02 15:26:57 -07:00
Junio C Hamano
9e1a2acfb2 for-each-ref: fix %(numparent) and %(parent)
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-02 15:12:05 -07:00
Junio C Hamano
c8f203255b git-commit: initialize TMP_INDEX just to be sure.
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-02 11:48:06 -07:00
Steffen Prohaska
63a1f810a6 fixed link in documentation of diff-options
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01 23:27:20 -07:00
Junio C Hamano
34c6dbdef4 Merge branch 'maint'
* maint:
  Whip post 1.5.3.3 maintenance series into shape.
  git stash: document apply's --index switch
  post-receive-hook: Remove the From field from the generated email header so that the pusher's name is used
2007-10-01 02:09:09 -07:00
Junio C Hamano
5946d4ba89 Whip post 1.5.3.3 maintenance series into shape.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01 02:07:47 -07:00
Miklos Vajna
0bdcac5666 git stash: document apply's --index switch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-01 01:59:29 -07:00
Andy Parkins
e6dc8d60fb post-receive-hook: Remove the From field from the generated email header so 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-10-01 01:59:22 -07:00
Junio C Hamano
326df26d33 Update stale documentation link in the k.org site
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-30 17:32:25 -07:00
Alexandre Julliard
72dc52bfe6 git.el: Reset the permission flags when changing a file state.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:44:06 -07:00
Alexandre Julliard
0365d885ad git.el: Update a file status in the git buffer upon save.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:44:05 -07:00
Alexandre Julliard
9f5599b982 git.el: Do not print a status message on every git command.
Instead print a single message around sequences of commands that can
potentially take some time.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:44:05 -07:00
Alexandre Julliard
b9b7bab4b6 git.el: Preserve file marks when doing a full refresh.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:44:05 -07:00
Daniel Barkalow
fe50eef59b Fix adding a submodule with a remote url
Without this, a non-path URL gets lost before the clone.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:36:02 -07:00
Jari Aalto
6982ccecaf git-remote: exit with non-zero status after detecting error in "rm".
Exit with non-zero status when "git remote rm" was told to
remove a non-existing remote.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:34:19 -07:00
Junio C Hamano
2af89f12c6 Merge branch 'maint'
* maint:
  git-remote: exit with non-zero status after detecting errors.
  rebase -i: squash should retain the authorship of the _first_ commit
  git-add--interactive: Improve behavior on bogus input
  git-add--interactive: Allow Ctrl-D to exit
2007-09-29 23:32:36 -07:00
Jari Aalto
f4bb20cc99 git-remote: exit with non-zero status after detecting errors.
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-29 23:32:31 -07:00
Johannes Schindelin
81ab1cb43a rebase -i: squash should retain the authorship of the _first_ commit
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-29 23:16:08 -07:00
Johannes Schindelin
f8babc4dab rebase -i: support single-letter abbreviations for the actions
When you do many rebases, you can get annoyed by having to type out
the actions "edit" or "squash" in total.

This commit helps that, by allowing you to enter "e" instead of "edit",
"p" instead of "pick", or "s" instead of "squash".

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 23:15:50 -07:00
Jean-Luc Herren
6a6eb3d09f git-add--interactive: Improve behavior on bogus input
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-29 23:14:17 -07:00
Jean-Luc Herren
c95c02486c git-add--interactive: Allow Ctrl-D to exit
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-29 23:14:16 -07:00
Junio C Hamano
2a858ee951 Merge branch 'gr/smtp'
* gr/smtp:
  send-email --smtp-server-port: allow overriding the default port
2007-09-29 16:44:44 -07:00
Junio C Hamano
3a229177f9 Merge branch 'ss/svnimport'
* ss/svnimport:
  Fix pool handling in git-svnimport to avoid memory leaks.
2007-09-29 16:44:25 -07:00
Junio C Hamano
6b4790db24 Merge branch 'sv/svn'
* sv/svn:
  git-svn: handle changed svn command-line syntax
  git-svn: fix test for trunk svn (transaction out of date)
  git-svn: fix test for trunk svn (commit message not needed)
2007-09-29 16:43:23 -07:00
Junio C Hamano
2a350d7a68 Merge branch 'ml/submodule'
* ml/submodule:
  git-submodule - allow a relative path as the subproject url
2007-09-29 16:43:10 -07:00
Junio C Hamano
471fa1ecd5 Merge branch 'jb/remote-rm'
* jb/remote-rm:
  git-remote rm: add tests and minor fix-ups
  remote: document the 'rm' subcommand
  remote: add 'rm' subcommand
2007-09-29 16:43:06 -07:00
Junio C Hamano
ff08c373dc Merge branch 'jk/diff-rename'
* jk/diff-rename:
  diffcore-rename: cache file deltas
2007-09-29 16:42:50 -07:00
Junio C Hamano
d7da5597a8 Sync with GIT 1.5.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-29 16:31:40 -07:00
Junio C Hamano
552ce11006 GIT 1.5.3.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.5.3.3
2007-09-29 16:07:46 -07:00
Linus Torvalds
b7bb760d5e Fix revision log diff setup, avoid unnecessary diff generation
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-29 15:42:32 -07:00
Miklos Vajna
ee8245b54a git-bundle: fix commandline examples in the manpage
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-29 15:40:17 -07:00
Junio C Hamano
d3759c0805 Merge branch 'mergetool' of git://repo.or.cz/git/mergetool into maint
* '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-29 15:39:39 -07:00
Theodore Ts'o
208fe3ac7e mergetool: Fix typo in options passed to kdiff3
Fix missing double hyphens in "-L1" and "-L2"

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2007-09-28 22:26:05 -04:00
Theodore Ts'o
f6e0e55934 mergetool: fix emerge when running in a subdirectory
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-28 21:23:22 -04:00
Junio C Hamano
769f39861b Mergetool generating blank files (1.5.3)
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-28 20:13:14 -04:00
Dan Nicholson
9f569fe58f quiltimport: Skip non-existent patches
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-27 16:19:19 -07:00
Johannes Schindelin
26b2800768 apply: get rid of --index-info in favor of --build-fake-ancestor
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-26 13:42:10 -07:00
Carlos Rica
102c2338da Move make_cache_entry() from merge-recursive.c into read-cache.c
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-26 13:42:10 -07:00