Commit Graph

848 Commits

Author SHA1 Message Date
Johannes Sixt
97b0db330b Merge with git://repo.or.cz/git.git#next 2007-01-29 15:07:37 +01:00
Junio C Hamano
f8de91f962 Merge branch 'master' into next
* master:
  git-fsck-objects is now synonym to git-fsck
  [PATCH] Rename git-repo-config to git-config.
  Heavily expanded update hook to send more useful emails than the old hook
  UNIX reference time of 1970-01-01 00:00 is UTC timezone, not local time zone
  Teach for-each-ref about a little language called Tcl.
  Add a sample program 'blameview' to show how to use git-blame --incremental
  git-push through git protocol
  Document 'git-blame --incremental'
  Documentation/config.txt: Fix documentation of colour config tweaks.
  wt-status: Actually accept `color.status.BLAH' configuration variables.
  git-blame --incremental: don't use pager
2007-01-28 18:43:38 -08:00
Junio C Hamano
df391b192d git-fsck-objects is now synonym to git-fsck
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 16:33:58 -08:00
Tom Prince
e0d10e1c63 [PATCH] Rename git-repo-config to git-config.
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-28 16:16:53 -08:00
Johannes Sixt
93f6197dcc Merge with git://repo.or.cz/git.git#next. 2007-01-25 11:50:13 +01:00
Johannes Sixt
daabe66f18 MinGW: Change the name of hook scripts to make them not executable by default.
Since on Windows there is no 'executable' bit whose absence would deny
execution of a script, we must change the hook scripts' names entirely
to inhibit that they can be invoked by the tools.
2007-01-25 09:17:06 +01:00
Junio C Hamano
4b3cc5b43e Merge branch 'js/reverse' into next
* js/reverse:
  Teach revision machinery about --reverse
  GIT v1.5.0-rc2
  prune: --grace=time
  --walk-reflogs: do not crash with cyclic reflog ancestry
  --walk-reflogs: actually find the right commit by date.
  Fix --walk-reflog with --pretty=oneline
  reflog-walk: build fixes
  log --walk-reflog: documentation
  --walk-reflogs: disallow uninteresting commits
  Teach the revision walker to walk by reflogs with --walk-reflogs
  git-rebase: allow rebasing a detached HEAD.
  branch -f: no reason to forbid updating the current branch in a bare repo.
  git-tag -d: allow deleting multiple tags at once.
  Do not verify filenames in a bare repository
  Stop ignoring Documentation/README
  apply --cached: fix crash in subdirectory
  show-branch --reflog: fix show_date() call
  show_date(): fix relative dates
  show-branch --reflog: tighten input validation.
2007-01-20 23:47:18 -08:00
Junio C Hamano
53645a3a62 reflog-walk: build fixes
Dependency on reflog-walk.h was missing in the Makefile, and
reflog-walk.c did not even include it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 21:32:31 -08:00
Johannes Schindelin
8860fd42fc Teach the revision walker to walk by reflogs with --walk-reflogs
When called with "--walk-reflogs", as long as there are reflogs
available, the walker will take this information into account, rather
than the parent information in the commit object.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-20 21:32:31 -08:00
Johannes Schindelin
cb0ad0c0af fix t0000 for absence of symlinks 2007-01-19 16:36:31 +01:00
Johannes Sixt
0400c502c3 Factor fork()/exec() work into a spawn() like function.
Windows does not have fork(), but something called spawn() that is roughly
equivalent to a fork()/exec() pair, factor out the Unix style code into
a function that does it more similarly to spawn(). Now the Windows style
spawn() can more easily be employed to achieve the same that the Unix style
code does.
2007-01-19 16:32:23 +01:00
Johannes Sixt
aa0dba9443 Add a cpio emulation script based on GNU tar. 2007-01-19 16:32:23 +01:00
Johannes Sixt
d9634b14f9 Windows does not support C99 format strings. 2007-01-19 16:25:15 +01:00
Johannes Schindelin
9c6663c419 strip extension and handle DRIVE: notation 2007-01-19 16:24:49 +01:00
Johannes Schindelin
b4792a360e Include fnmatch from GNU make. 2007-01-19 16:24:48 +01:00
Johannes Schindelin
649a5ce8d6 require regex (http://ftp.gnu.org/pub/gnu/regex/) 2007-01-19 16:24:48 +01:00
Johannes Sixt
14cd939112 Make git compile under MinGW.
These changes are courtesy Johannes Schindelin.
2007-01-19 16:21:41 +01:00
Junio C Hamano
86bbf48632 Merge branch 'ar/merge-recursive' into next
* ar/merge-recursive:
  merge-recursive: do not use on-file index when not needed.
  Speed-up recursive by flushing index only once for all entries
  Provide better feedback for the untracked only case in status output
  Makefile: remove $foo when $foo.exe is built/installed.
  send-email: work around double encoding of in-body From field.
  Add git-init documentation.
  Fix t1410 for core.filemode==false
  Make git-describe a builtin.
  Don't save the commit buffer in git-describe.
2007-01-10 14:45:34 -08:00
Junio C Hamano
6fc301bbf6 Makefile: remove $foo when $foo.exe is built/installed.
On Cygwin, newly builtins are not recognized, because there exist both
the executable binaries (with .exe extension) _and_ the now-obsolete
scripts (without extension), but the script is executed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-10 13:56:02 -08:00
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
Junio C Hamano
2a776f48dd Merge branch 'jc/merge-base' (early part) into next
* 'jc/merge-base' (early part):
  in_merge_bases(): optimization
  merge_base(): move traversal into a separate function.
  Allow in_merge_bases() to take more than one reference commits.
  Make merge-base a built-in.
  Don't die in git-http-fetch when fetching packs.
  Update git-svn manpage to remove the implication that SVN::* is optional.
  Replacing the system call pread() with lseek()/xread()/lseek() sequence.
  gitweb: Fix git_patchset_body not closing <div class="patch">
  git.el: Define the propertize function if needed, for XEmacs compatibility.
  git-clone: Make sure the master branch exists before running cat on it.
  git-apply: Remove directories that have become empty after deleting a file.
  get_tree_entry: map blank requested entry to tree root
  builtin-archive: do not free a tree held by the object layer.
  Fix "Do not ignore a detected patchfile brokenness."
  Do not ignore a detected patchfile brokenness.
2007-01-09 20:41:53 -08:00
Junio C Hamano
71dfbf224f Make merge-base a built-in.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-09 17:57:03 -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
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
Junio C Hamano
257e8823ad Merge branch 'jc/bare' into next
* jc/bare:
  git-fetch: allow updating the current branch in a bare repository.
  Introduce is_bare_repository() and core.bare configuration variable
  Move initialization of log_all_ref_updates
  git-svn: pass an unambiguous ref to rev-list when grafting-branches
  git-svn: add --prefix= option to multi-init
  Documentation: clarify definition of "reachable"
  git-svnimport: fix edge revisions double importing
  cvsimport: skip commits that are too recent
  gitweb: Remove superfluous "|" in "commit" view
  Remove unnecessary git-rm --cached reference from status output
  "init-db" can really be just "init"
  Spell default packedgitlimit slightly differently
2007-01-07 21:37:11 -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
71bb6ea083 Merge branch 'jc/reflog' into next
* 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-06 22:58:20 -08:00
Junio C Hamano
94421474e0 Move traversal of reachable objects into a separate library.
This moves major part of builtin-prune into a separate file,
reachable.c.  It is used to mark the objects that are reachable
from refs, and optionally from reflogs.

The patch looks very large, but if you look at it with diff -C,
which this message is formatted in, most of them are copied
lines and there are very little additions.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-06 22:57:34 -08:00
Junio C Hamano
e0f60cf4d6 Merge branch 'jc/remote' into next
* jc/remote:
  git-remote
  Blame "linenr" link jumps to previous state at "orig_lineno"
  gitweb: Fix "Use of uninitialized value" warning in git_tags_body
  git-svn: make --repack work consistently between fetch and multi-fetch
  git-svn: update documentation for multi-{init|fetch}
  git-svn: make multi-init less confusing
  Remove shadowing variable from traverse_trees()
  Make check target depend on common-cmds.h
  rerere: Fix removal of already resolved path.
  pack-check.c::verify_packfile(): don't run SHA-1 update on huge data
  Fix infinite loop when deleting multiple packed refs.

Conflicts:

	pack-check.c
2007-01-04 23:23:17 -08:00
Junio C Hamano
e194cd1e0e git-remote
It might be handy to have a single command that helps you manage
your configuration that relates to downloading from remote
repositories.  This currently does only about 20% of what I want
it to do.

	$ git remote

shows the list of 'remotes' you have defined somewhere, and

	$ git remote origin

shows the details about the named remote (in this case
"origin").  How the branches are tracked, if you have a
tracking branch that is stale, etc.

	$ git add another git://git.kernel.org/pub/...

defines the default remote.another.url and remote.another.fetch
entries just like a clone does; you can say "git fetch another"
afterwards.

For it to be useful, I think it should be enhanced to:

 - check overlaps of tracking branches and warn;

 - offer to remove stale tracking branches in one go;

 - offer ways to remove or rename remote;

 - offer ways to update an existing remote, perhaps have an
   interactive mode;

Other enhancements might be also possible, but I do not think of
anything that is absolutely necessary other than the above right
now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-04 23:22:39 -08:00
René Scharfe
7c4c9f4cd9 Make check target depend on common-cmds.h
This fixes sparse complaining about a missing include file
if 'make check' is run on clean sources.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-04 22:28:46 -08:00
Junio C Hamano
ef67524895 Merge branch 'sp/mmap' into next
* sp/mmap: (36 commits)
  Update packedGit config option documentation.
  Documentation/config.txt (and repo-config manpage): mark-up fix.
  Teach Git how to parse standard power of 2 suffixes.
  Use /dev/null for update hook stdin.
  Redirect update hook stdout to stderr.
  Remove unnecessary argc parameter from run_command_v.
  Automatically detect a bare git repository.
  Replace "GIT_DIR" with GIT_DIR_ENVIRONMENT.
  Use PATH_MAX constant for --bare.
  Force core.filemode to false on Cygwin.
  Fix formatting for urls section of fetch, pull, and push manpages
  Fix yet another subtle xdl_merge() bug
  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.
  ...
2006-12-30 22:45:55 -08:00
Shawn O. Pearce
c869753ebb Force core.filemode to false on Cygwin.
Many users have noticed that core.filemode doesn't appear to be
automatically set right on Cygwin when using a repository stored
on NTFS.  The issue is that Cygwin and NTFS correctly supports
the executable mode bit, and Git properly detected that, but most
native Windows applications tend to create files such that Cygwin
sees the executable bit set when it probably shouldn't be.

This is especially bad if the user's favorite editor deletes the
file then recreates it whenever they save (vs. just overwriting)
as now a file that was created with mode 0644 by checkout-index
appears to have mode 0755.

So we introduce NO_TRUSTABLE_FILEMODE, settable at compile time.
Setting this option forces core.filemode to false, even if the
detection code would have returned true.  This option should be
enabled by default on Cygwin.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-30 22:21:31 -08:00
Junio C Hamano
3bd5c81e02 Merge branch 'jc/make'
* jc/make:
  gcc does not necessarily pass runtime libpath with -R
2006-12-28 16:43:27 -08:00
Junio C Hamano
b11bd57a38 Merge branch 'js/shallow'
* js/shallow:
  fetch-pack: Do not fetch tags for shallow clones.
  get_shallow_commits: Avoid memory leak if a commit has been reached already.
  git-fetch: Reset shallow_depth before auto-following tags.
  upload-pack: Check for NOT_SHALLOW flag before sending a shallow to the client.
  fetch-pack: Properly remove the shallow file when it becomes empty.
  shallow clone: unparse and reparse an unshallowed commit
  Why didn't we mark want_obj as ~UNINTERESTING in the old code?
  Why does it mean we do not have to register shallow if we have one?
  We should make sure that the protocol is still extensible.
  add tests for shallow stuff
  Shallow clone: do not ignore shallowness when following tags
  allow deepening of a shallow repository
  allow cloning a repository "shallowly"
  support fetching into a shallow repository
  upload-pack: no longer call rev-list
2006-12-28 01:25:43 -08:00
Junio C Hamano
753ab8f67c Merge branch 'jc/make' into next
* jc/make:
  gcc does not necessarily pass runtime libpath with -R
  Set NO_MMAP for Cygwin by default
  Use 'repack -a -d -l' instead of 'repack -a -d' in git-gc
  gitweb: Re-enable rev-list --parents for parse_commit.
  git-send-email: default value for "From:" field.
2006-12-27 16:44:35 -08:00
Junio C Hamano
bbfc63dd78 gcc does not necessarily pass runtime libpath with -R
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 16:44:23 -08:00
Junio C Hamano
7c20b8234a Merge branch 'sp/gc'
* sp/gc:
  Use 'repack -a -d -l' instead of 'repack -a -d' in git-gc
  everyday: replace a few 'prune' and 'repack' with 'gc'
  Create 'git gc' to perform common maintenance operations.
2006-12-27 16:43:15 -08:00
Junio C Hamano
87ac1390d9 Set NO_MMAP for Cygwin by default
This should not be necessary for people who only use NTFS, but for
people with FAT32 it seems to be an issue.  Let's ship with a safer
default.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 15:12:31 -08:00
Junio C Hamano
5d9ea53622 Merge branch 'sp/gc' into next
* sp/gc:
  everyday: replace a few 'prune' and 'repack' with 'gc'
  Create 'git gc' to perform common maintenance operations.
  git-reflog: gc.* configuration and documentation.
  rerere gc: honor configuration and document it
2006-12-27 02:45:30 -08:00
Junio C Hamano
37818d7db0 Merge branch 'master' into js/shallow
This is to adjust to:

  count-objects -v: show number of packs as well.

which will break a test in this series.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 02:43:46 -08:00
Shawn O. Pearce
30f610b7b0 Create 'git gc' to perform common maintenance operations.
Junio asked for a 'git gc' utility which users can execute on a
regular basis to perform basic repository actions such as:

 * pack-refs --prune
 * reflog expire
 * repack -a -d
 * prune
 * rerere gc

So here is a command which does exactly that.  The parameters fed
to reflog's expire subcommand can be chosen by the user by setting
configuration options in .git/config (or ~/.gitconfig), as users may
want different expiration windows for each repository but shouldn't
be bothered to remember what they are all of the time.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-27 01:53:03 -08:00
Junio C Hamano
e8b4029f99 Merge branch 'jc/fsck-reflog'
* jc/fsck-reflog:
  Add git-reflog to .gitignore
  reflog expire: do not punt on tags that point at non commits.
  reflog expire: prune commits that are not incomplete
  Don't crash during repack of a reflog with pruned commits.
  git reflog expire
  Move in_merge_bases() to commit.c
  reflog: fix warning message.
  Teach git-repack to preserve objects referred to by reflog entries.
  Protect commits recorded in reflog from pruning.
  add for_each_reflog_ent() iterator
2006-12-26 23:47:40 -08:00
Junio C Hamano
6f38e03722 Merge branch 'jc/git-add--interactive'
* jc/git-add--interactive:
  git-add --interactive: add documentation
  git-add --interactive: hunk splitting
  git-add --interactive
2006-12-25 01:31:17 -08:00
Junio C Hamano
50dae10065 Merge branch 'jc/bm' into next
* jc/bm:
  Allow branch.*.merge to talk about remote tracking branches.
  commit-tree: encourage UTF-8 commit messages.
  Switch git_mmap to use pread.
  Rename gitfakemmap to git_mmap.
  gitweb: Paginate commit/author/committer search output
  Makefile: add quick-install-doc for installing pre-built manpages

Conflicts:

	Makefile
2006-12-24 02:19:25 -08:00
Junio C Hamano
9def2138a1 Merge branch 'js/rerere'
* js/rerere:
  Make git-rerere a builtin
  Add a test for git-rerere
  move read_mmfile() into xdiff-interface
2006-12-24 02:10:55 -08:00
Johannes Schindelin
9e83266525 commit-tree: encourage UTF-8 commit messages.
Introduce is_utf() to check if a text looks like it is encoded
in UTF-8, utf8_width() to count display width, and implements
print_wrapped_text() using them.

git-commit-tree warns if the commit message does not minimally
conform to the UTF-8 encoding when i18n.commitencoding is either
unset, or set to "utf-8".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-24 00:32:49 -08:00
Eric Wong
6538d1ef31 Makefile: add quick-install-doc for installing pre-built manpages
This adds and uses the install-doc-quick.sh file to
Documentation/, which is usable for people who track either the
'html' or 'man' heads in Junio's repository (prefixed with
'origin/' if cloned locally).  You may override this by
specifying DOC_REF in the make environment or in config.mak.

GZ may also be set in the environment (or config.mak) if you
wish to gzip the documentation after installing it.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-23 09:22:30 -08:00
Junio C Hamano
fddf1d2f0c Merge branch 'sb/merge-friendly' into next
* sb/merge-friendly:
  Display 'theirs' branch name when possible in merge.
  Use extended SHA1 syntax in merge-recursive conflicts.
  gitweb: Allow search to be disabled from the config file.
  gitweb: Require a minimum of two character for the search text.
  gitweb: Use rev-list pattern search options.
  checkout: make the message about the need for a new branch a bit clearer
  gitweb: optimize git_summary.
  gitweb: optimize git_shortlog_body.
  gitweb: optimize git_get_last_activity.
  gitweb: Add missing show '...' links change.
  Make git-show-branch options similar to git-branch.
  Keep "git --git-dir" from causing a bus error.
  git-svn: enable common fetch/commit options for dcommit
  vc-git: Ignore errors caused by a non-existent directory in vc-git-registered.
  Remove NO_ACCURATE_DIFF options from build systems
  git-tag: lose exit after die
  Really fix headers for __FreeBSD__
  Do not support "partial URL shorthand" anymore.
  default pull: forget about "newbie protection" for now.
  merge and reset: adjust for "reset --hard" messages
2006-12-23 01:30:04 -08:00
Eric Wong
40f656cd02 Remove NO_ACCURATE_DIFF options from build systems
The code no longer uses it, as we have --inaccurate-eof in
git-apply.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22 23:13:28 -08:00