summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-12-24commit-tree: encourage UTF-8 commit messages.Libravatar Johannes Schindelin4-4/+303
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-24Switch git_mmap to use pread.Libravatar Shawn O. Pearce1-14/+5
Now that Git depends on pread in index-pack its safe to say we can also depend on it within the git_mmap emulation we activate when NO_MMAP is set. On most systems pread should be slightly faster than an lseek/read/lseek sequence as its one system call vs. three system calls. We also now honor EAGAIN and EINTR error codes from pread and restart the prior read. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-24Rename gitfakemmap to git_mmap.Libravatar Shawn O. Pearce2-7/+7
This minor cleanup was suggested by Johannes Schindelin. The mmap is still fake in the sense that we don't support PROT_WRITE or MAP_SHARED with external modification at all, but that hasn't stopped us from using mmap() thoughout the Git code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-23gitweb: Paginate commit/author/committer search outputLibravatar Robert Fitzsimons1-45/+103
Paginate commit/author/committer search output to only show 100 commits at a time, added appropriate nav links. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-23Makefile: add quick-install-doc for installing pre-built manpagesLibravatar Eric Wong3-0/+37
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-22gitweb: Allow search to be disabled from the config file.Libravatar Robert Fitzsimons1-0/+13
Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: Require a minimum of two character for the search text.Libravatar Robert Fitzsimons1-0/+3
Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: Use rev-list pattern search options.Libravatar Robert Fitzsimons1-10/+10
Use rev-list pattern search options instead of hand coded perl. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22checkout: make the message about the need for a new branch a bit clearerLibravatar Nicolas Pitre1-2/+5
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: optimize git_summary.Libravatar Robert Fitzsimons1-3/+3
We don't need to call git_get_head_hash at all just pass in "HEAD" and use the return id field. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: optimize git_shortlog_body.Libravatar Robert Fitzsimons1-1/+3
Don't call gitweb_have_snapshot from within the loop. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: optimize git_get_last_activity.Libravatar Robert Fitzsimons1-1/+2
Only return one line of output and we don't need the refname value. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22gitweb: Add missing show '...' links change.Libravatar Robert Fitzsimons1-0/+1
Part of the patch for "gitweb: Show '...' links in "summary" view only if there are more items" (313ce8cee665447e4476d7e8985b270346a8e5a1) is missing. Add it back in. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Make git-show-branch options similar to git-branch.Libravatar Brian Gernhardt2-18/+32
Branch has "-r" for remote branches and "-a" for local and remote. It seems logical to mirror that in show-branch. Also removes the dubiously useful "--tags" option (as part of changing the meaning for "--all"). Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Keep "git --git-dir" from causing a bus error.Libravatar Brian Gernhardt1-2/+4
The option checking code for --git-dir had an off by 1 error that would cause it to access uninitialized memory if it was the last argument. This causes it to display an error and display the usage string instead. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22git-svn: enable common fetch/commit options for dcommitLibravatar Eric Wong1-1/+1
dcommit does commits and fetches, so all options used for those should work, too, including --authors-file. Reported missing by Nicolas Vilz. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22vc-git: Ignore errors caused by a non-existent directory in vc-git-registered.Libravatar Alexandre Julliard1-2/+3
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Remove NO_ACCURATE_DIFF options from build systemsLibravatar Eric Wong2-9/+0
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-22git-tag: lose exit after dieLibravatar Junio C Hamano1-2/+0
We are not running under /bin/resurrection shell ;-) Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Really fix headers for __FreeBSD__Libravatar Junio C Hamano1-1/+1
The symbol to detect FreeBSD is __FreeBSD__, not __FreeBSD. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22Do not support "partial URL shorthand" anymore.Libravatar Junio C Hamano1-27/+7
We used to support specifying the top part of remote URL in remotes and use that as a short-hand for the URL. $ cat .git/remotes/jgarzik URL: git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/ $ git pull jgarzik/misc-2.6 This is confusing when somebody attempts to do this: $ git pull origin/foo which is not syntactically correct (unless you have origin/foo.git repository) and should fail, but it resulted in a mysterious access to the 'foo' subdirectory of the origin repository. Which was what it was designed to do, but because this is an oddball "feature" I suspect nobody uses, let's remove it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22default pull: forget about "newbie protection" for now.Libravatar Junio C Hamano1-7/+0
This will not be backward compatible no matter how you cut it. Shelve it for now until somebody comes up with a better way to determine when we can safely refuse to use the first set of branchse for merging without upsetting valid workflows. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-22merge and reset: adjust for "reset --hard" messagesLibravatar Junio C Hamano2-1/+2
An earlier commit made "reset --hard" chattier but leaking its message from "git rebase" (which calls it when first rewinding the current branch to prepare replaying our own changes) without explanation was confusing, so add an extra message to mention it. Inside restorestate in merge (which is rarely exercised codepath, where more than one strategies are attempted), resetting to the original state uses "reset --hard" -- this can be squelched entirely. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21commit-tree: do not overflow MAXPARENTLibravatar Junio C Hamano1-0/+3
We have a static allocation of MAXPARENT, but that limit was not enforced, other than by a lucky invocation of the program segfaulting. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Introduce a global level warn() function.Libravatar Shawn O. Pearce2-0/+21
Like the existing error() function the new warn() function can be used to describe a situation that probably should not be occuring, but which the user (and Git) can continue to work around without running into too many problems. An example situation is a bad commit SHA1 found in a reflog. Attempting to read this record out of the reflog isn't really an error as we have skipped over it in the past. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Rename imap-send's internal info/warn functions.Libravatar Shawn O. Pearce1-12/+12
Because I am about to introduce a global warn() function (much like the global error function) this global declaration would conflict with the one supplied by imap-send. Further since imap-send's warn function output depends on its Quiet setting we cannot simply remove its internal definition and use the forthcoming global one. So refactor warn() -> imap_warn() and info() -> imap_info() (the latter was done just to be consistent in naming). Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21_XOPEN_SOURCE problem also exists on FreeBSDLibravatar Junio C Hamano1-1/+1
Suggested by Rocco Rutte, Marco Roeland and others. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21parse-remote: mark all refs not for merge only when fetching more than oneLibravatar Junio C Hamano1-2/+9
An earlier commit a71fb0a1 implemented much requested safety valve to refuse "git pull" or "git pull origin" without explicit refspecs from using the first set of remote refs obtained by reading .git/remotes/origin file or branch.*.fetch configuration variables to create a merge. The argument was that while on a branch different from the default branch, it is often wrong to merge the default remote ref suitable for merging into the master. That is fine as a theory. But many repositories already in use by people in the real world do not have any of the per branch configuration crap. They did not need it, and they do not need it now. Merging with the first remote ref listed was just fine, because they had only one ref (e.g. 'master' from linux-2.6.git) anyway. So this changes the safety valve to be a lot looser. When "git fetch" gets only one remote branch, the irritating warning would not trigger anymore. I think we could also make the warning trigger when branch.*.merge is not specified for the current branch, but is for some other branch. That is for another commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Merge branch 'maint'Libravatar Junio C Hamano1-2/+2
* maint: diff --check: fix off by one error spurious .sp in manpages
2006-12-21git-reset --hard: tell the user what the HEAD was reset toLibravatar Johannes Schindelin1-1/+6
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21git-tag: support -F <file> optionLibravatar Johannes Schindelin2-1/+16
This imitates the behaviour of git-commit. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Revert "git-pull: refuse default merge without branch.*.merge"Libravatar Junio C Hamano1-2/+1
This reverts commit a71fb0a1412c82405f078fb536797d3f5de68d53. The logic to decide when to refuse to use the default "first set of refs fetched" for merge was utterly bogus. In a repository that happily worked correctly without any of the per-branch configuration crap did not have (and did not have to have) any branch.<current>.merge. With that broken commit, pulling from origin no longer would work.
2006-12-21Suggest 'add' in am/revert/cherry-pick.Libravatar Shawn O. Pearce2-3/+3
Now that we have decided to make 'add' behave like 'update-index' (and therefore fully classify update-index as strictly plumbing) the am/revert/cherry-pick family of commands should not steer the user towards update-index. Instead send them to the command they probably already know, 'add'. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21Use git-merge-file in git-merge-one-file, tooLibravatar Johannes Schindelin1-1/+1
Would you believe? I edited git-merge-one-file (note the missing ".sh"!) when I submitted the patch which became commit e2b7008752... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21diff --check: fix off by one errorLibravatar Johannes Schindelin1-2/+2
When parsing the diff line starting with '@@', the line number of the '+' file is parsed. For the subsequent line parses, the line number should therefore be incremented after the parse, not before it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Documentation/git-branch: new -r to delete remote-tracking branches.Libravatar Quy Tonthat1-5/+8
Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Fix system header problems on Mac OS XLibravatar Terje Sten Bjerkseth1-0/+2
For Mac OS X 10.4, _XOPEN_SOURCE defines _POSIX_C_SOURCE which hides many symbols from the program. Breakage noticed and initial analysis provided by Randal L. Schwartz. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Merge branch 'ew/svn-pm'Libravatar Junio C Hamano10-1087/+198
* ew/svn-pm: git-svn: rename 'commit' command to 'set-tree' git-svn: remove support for the svn command-line client git-svn: convert to using Git.pm
2006-12-20diff documentation: mostly talk about <commit>Libravatar Junio C Hamano1-2/+2
This corrects minor remaining bits that still talked about <tree-ish>; the Porcelain users (as opposed to plumbers) are mostly interested in commits so use <commit> consistently and keep a sentence that mentions that <tree-ish> can be used in place of them.
2006-12-20Merge branch 'jc/leftright'Libravatar Junio C Hamano5-10/+43
* jc/leftright: Revert "Make left-right automatic." Make left-right automatic. Teach all of log family --left-right output. rev-list --left-right
2006-12-20Merge branch 'jc/blame'Libravatar Junio C Hamano1-2/+31
* jc/blame: blame: -b (blame.blankboundary) and --root (blame.showroot)
2006-12-20Merge branch 'jc/branch-remove-remote'Libravatar Junio C Hamano1-26/+62
* jc/branch-remove-remote: git-branch -d: do not stop at the first failure. Teach git-branch to delete tracking branches with -r -d
2006-12-20Merge branch 'jc/clone'Libravatar Junio C Hamano13-85/+52
* jc/clone: Move "no merge candidate" warning into git-pull Use preprocessor constants for environment variable names. Do not create $GIT_DIR/remotes/ directory anymore. Introduce GIT_TEMPLATE_DIR Revert "fix testsuite: make sure they use templates freshly built from the source" fix testsuite: make sure they use templates freshly built from the source git-clone: lose the traditional 'no-separate-remote' layout git-clone: lose the artificial "first" fetch refspec git-pull: refuse default merge without branch.*.merge git-clone: use wildcard specification for tracking branches
2006-12-20compat/inet_ntop: do not use u_intLibravatar Junio C Hamano1-1/+1
It is pointless. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20spurious .sp in manpagesLibravatar Junio C Hamano1-0/+14
This cherry-picks 7ef04350 that has been applied to the 'master' to fix ".sp" in generated manpages. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20git-add: error out when given no arguments.Libravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Merge branch 'maint'Libravatar Junio C Hamano1-1/+1
* maint: GIT 1.4.4.3
2006-12-20GIT 1.4.4.3Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20clarify some error messages wrt unknown object typesLibravatar Nicolas Pitre2-3/+3
If ever new object types are added for future extensions then better have current git version report them as "unknown" instead of "corrupted". Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20simplify inclusion of system header files.Libravatar Junio C Hamano72-201/+42
This is a mechanical clean-up of the way *.c files include system header files. (1) sources under compat/, platform sha-1 implementations, and xdelta code are exempt from the following rules; (2) the first #include must be "git-compat-util.h" or one of our own header file that includes it first (e.g. config.h, builtin.h, pkt-line.h); (3) system headers that are included in "git-compat-util.h" need not be included in individual C source files. (4) "git-compat-util.h" does not have to include subsystem specific header files (e.g. expat.h). Signed-off-by: Junio C Hamano <junkio@cox.net>