summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-09-13unpack-objects -r: call it "recover".Libravatar Junio C Hamano2-7/+7
The code called this operation "desperate" but the option flag is -r and the word "recover" describes what it does better. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-04unpack-objects desperately salvages objects from a corrupt packLibravatar Junio C Hamano2-22/+45
The command unpack-objects dies upon the first error. This is probably considered a feature -- if a pack is corrupt, instead of trying to extract from it and possibly risking to contaminate a good repository with objects whose validity is dubious, we should seek a good copy of the pack and retry. However, we may not have any good copy anywhere. This implements the last resort effort to extract what are salvageable from such a corrupt pack. This flag might have helped Sergio when recovering from a corrupt pack. In my test, it managed to salvage 247 objects out of a pack that had 251 objects but without it the command stopped after extracting 73 objects. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-03gitweb: Change the name of diff to parent link in "commit" view to "diffLibravatar Jakub Narebski1-1/+1
Change the name of diff to parent (current commit to one of parents) link in "commit" view (git_commit subroutine) from "commitdiff" to "diff". Let's leave "commitdiff" for equivalent of git-show, or git-diff-tree with one revision, i.e. diff for a given commit to its parent (parents). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-03Update GIT_TRACE documentation.Libravatar Christian Couder1-1/+10
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-02Merge branch 'master' into cc/traceLibravatar Junio C Hamano45-312/+972
* master: Trace into a file or an open fd and refactor tracing code. Replace uses of strdup with xstrdup. consolidate two copies of new style object header parsing code. Documentation: Fix howto/revert-branch-rebase.html generation fmt-merge-msg: fix off-by-one bug git-rev-list(1): group options; reformat; document more options Constness tightening for move/link_temp_to_file() gitweb: Fix git_blame Include config.mak.autogen in the doc Makefile Use xmalloc instead of malloc git(7): move gitk(1) to the list of porcelain commands gitk: Fix some bugs in the new cherry-picking code gitk: Improve responsiveness while reading and layout out the graph gitk: Update preceding/following tag info when creating a tag gitk: Add a menu item for cherry-picking commits gitk: Fix a couple of buglets in the branch head menu items gitk: Add a context menu for heads gitk: Add a row context-menu item for creating a new branch gitk: Recompute ancestor/descendent heads/tags when rereading refs gitk: Minor cleanups
2006-09-02Trace into a file or an open fd and refactor tracing code.Libravatar Christian Couder10-64/+229
If GIT_TRACE is set to an absolute path (starting with a '/' character), we interpret this as a file path and we trace into it. Also if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. This patch makes it possible to get trace information when running "make test". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-02Replace uses of strdup with xstrdup.Libravatar Shawn Pearce34-76/+84
Like xmalloc and xrealloc xstrdup dies with a useful message if the native strdup() implementation returns NULL rather than a valid pointer. I just tried to use xstrdup in new code and found it to be missing. However I expected it to be present as xmalloc and xrealloc are already commonly used throughout the code. [jc: removed the part that deals with last_XXX, which I am finding more and more dubious these days.] Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-01consolidate two copies of new style object header parsing code.Libravatar Junio C Hamano1-40/+45
Also while we are at it, remove redundant typename[] array from unpack_sha1_header. The only reason it is different from the type_names[] array in object.c module is that this code cares about the subset of object types that are valid in a loose object, so prepare a separate array of boolean that tells us which types are valid, and share the name translation with the others. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-01Documentation: Fix howto/revert-branch-rebase.html generationLibravatar Sergey Vlasov1-1/+1
The rule for howto/*.html used "$?", which expands to the list of all newer prerequisites, including asciidoc.conf added by another rule. "$<" should be used instead. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-01fmt-merge-msg: fix off-by-one bugLibravatar Johannes Schindelin1-1/+1
Thanks to the recent malloc()->xmalloc() change, and XMALLOC_POISON, this bug was found. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-01git-rev-list(1): group options; reformat; document more optionsLibravatar Jonas Fonseca1-66/+188
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-09-01Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-95/+587
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix some bugs in the new cherry-picking code gitk: Improve responsiveness while reading and layout out the graph gitk: Update preceding/following tag info when creating a tag gitk: Add a menu item for cherry-picking commits gitk: Fix a couple of buglets in the branch head menu items gitk: Add a context menu for heads gitk: Add a row context-menu item for creating a new branch gitk: Recompute ancestor/descendent heads/tags when rereading refs gitk: Minor cleanups
2006-09-01Constness tightening for move/link_temp_to_file()Libravatar Junio C Hamano2-3/+3
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31gitweb: Fix git_blameLibravatar Aneesh Kumar K.V1-4/+6
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31Include config.mak.autogen in the doc MakefileLibravatar Jonas Fonseca1-0/+2
... to install documentation relative to the path set with configure's --prefix option. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31Use xmalloc instead of mallocLibravatar Jonas Fonseca9-16/+16
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31git(7): move gitk(1) to the list of porcelain commandsLibravatar Jonas Fonseca1-7/+3
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31Trace into open fd and refactor tracing code.Libravatar Christian Couder10-64/+196
Now if GIT_TRACE is set to an integer value greater than 1 and lower than 10, we interpret this as an open fd value and we trace into it. Note that this behavior is not compatible with the previous one. We also trace whole messages using one write(2) call to make sure messages from processes do net get mixed up in the middle. It's now possible to run the tests like this: GIT_TRACE=9 make test 9>/var/tmp/trace.log Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31t5710: fix two thinkos.Libravatar Junio C Hamano1-0/+2
The intention of the test seems to be to build a long chain of clones that locally borrow objects from their parents and see the system give up dereferencing long chains. There were two problems: (1) it did not test the right repository; (2) it did not build a chain long enough to trigger the limitation. I do not think it is a good test to make sure the limitation the current implementation happens to have still exists, but that is a topic at a totally different level. At least this fixes the broken test. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31Merge early part of branch 'jc/daemon'Libravatar Junio C Hamano1-7/+106
2006-08-31gitweb: Extend parse_difftree_raw_line to save commit infoLibravatar Jakub Narebski1-3/+3
Extend parse_difftree_raw_line to save commit info from when git-diff-tree is given only one <tree-ish>, for example when fed from git-rev-list using --stdin option. git-diff-tree outputs a line with the commit ID when applicable. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31gitweb: Separate printing of git_tree row into git_print_tree_entryLibravatar Jakub Narebski1-44/+59
This is preparation for "tree blame" (similar to what ViewVC shows) output, i.e. for each entry give commit where it was changed. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31gitweb: Move git-ls-tree output parsing to parse_ls_tree_lineLibravatar Jakub Narebski1-19/+43
Add new subroutine parse_ls_tree_line and use it in git_tree. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31use do() instead of require() to include configurationLibravatar Dennis Stosberg1-1/+1
When run under mod_perl, require() will read and execute the configuration file on the first invocation only. On every subsequent invocation, all configuration variables will be reset to their default values. do() reads and executes the configuration file unconditionally. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-31gitweb: Remove forgotten call to git_to_hashLibravatar Dennis Stosberg1-4/+0
On Aug 27th, Jakub Narebski sent a patch which removed the git_to_hash() function and this call to it. The patch did not apply cleanly and had to be applied manually. Removing the last chunk has obviously been forgotten. See: commit 0aea33762b1262d11fb43eda9f3fc152b5622cca and message <200608272345.26722.jnareb@gmail.com> Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-30log-tree.c: cleanup a bit append_signoff()Libravatar Franck Bui-Huu1-50/+66
This patch clean up append_signoff() by moving specific code that looks up for "^[-A-Za-z]+: [^@]+@" pattern into a function. It also stops the primary search when the cursor oversteps 'buf + at' limit. This patch changes slightly append_signoff() behaviour too. If we detect any Signed-off-by pattern during the primary search, we needn't to do a pattern research after. Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-29Remove uneeded #includeLibravatar Johannes Schindelin2-2/+0
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-29Makefile: fix typoLibravatar Johannes Schindelin1-1/+1
We checked NO_SETENV instead of NO_UNSETENV to decide if unsetenv is available. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-29unpack-objects: remove unused variable "eof"Libravatar Johannes Schindelin1-3/+1
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-29git-fsck-objects: lacking default references should not be fatalLibravatar Linus Torvalds1-2/+17
The comment added says it all: if we have lost all references in a git archive, git-fsck-objects should still work, so instead of dying it should just notify the user about that condition. This change was triggered by me just doing a "git-init-db" and then populating that empty git archive with a pack/index file to look at it. Having git-fsck-objects not work just because I didn't have any references handy was rather irritating, since part of the reason for running git-fsck-objects in the first place was to _find_ the missing references. However, "--unreachable" really doesn't make sense in that situation, and we want to turn it off to protect anybody who uses the old "git prune" shell-script (rather than the modern built-in). The old pruning script used to remove all objects that were reported as unreachable, and without any refs, that obviously means everything - not worth it. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-29Check if pack directory exists prior to descending into itLibravatar Matthias Kestenholz1-1/+1
This fixes the following warning: git-repack: line 42: cd: .git/objects/pack: No such file or directory This happens only, when git-repack -a is run without any packs in the repository. Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Add local time and timezone to git_print_authorshipLibravatar Jakub Narebski1-2/+10
Add local time (hours and minutes) and local timezone to the output of git_print_authorship command, used by git_commitdiff. The code was taken from git_commit subroutine. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Add diff tree, with links to patches, to commitdiff viewLibravatar Jakub Narebski1-22/+49
Added/uncommented git_difftree_body invocation in git_commitdiff. Added anchors (via 'id' attribute) to patches in patchset. git_difftree_body is modified to link to patch anchor when called from git_commitdiff, instead of link to blobdiff. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: git_print_log: signoff line is non-empty lineLibravatar Jakub Narebski1-0/+1
This correct minor error in git_print_log that didn't add final empty line when requested, if commit log ended with signoff. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Add author information to commitdiff viewLibravatar Jakub Narebski2-0/+18
Add subroutine git_print_authorship to print author and date of commit, div.author_date style to CSS, and use them in git_commitdiff. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Do not remove signoff lines in git_print_simplified_logLibravatar Jakub Narebski1-1/+0
Remove '-remove_signoff => 1' option to git_print_log call in the git_print_simplified_log subroutine. This means that in "log" and "commitdiff" views (git_log and git_commitdiff subroutines) signoff lines will be shown. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Make git_print_log generic; git_print_simplified_log uses itLibravatar Jakub Narebski1-32/+31
Collapse git_print_log and git_print_simplified_log into one subroutine git_print_log. git_print_simplified_log now simply calls git_print_log with proper options. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28gitweb: Use --git-dir parameter instead of setting $ENV{'GIT_DIR'}Libravatar Dennis Stosberg1-36/+54
This makes it possible to run gitweb under mod_perl's Apache::Registry. It needs a fairly new git version, with --git-dir=<path> parameter to git wrapper, i.e. post v1.4.2-rc2-g6acbcb9 version. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28Add --relative-date option to the revision interfaceLibravatar Jonas Fonseca8-11/+31
Exposes the infrastructure from 9a8e35e98793af086f05d1ca9643052df9b44a74. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-28Merge branch 'gl/web'Libravatar Junio C Hamano2-504/+1039
* gl/web: (46 commits) gitweb: Use @diff_opts, default ('M'), as git-diff and git-diff-tree paramete gitweb: Remove git_to_hash function gitweb: Remove unused git_get_{preceding,following}_references gitweb: Fix typo in git_patchset_body gitweb: Fix typo in git_difftree_body gitweb: blobs defined by non-textual hash ids can be cached gitweb: Improve comments about gitweb features configuration gitweb: Remove workaround for git-diff bug fixed in f82cd3c gitweb: Remove creating directory for temporary files gitweb: Remove git_diff_print subroutine gitweb: git_blobdiff_plain is git_blobdiff('plain') gitweb: Use git-diff-tree or git-diff patch output for blobdiff gitweb: Change here-doc back for style consistency in git_blobdiff gitweb: Always display link to blobdiff_plain in git_blobdiff gitweb: Add invisible hyperlink to from-file/to-file diff header gitweb: Parse two-line from-file/to-file diff header in git_patchset_body gitweb: Allow for pre-parsed difftree info in git_patchset_body gitweb: Add support for hash_parent_base parameter for blobdiffs gitweb: Use git_get_name_rev_tags for commitdiff_plain X-Git-Tag: header gitweb: Add git_get_rev_name_tags function ...
2006-08-28gitk: Fix some bugs in the new cherry-picking codeLibravatar Paul Mackerras1-2/+6
When inserting the new commit row for the cherry-picked commit, we weren't advancing the selected line (if there is one), and we weren't updating commitlisted properly.
2006-08-27daemon: prepare for multiple services.Libravatar Junio C Hamano1-7/+106
This adds an infrastructure to selectively enable and disable more than one services in git-daemon. Currently upload-pack service, which serves the git-fetch-pack and git-peek-remote clients, is the only service that is defined. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-27Add git-zip-tree to .gitignoreLibravatar Rene Scharfe1-0/+1
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-27free(NULL) is perfectly valid.Libravatar Junio C Hamano10-44/+21
Jonas noticed some places say "if (X) free(X)" which is totally unnecessary. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-27Use xcalloc instead of callocLibravatar Jonas Fonseca2-2/+2
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-27Use fstat instead of fseekLibravatar Jonas Fonseca1-5/+3
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-08-27Merge branch 'gl/cleanup-next'Libravatar Junio C Hamano1-16/+14
* gl/cleanup-next: hashcpy/hashcmp remaining bits. Convert memcpy(a,b,20) to hashcpy(a,b).
2006-08-27Merge branch 'js/c-merge-recursive'Libravatar Junio C Hamano7-5/+1406
* js/c-merge-recursive: (21 commits) discard_cache(): discard index, even if no file was mmap()ed merge-recur: do not die unnecessarily merge-recur: try to merge older merge bases first merge-recur: if there is no common ancestor, fake empty one merge-recur: do not setenv("GIT_INDEX_FILE") merge-recur: do not call git-write-tree merge-recursive: fix rename handling .gitignore: git-merge-recur is a built file. merge-recur: virtual commits shall never be parsed merge-recur: use the unpack_trees() interface instead of exec()ing read-tree merge-recur: fix thinko in unique_path() Makefile: git-merge-recur depends on xdiff libraries. merge-recur: Explain why sha_eq() and struct stage_data cannot go merge-recur: Cleanup last mixedCase variables... merge-recur: Fix compiler warning with -pedantic merge-recur: Remove dead code merge-recur: Get rid of debug code merge-recur: Convert variable names to lower_case Cumulative update of merge-recursive in C recur vs recursive: help testing without touching too many stuff. ... This is an evil merge that removes TEST script from the toplevel.
2006-08-27Merge branch 'ts/daemon'Libravatar Junio C Hamano2-5/+58
* ts/daemon: Added support for dropping privileges to git-daemon.
2006-08-27Merge branch 'jc/apply'Libravatar Junio C Hamano5-33/+363
* jc/apply: git-apply --reject: finishing touches. apply --reject: count hunks starting from 1, not 0 git-apply --verbose git-apply --reject: send rejects to .rej files. git-apply --reject apply --reverse: tie it all together. diff.c: make binary patch reversible. builtin-apply --reverse: two bugfixes.