1
0
mirror of https://github.com/git/git.git synced 2024-09-27 05:11:36 +02:00
Commit Graph

7597 Commits

Author SHA1 Message Date
Shawn O. Pearce
9a0eaf83ea Make git-describe a builtin.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-10 08:27:01 -08:00
Shawn O. Pearce
8c599c749f Don't save the commit buffer in git-describe.
The commit buffer (message of the commit) is not actually
used by the git-describe process.  We can save some memory
by not keeping it around.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-10 08:26:50 -08:00
Pavel Roskin
e05db0fd4f Fix warnings in sha1_file.c - use C99 printf format if available
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 22:43:58 -08:00
Junio C Hamano
bb1091a475 -u is now default for 'git-mailinfo'.
Originally from David Woodhouse, but also adjusts the callers of
mailinfo to the new default.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 21:32:49 -08:00
Junio C Hamano
62c89c662f -u is now default for 'git-applymbox'
It has '-n' to disable it just in case, but do not even bother
documenting it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 21:20:39 -08:00
Junio C Hamano
3cf167ba4b git-am: should work when "--no-utf8 --utf8" is given
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 21:16:45 -08:00
Shawn O. Pearce
1c23d794bf Don't die in git-http-fetch when fetching packs.
My sp/mmap changes to pack-check.c modified the function such that
it expects packed_git.pack_size to be populated with the total
bytecount of the packfile by the caller.

But that isn't the case for packs obtained by git-http-fetch as
pack_size was not initialized before being accessed.  This caused
verify_pack to think it had 2^32-21 bytes available when the
downloaded pack perhaps was only 305 bytes in length.  The use_pack
function then later dies with "offset beyond end of packfile"
when computing the overall file checksum.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 17:54:25 -08:00
Steven Grimm
cec21ca7cf Update git-svn manpage to remove the implication that SVN::* is optional.
Now that git-svn requires the SVN::* Perl library, the manpage doesn't need
to describe what happens when you don't have it.

Signed-off-by: Steven Grimm <koreth@midwinter.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 17:08:09 -08:00
Stefan-W. Hahn
6900679c2f Replacing the system call pread() with lseek()/xread()/lseek() sequence.
Using cygwin with cygwin.dll before 1.5.22 the system call pread() is buggy.
This patch introduces NO_PREAD. If NO_PREAD is set git uses a sequence of
lseek()/xread()/lseek() to emulate pread.

Signed-off-by: Stefan-W. Hahn <stefan.hahn@s-hahn.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 16:40:40 -08:00
Jakub Narebski
0bdb28c9cc gitweb: Fix git_patchset_body not closing <div class="patch">
Fix case when git_patchset_body didn't close <div class="patch">,
for patchsets with last patch empty.

This patch also removes some commented out code in git_patchset_body.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Acked-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 16:23:39 -08:00
Alexandre Julliard
03d311eda2 git.el: Define the propertize function if needed, for XEmacs compatibility.
Also use `concat' instead of `format' in the pretty-printer since
format doesn't preserve properties under XEmacs.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 16:15:07 -08:00
Alexandre Julliard
3fe71f3a6f git-clone: Make sure the master branch exists before running cat on it.
Otherwise we get an error like this on stderr:

  cat: [...]/.git/refs/remotes/origin/master: No such file or directory

which makes it look like git-clone failed.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 16:14:41 -08:00
Alexandre Julliard
d234b21c69 git-apply: Remove directories that have become empty after deleting a file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 16:05:00 -08:00
Jeff King
d93b7d1c30 get_tree_entry: map blank requested entry to tree root
This means that
  git show HEAD:
will now return HEAD^{tree}, which is logically consistent with
  git show HEAD:Documentation

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 14:08:41 -08:00
Junio C Hamano
2740b2b853 builtin-archive: do not free a tree held by the object layer.
Found by running "git archive --format=tar HEAD" in Documentation/
directory.

It's surprising that nobody has noticed this from the beginning...

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 14:07:59 -08:00
Junio C Hamano
240897e908 Merge branch 'maint'
* maint:
  Fix "Do not ignore a detected patchfile brokenness."
  Do not ignore a detected patchfile brokenness.
2007-01-09 12:04:30 -08:00
Junio C Hamano
6534141151 Fix "Do not ignore a detected patchfile brokenness."
Returning negative value from there does not stop the caller from using
the earlier part.

Noticed by Linus.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 11:50:53 -08:00
Junio C Hamano
5a17b54ad5 Do not ignore a detected patchfile brokenness.
find_header() function is used to read and parse the patchfile
and it detects errors in the patch, but one place ignored the
error and went ahead, which was quite bad.

Noticed by Jeff Garzik.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 02:56:43 -08:00
Junio C Hamano
1295228d1f merge-base: do not leak commit list
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 23:10:49 -08:00
Brian Gernhardt
cdd4fb15cf Auto-quote config values in config.c:store_write_pair()
Suggested by Jakub Narebski <jnareb@gmail.com> on the list.

When we send a value to store_write_pair(), make sure that the value
that gets read out matches the one passed in.  This means that for any
value that contains leading or trailing whitespace or any comment
character (# and ;), we need to surround it in quotes.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 22:00:18 -08:00
Brian Gernhardt
baee1e91ed Ignore git-init and git-remote
These new commands weren't added to .gitignore.  Add them so we don't
end up with copies of them in the repo.

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:53:23 -08:00
Junio C Hamano
3f43d72392 rm git-rerere.perl -- it is now a built-in.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:52:38 -08:00
Martin Langhoff
3486595bf1 cvsserver: fix revision number during file adds
With this patch, cvs add / cvs commit echoes back to the client
the correct file version (1.1) so that the file in the checkout
is recognised as up-to-date.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:45:13 -08:00
Martin Langhoff
49fb940e40 cvsserver: detect early of we are up to date and avoid costly rev-list
if the SHA1 of our head matches the last SHA1 seen in the DB, avoid further
processing.

[jc: an "Oops, please amend" patch rolled in]

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:44:07 -08:00
J. Bruce Fields
041e69c998 Documentation: add git-remote man page
Add a preliminary man page for git-remote.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 21:42:37 -08:00
Junio C Hamano
c326246acc Merge branch 'jc/reflog'
* jc/reflog:
  reflog --fix-stale: do not check the same trees and commits repeatedly.
  reflog expire --fix-stale
  Move traversal of reachable objects into a separate library.
  builtin-prune: separate ref walking from reflog walking.
  builtin-prune: make file-scope static struct to an argument.
2007-01-08 15:56:51 -08:00
Andy Whitcroft
480c9e521b short i/o: fix config updates to use write_in_full
We need to check that the writes we perform during the update of
the users configuration work.  Convert to using write_in_full().

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 15:44:47 -08:00
Andy Whitcroft
93822c2239 short i/o: fix calls to write to use xwrite or write_in_full
We have a number of badly checked write() calls.  Often we are
expecting write() to write exactly the size we requested or fail,
this fails to handle interrupts or short writes.  Switch to using
the new write_in_full().  Otherwise we at a minimum need to check
for EINTR and EAGAIN, where this is appropriate use xwrite().

Note, the changes to config handling are much larger and handled
in the next patch in the sequence.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 15:44:47 -08:00
Andy Whitcroft
93d26e4cb9 short i/o: fix calls to read to use xread or read_in_full
We have a number of badly checked read() calls.  Often we are
expecting read() to read exactly the size we requested or fail, this
fails to handle interrupts or short reads.  Add a read_in_full()
providing those semantics.  Otherwise we at a minimum need to check
for EINTR and EAGAIN, where this is appropriate use xread().

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 15:44:47 -08:00
Andy Whitcroft
e08140568a short i/o: clean up the naming for the write_{in,or}_xxx family
We recently introduced a write_in_full() which would either write
the specified object or emit an error message and fail.  In order
to fix the read side we now want to introduce a read_in_full()
but without an error emit.  This patch cleans up the naming
of this family of calls:

1) convert the existing write_or_whine() to write_or_whine_pipe()
   to better indicate its pipe specific nature,
2) convert the existing write_in_full() calls to write_or_whine()
   to better indicate its nature,
3) introduce a write_in_full() providing a write or fail semantic,
   and
4) convert write_or_whine() and write_or_whine_pipe() to use
   write_in_full().

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 15:44:47 -08:00
Junio C Hamano
0f018baba6 --prune is now default for 'pack-refs'
There is no reason not to, really.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:46:00 -08:00
Junio C Hamano
d84029b673 --utf8 is now default for 'git-am'
Since we are talking about allowing potentially incompatible UI
changes in v1.5.0 iff the change improves the general situation,
I would say why not.

There is --no-utf8 flag to avoid re-coding from botching the log
message just in case, but we may not even need it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:45:59 -08:00
Michael Loeffler
521f9c4def git-commit: do not fail to print the diffstat even if there is a file named HEAD
Signed-off-by: Michael Loeffler <zvpunry@zvpunry.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:45:59 -08:00
Andy Whitcroft
d677db86d9 ssh-upload: prevent buffer overrun
Prevent a client from overrunning the on stack ref buffer.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 14:45:54 -08:00
Martin Langhoff
4083c2fce8 cvsimport: cleanup temporary cvsps file
It is bad manners to leave these sizable files
around when we are done with them.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 03:01:35 -08:00
Martin Langhoff
eec8496210 cvsimport: document -S and -L options
Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 03:01:32 -08:00
Martin Langhoff
ded9f40059 cvsimport: skip commits that are too recent (option and documentation)
This makes the earlier "wait for 10 minutes before importing" safety
overridable with "-a(ll)" flag, and adds necessary documentation.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-08 03:01:16 -08:00
Eric Wong
9a5e4075a4 git-svn: pass an unambiguous ref to rev-list when grafting-branches
Some users apparently create local heads with the same basename
as the remote branch they're tracking.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 21:32:49 -08:00
Eric Wong
ae41098714 git-svn: add --prefix= option to multi-init
Also, document --{trunk,branches,tags} options while we're
documenting multi-init options.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 21:32:49 -08:00
J. Bruce Fields
59b5f52047 Documentation: clarify definition of "reachable"
Clarify definition of "reachable" (what chain?)

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 21:32:49 -08:00
Sasha Khapyorsky
692167774a git-svnimport: fix edge revisions double importing
This fixes newly introduced bug when the incremental cycle edge revisions
are imported twice.

Signed-off-by: Sasha Khapyorsky <sashak@voltaire.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:20:19 -08:00
Martin Langhoff
6211988f77 cvsimport: skip commits that are too recent
With this patch, cvsimport will skip commits made
in the last 10 minutes. The recent-ness test is of
5 minutes + cvsps fuzz window (5 minutes default).

When working with a CVS repository that is in use,
importing commits that are too recent can lead to
partially incorrect trees. This is mainly due to

 - Commits that are within the cvsps fuzz window may later
   be found to have affected more files.

 - When performing incremental imports, clock drift between
   the systems may lead to skipped commits.

This commit helps keep incremental imports of in-use
CVS repositories sane.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:06:49 -08:00
Jakub Narebski
3faa541fa9 gitweb: Remove superfluous "|" in "commit" view
Remove superfluous trailing "|" separator from difftree part of "commit"
view for new files (created in given commit).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:06:45 -08:00
Jürgen Rühle
3368d11f30 Remove unnecessary git-rm --cached reference from status output
Since git-reset has learned restoring the absence of paths git-rm --cached is
no longer necessary. Therefore remove it from the cached content header hint.

Also remove the unfortunate wording 'Cached' from the header itself.

Signed-off-by: Jürgen Rühle <j-r@online.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:04:57 -08:00
Nicolas Pitre
515377ea9e "init-db" can really be just "init"
Make "init" the equivalent of "init-db". This should make first GIT
impression a little more friendly.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 18:03:07 -08:00
Junio C Hamano
cf2999eb4c Merge branch 'sp/mmap'
* sp/mmap: (27 commits)
  Spell default packedgitlimit slightly differently
  Increase packedGit{Limit,WindowSize} on 64 bit systems.
  Update packedGit config option documentation.
  mmap: set FD_CLOEXEC for file descriptors we keep open for mmap()
  pack-objects: fix use of use_pack().
  Fix random segfaults in pack-objects.
  Cleanup read_cache_from error handling.
  Replace mmap with xmmap, better handling MAP_FAILED.
  Release pack windows before reporting out of memory.
  Default core.packdGitWindowSize to 1 MiB if NO_MMAP.
  Test suite for sliding window mmap implementation.
  Create pack_report() as a debugging aid.
  Support unmapping windows on 'temporary' packfiles.
  Improve error message when packfile mmap fails.
  Ensure core.packedGitWindowSize cannot be less than 2 pages.
  Load core configuration in git-verify-pack.
  Fully activate the sliding window pack access.
  Unmap individual windows rather than entire files.
  Document why header parsing won't exceed a window.
  Loop over pack_windows when inflating/accessing data.
  ...

Conflicts:

	cache.h
	pack-check.c
2007-01-07 00:12:47 -08:00
Junio C Hamano
ecaebf4af1 Spell default packedgitlimit slightly differently
This is shorter and easier to read, and also makes sure the
constant expression does not overflow integer range.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-07 00:11:11 -08:00
Junio C Hamano
e7bb17a475 Merge branch 'jr/status'
* jr/status:
  Improve cached content header of status output
  Support --amend on initial commit in status output
  Improve "nothing to commit" part of status output
  Clarify syntax and role of git-add in status output
2007-01-06 23:49:24 -08:00
Junio C Hamano
8f905eb139 Merge branch 'jc/remote'
* jc/remote:
  git-remote
2007-01-06 23:49:16 -08:00
Junio C Hamano
bc8c0294c6 git-reset <tree> -- <path> restores absense of <path> in <tree>
When <path> exists in the index (either merged or unmerged), and
<tree> does not have it, git-reset should be usable to restore
the absense of it from the tree.  This implements it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 22:57:42 -08:00