summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2006-12-31Force core.filemode to false on Cygwin.Shawn O. Pearce
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-29Merge branch 'jc/make'Junio C Hamano
* jc/make: gcc does not necessarily pass runtime libpath with -R
2006-12-28Merge branch 'js/shallow'Junio C Hamano
* 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-28gcc does not necessarily pass runtime libpath with -RJunio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-28Merge branch 'sp/gc'Junio C Hamano
* 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-27Set NO_MMAP for Cygwin by defaultJunio C Hamano
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-27Merge branch 'master' into js/shallowJunio C Hamano
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-27Create 'git gc' to perform common maintenance operations.Shawn O. Pearce
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-27Merge branch 'jc/fsck-reflog'Junio C Hamano
* 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-25Merge branch 'jc/git-add--interactive'Junio C Hamano
* jc/git-add--interactive: git-add --interactive: add documentation git-add --interactive: hunk splitting git-add --interactive
2006-12-24Merge branch 'js/rerere'Junio C Hamano
* js/rerere: Make git-rerere a builtin Add a test for git-rerere move read_mmfile() into xdiff-interface
2006-12-24commit-tree: encourage UTF-8 commit messages.Johannes Schindelin
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-23Makefile: add quick-install-doc for installing pre-built manpagesEric Wong
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-23Remove NO_ACCURATE_DIFF options from build systemsEric Wong
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-22Make git-rerere a builtinJohannes Schindelin
The perl version used modules which are non-standard in some setups. This patch brings the full power of rerere to a wider audience. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-21git reflog expireJunio C Hamano
This prepares a place to collect reflog management subcommands, and implements "expire" action. $ git reflog expire --dry-run \ --expire=4.weeks \ --expire-unreachable=1.week \ refs/heads/master The expiration uses two timestamps: --expire and --expire-unreachable. Entries older than expire time (defaults to 90 days), and entries older than expire-unreachable time (defaults to 30 days) and records a commit that has been rewound and made unreachable from the current tip of the ref are removed from the reflog. The parameter handling is still rough, but I think the core logic for expiration is already sound. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20Remove COLLISION_CHECK from Makefile since it's not used.Brian Gernhardt
It's rather misleading to have configuration options that don't do anything. If someone adds collision checking they might also want to restore this option. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-19git-add --interactiveJunio C Hamano
A script to be driven when the user says "git add --interactive" is introduced. When it is run, first it runs its internal 'status' command to show the current status, and then goes into its internactive command loop. The command loop shows the list of subcommands available, and gives a prompt "What now> ". In general, when the prompt ends with a single '>', you can pick only one of the choices given and type return, like this: *** Commands *** 1: status 2: update 3: revert 4: add untracked 5: patch 6: diff 7: quit 8: help What now> 1 You also could say "s" or "sta" or "status" above as long as the choice is unique. The main command loop has 6 subcommands (plus help and quit). * 'status' shows the change between HEAD and index (i.e. what will be committed if you say "git commit"), and between index and working tree files (i.e. what you could stage further before "git commit" using "git-add") for each path. A sample output looks like this: staged unstaged path 1: binary nothing foo.png 2: +403/-35 +1/-1 git-add--interactive.perl It shows that foo.png has differences from HEAD (but that is binary so line count cannot be shown) and there is no difference between indexed copy and the working tree version (if the working tree version were also different, 'binary' would have been shown in place of 'nothing'). The other file, git-add--interactive.perl, has 403 lines added and 35 lines deleted if you commit what is in the index, but working tree file has further modifications (one addition and one deletion). * 'update' shows the status information and gives prompt "Update>>". When the prompt ends with double '>>', you can make more than one selection, concatenated with whitespace or comma. Also you can say ranges. E.g. "2-5 7,9" to choose 2,3,4,5,7,9 from the list. You can say '*' to choose everything. What you chose are then highlighted with '*', like this: staged unstaged path 1: binary nothing foo.png * 2: +403/-35 +1/-1 git-add--interactive.perl To remove selection, prefix the input with - like this: Update>> -2 After making the selection, answer with an empty line to stage the contents of working tree files for selected paths in the index. * 'revert' has a very similar UI to 'update', and the staged information for selected paths are reverted to that of the HEAD version. Reverting new paths makes them untracked. * 'add untracked' has a very similar UI to 'update' and 'revert', and lets you add untracked paths to the index. * 'patch' lets you choose one path out of 'status' like selection. After choosing the path, it presents diff between the index and the working tree file and asks you if you want to stage the change of each hunk. You can say: y - add the change from that hunk to index n - do not add the change from that hunk to index a - add the change from that hunk and all the rest to index d - do not the change from that hunk nor any of the rest to index j - do not decide on this hunk now, and view the next undecided hunk J - do not decide on this hunk now, and view the next hunk k - do not decide on this hunk now, and view the previous undecided hunk K - do not decide on this hunk now, and view the previous hunk After deciding the fate for all hunks, if there is any hunk that was chosen, the index is updated with the selected hunks. * 'diff' lets you review what will be committed (i.e. between HEAD and index). This is still rough, but does everything except a few things I think are needed. * 'patch' should be able to allow splitting a hunk into multiple hunks. * 'patch' does not adjust the line offsets @@ -k,l +m,n @@ in the hunk header. This does not have major problem in practice, but it _should_ do the adjustment. * It does not have any explicit support for a merge in progress; it may not work at all. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-18make patch_delta() error cases a bit more verboseNicolas Pitre
It is especially important to distinguish between a malloc() failure from all the other cases. An out of memory condition is much less worrisome than a compatibility/corruption problem. Also make test-delta compilable again. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16Export PERL_PATHLuben Tuikov
PERL_PATH is used by perl/Makefile so export it. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-16Avoid accessing a slow working copy during diffcore operations.Shawn O. Pearce
The Cygwin folks have done a fine job at creating a POSIX layer on Windows That Just Works(tm). However it comes with a penalty; accessing files in the working tree by way of stat/open/mmap can be slower for diffcore than inflating the data from a blob which is stored in a packfile. This performance problem is especially an issue in merge-recursive when dealing with nearly 7000 added files, as we are loading each file's content from the working directory to perform rename detection. I have literally seen (and sadly watched) paint dry in less time than it takes for merge-recursive to finish such a merge. On the other hand this very same merge runs very fast on Solaris. If Git is compiled with NO_FAST_WORKING_DIRECTORY set then we will avoid looking at the working directory when the blob in question is available within a packfile and the caller doesn't need the data unpacked into a temporary file. We don't use loose objects as they have the same open/mmap/close costs as the working directory file access, but have the additional CPU overhead of needing to inflate the content before use. So it is still faster to use the working tree file over the loose object. If the caller needs the file data unpacked into a temporary file its likely because they are going to call an external diff program, passing the file as a parameter. In this case reusing the working tree file will be faster as we don't need to inflate the data and write it out to a temporary file. The NO_FAST_WORKING_DIRECTORY feature is enabled by default on Cygwin, as that is the platform which currently appears to benefit the most from this option. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-13Merge branch 'master' into js/mergeJunio C Hamano
* master: (42 commits) git-svn: correctly handle packed-refs in refs/remotes/ add test case for recursive merge git-svn: correctly display fatal() error messages git-svn: allow dcommit to take an alternate head git-svn: enable logging of information not supported by git Clarify fetch error for missing objects. Move Fink and Ports check to after config file shortlog: fix segfault on empty authorname shortlog: remove "[PATCH]" prefix from shortlog output Make sure the empty tree exists when needed in merge-recursive. Don't use memcpy when source and dest. buffers may overlap no need to install manpages as executable Documentation: simpler shared repository creation shortlog: fix segfault on empty authorname Add branch.*.merge warning and documentation update Fix perl/ build. git-svn: use do_switch for --follow-parent if the SVN library supports it Fix documentation copy&paste typo git-svn: extra error check to ensure we open a file correctly Documentation: update git-clone man page with new behavior ...
2006-12-13Merge branch 'maint'Junio C Hamano
* maint: Clarify fetch error for missing objects. Move Fink and Ports check to after config file Conflicts: Makefile
2006-12-12Move Fink and Ports check to after config fileBrian Gernhardt
Putting NO_FINK or NO_DARWIN_PORTS in config.mak is ignored because the checks are done before the config is included. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-06Add builtin merge-file, a minimal replacement for RCS mergeJohannes Schindelin
merge-file has the same syntax as RCS merge, but supports only the "-L" option. For good measure, a test is added, which is quite minimal, though. [jc: further fix for compliation errors included.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-04Make perl/ build procedure ActiveState friendly.Alex Riesen
On Cygwin + ActivateState Perl, Makefile generated with MakeMaker is not usable because of line-endings and back-slashes. This teaches perl/Makefile to write a handcrafted equivalent perl.mak file with 'make NO_PERL_MAKEMAKER=NoThanks'. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-03xdiff: add xdl_merge()Johannes Schindelin
This new function implements the functionality of RCS merge, but in-memory. It returns < 0 on error, otherwise the number of conflicts. Finding the conflicting lines can be a very expensive task. You can control the eagerness of this algorithm: - a level value of 0 means that all overlapping changes are treated as conflicts, - a value of 1 means that if the overlapping changes are identical, it is not treated as a conflict. - If you set level to 2, overlapping changes will be analyzed, so that almost identical changes will not result in huge conflicts. Rather, only the conflicting lines will be shown inside conflict markers. With each increasing level, the algorithm gets slower, but more accurate. Note that the code for level 2 depends on the simple definition of mmfile_t specific to git, and therefore it will be harder to port that to LibXDiff. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-27Merge branch 'js/shortlog'Junio C Hamano
* js/shortlog: git-shortlog: make common repository prefix configurable with .mailmap git-shortlog: fix common repository prefix abbreviation. builtin git-shortlog is broken shortlog: fix "-n" shortlog: handle email addresses case-insensitively shortlog: read mailmap from ./.mailmap again shortlog: do not crash on parsing "[PATCH" Build in shortlog
2006-11-24support fetching into a shallow repositoryJohannes Schindelin
A shallow commit is a commit which has parents, which in turn are "grafted away", i.e. the commit appears as if it were a root. Since these shallow commits should not be edited by the user, but only by core git, they are recorded in the file $GIT_DIR/shallow. A repository containing shallow commits is called shallow. The advantage of a shallow repository is that even if the upstream contains lots of history, your local (shallow) repository needs not occupy much disk space. The disadvantage is that you might miss a merge base when pulling some remote branch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-22remove merge-recursive-oldJunio C Hamano
This frees the Porcelain-ish that comes with the core Python-free. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-20Build in shortlogJohannes Schindelin
[jc: with minimum squelching of compiler warning under "-pedantic" compilation options.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-09git-pickaxe: retire pickaxeJunio C Hamano
Just make it take over blame's place. Documentation and command have all stopped mentioning "git-pickaxe". The built-in synonym is left in the command table, so you can still say "git pickaxe", but it probably is a good idea to retire it as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-08Merge branch 'jc/pickaxe'Junio C Hamano
2006-11-07Merge branch 'np/index-pack'Junio C Hamano
* np/index-pack: remove .keep pack lock files when done with refs update have index-pack create .keep file more carefully improve fetch-pack's handling of kept packs git-fetch can use both --thin and --keep with fetch-pack now Teach receive-pack how to keep pack files based on object count. Allow pack header preprocessing before unpack-objects/index-pack. Remove unused variable in receive-pack. Revert "send-pack --keep: do not explode into loose objects on the receiving end." missing small substitution Teach git-index-pack how to keep a pack file. Only repack active packs by skipping over kept packs. Allow short pack names to git-pack-objects --unpacked=. send-pack --keep: do not explode into loose objects on the receiving end. index-pack: minor fixes to comment and function name enhance clone and fetch -k experience mimic unpack-objects when --stdin is used with index-pack add progress status to index-pack make index-pack able to complete thin packs. enable index-pack streaming capability
2006-11-05cherry is built-in, do not ship git-cherry.shJunio C Hamano
Noticed by Rene; Makefile now has another maintainer's check target to catch this kind of mistakes. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-05Merge branch 'maint'Junio C Hamano
* maint: Remove unsupported C99 style struct initializers in git-archive. Remove SIMPLE_PROGRAMS and make git-daemon a normal program. Use ULONG_MAX rather than implicit cast of -1.
2006-11-05Remove SIMPLE_PROGRAMS and make git-daemon a normal program.Shawn O. Pearce
Some platforms (Solaris in particular) appear to require -lz as part of the link line for git-daemon, due to it linking against sha1_file.o and that module requiring inflate/deflate support. So its time to retire SIMPLE_PROGRAMS and move its last remaining member into the standard PROGRAMS list, allowing it to link against all libraries used by the rest of Git. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-03improve fetch-pack's handling of kept packsNicolas Pitre
Since functions in fetch-clone.c were only used from fetch-pack.c, its content has been merged with fetch-pack.c. This allows for better coupling of features with much simpler implementations. One new thing is that the (abscence of) --thin also enforce it on index-pack now, such that index-pack will abort if a thin pack was _not_ asked for. The -k or --keep, when provided twice, now causes the fetched pack to be left as a kept pack just like receive-pack currently does. Eventually this will be used to close a race against concurrent repacking. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-11-01Merge branch 'rs/cherry'Junio C Hamano
* rs/cherry: Make git-cherry handle root trees Built-in cherry
2006-11-01Merge branch 'lj/refs'Junio C Hamano
* lj/refs: (63 commits) Fix show-ref usagestring t3200: git-branch testsuite update sha1_name.c: avoid compilation warnings. Make git-branch a builtin ref-log: fix D/F conflict coming from deleted refs. git-revert with conflicts to behave as git-merge with conflicts core.logallrefupdates thinko-fix git-pack-refs --all core.logallrefupdates create new log file only for branch heads. Remove bashism from t3210-pack-refs.sh ref-log: allow ref@{count} syntax. pack-refs: call fflush before fsync. pack-refs: use lockfile as everybody else does. git-fetch: do not look into $GIT_DIR/refs to see if a tag exists. lock_ref_sha1_basic does not remove empty directories on BSD Do not create tag leading directories since git update-ref does it. Check that a tag exists using show-ref instead of looking for the ref file. Use git-update-ref to delete a tag instead of rm()ing the ref file. Fix refs.c;:repack_without_ref() clean-up path Clean up "git-branch.sh" and add remove recursive dir test cases. ...
2006-10-25Merge for-each-ref to sync gitweb fully with 'next'Junio C Hamano
2006-10-25Merge branch 'jc/web-blame'Junio C Hamano
* jc/web-blame: gitweb: spell "blame --porcelain" with -p blame: Document and add help text for -f, -n, and -p gitweb: blame porcelain: lineno and orig lineno swapped Remove git-annotate.perl and create a builtin-alias for git-blame gitweb: use blame --porcelain git-blame --porcelain blame.c: move code to output metainfo into a separate function. git-blame: --show-number (and -n) git-blame: --show-name (and -f) blame.c: whitespace and formatting clean-up. Gitweb - provide site headers and footers gitweb: blame: Mouse-over commit-8 shows author and date gitweb: blame: print commit-8 on the leading row of a commit-block Revert 954a6183756a073723a7c9fd8d2feb13132876b0 gitweb: prepare for repositories with packed refs. gitweb: make leftmost column of blame less cluttered.
2006-10-24Make git-branch a builtinLars Hjemli
This replaces git-branch.sh with builtin-branch.c The changes is basically a patch from Kristian Høgsberg, updated to apply onto current 'next' Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-24Built-in cherryRene Scharfe
This replaces the shell script git-cherry with a version written in C. The behaviour of the new version differs from the original in two points: it has no long help any more, and it is handling the (optional) third parameter a bit differently. Basically, it does the equivalent of ours=`git-rev-list $ours ^$limit ^$upstream` instead of ours=`git-rev-list $ours ^$limit` Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-20git-pickaxe: blame rewritten.Junio C Hamano
Currently it does what git-blame does, but only faster. More importantly, its internal structure is designed to support content movement (aka cut-and-paste) more easily by allowing more than one paths to be taken from the same commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-17add proper dependancies on the xdiff sourceAndy Whitcroft
We are not rebuilding the xdiff library when its header files change. Add dependancies for those to the main Makefile. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Ryan Anderson <ryan@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-12Merge branch 'jc/blame' into jc/web-blameJunio C Hamano
* jc/blame: blame: Document and add help text for -f, -n, and -p Remove git-annotate.perl and create a builtin-alias for git-blame
2006-10-10Remove git-annotate.perl and create a builtin-alias for git-blameRyan Anderson
Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-10-06Merge branch 'jc/blame' into jc/web-blameJunio C Hamano
* jc/blame: git-blame --porcelain blame.c: move code to output metainfo into a separate function. git-blame: --show-number (and -n) git-blame: --show-name (and -f) blame.c: whitespace and formatting clean-up. gitweb: Make the Git logo link target to point to the homepage gitweb: blame: Minimize vertical table row padding gitweb: Do not print "log" and "shortlog" redundantly in commit view vc-git.el: Switch to using git-blame instead of git-annotate. git.el: Fixed inverted "renamed from/to" message. tar-tree deprecation: we eat our own dog food. Add git-upload-archive to the main git man page git-commit: cleanup unused function. Fix usage string to match that given in the man page Update the gitweb/README file to include setting the GITWEB_CONFIG environment Conflicts: gitweb/gitweb.perl
2006-10-05tar-tree deprecation: we eat our own dog food.Junio C Hamano
It is silly to keep using git-tar-tree in dist target when the command gives a big deprecation warning when called. Instead, use "git-archive --format=tar" which we recommend to our users. Update gitweb's snapshot feature to use git-archive for the same reason. Signed-off-by: Junio C Hamano <junkio@cox.net>