summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-09-18Add post-merge hook, related documentation, and tests.Libravatar Josh England3-0/+81
The post-merge hook enables one to hook in for `git pull` operations in order to check and/or change attributes of a work tree from the hook. As an example, it can be used in combination with a pre-commit hook to save/restore file ownership and permissions data (or file ACLs) within the repository and transparently update the working tree after a `git pull` operation. Signed-off-by: Josh England <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18Merge branch 'maint'Libravatar Junio C Hamano8-17/+31
* maint: Fixed update-hook example allow-users format. Documentation/git-svn: updated design philosophy notes t/t4014: test "am -3" with mode-only change. Fix lapsus in builtin-apply.c git-push: documentation and tests for pushing only branches git-svnimport: Use separate arguments in the pipe for git-rev-parse
2007-09-18Fixed update-hook example allow-users format.Libravatar Väinö Järvelä1-4/+4
The example provided with the update-hook-example does not work on either bash 2.05b.0(1)-release nor 3.1.17(1)-release. The matcher did not match the lines that it advertised to match, such as: refs/heads/bw/ linus refs/heads/tmp/* * In POSIX 1003.2 regular expressions, the star (*), is not an wildcard meaning "match everything", it matches 0 or more matches of the atom preceding it. So to match "refs/heads/bw/topic-branch", the matcher should be written as "refs/heads/bw/.*" to match "refs/heads/bw/" and everything after it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18Documentation/git-svn: updated design philosophy notesLibravatar Eric Wong1-5/+6
This section has not been updated in a while and --branches/--tags/--trunk options are commonly used nowadays. Noticed-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18t/t4014: test "am -3" with mode-only change.Libravatar Junio C Hamano1-2/+5
Earlier commit ece7b74903007cee8d280573647243d46a6f3a95 added a test for rebase that uses "am -3", but this adds a test to check "am -3" itself. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18git-commit.sh: Shell script cleanupLibravatar David Kastrup1-58/+14
This moves "shift" out of the argument processing "case". It also replaces quite a bit of expr calls with ${parameter#word} constructs, and uses ${parameter:+word} for avoiding conditionals where possible. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18preserve executable bits in zip archivesLibravatar Dmitry Potapov1-2/+4
Correct `git-archive --format=zip' command to preserve executable bits in zip archives. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18Fix lapsus in builtin-apply.cLibravatar Pierre Habouzit1-1/+1
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18git-push: documentation and tests for pushing only branchesLibravatar Jeff King3-4/+14
Commit 098e711e caused git-push to match only branches when considering which refs to push. This patch updates the documentation accordingly and adds a test for this behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18git-svnimport: Use separate arguments in the pipe for git-rev-parseLibravatar Matthias Urlichs1-1/+1
Some people seem to create SVN branch names with spaces or other shell metacharacters. Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18contrib/fast-import: add perl version of simple exampleLibravatar Jeff King1-0/+64
This is based on the git-import.sh script, but is a little more robust and efficient. More importantly, it should serve as a quick template for interfacing fast-import with perl scripts. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18contrib/fast-import: add simple shell exampleLibravatar Nguyen Thai Ngoc Duy1-0/+38
This example just puts a directory under git control. It is significantly slower than using the git tools directly, but hopefully shows a bit how fast-import works. [jk: added header comments] Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18rev-list --bisect: Bisection "distance" clean up.Libravatar Christian Couder1-11/+7
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18rev-list --bisect: Move some bisection code into best_bisection.Libravatar Christian Couder1-17/+26
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18rev-list --bisect: Move finding bisection into do_find_bisection.Libravatar Christian Couder1-42/+48
This factorises some code and make a big function smaller. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-18Merge branch 'cr/reset'Libravatar Junio C Hamano14-44/+718
* cr/reset: Simplify cache API An additional test for "git-reset -- path" Make "git reset" a builtin. Move make_cache_entry() from merge-recursive.c into read-cache.c Add tests for documented features of "git reset".
2007-09-18Merge branch 'maint'Libravatar Junio C Hamano9-49/+304
* maint: Document ls-files --with-tree=<tree-ish> git-commit: partial commit of paths only removed from the index git-commit: Allow partial commit of file removal. send-email: make message-id generation a bit more robust git-gui: Disable native platform text selection in "lists" git-gui: Paper bag fix "Commit->Revert" format arguments git-gui: Provide 'uninstall' Makefile target to undo an installation git-gui: Font chooser to handle a large number of font families git-gui: Make backporting changes from i18n version easier git-gui: Don't delete send on Windows as it doesn't exist git-gui: Trim trailing slashes from untracked submodule names git-gui: Assume untracked directories are Git submodules git-gui: handle "deleted symlink" diff marker git-gui: show unstaged symlinks in diff viewer git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly git-gui: Properly set the state of "Stage/Unstage Hunk" action git-gui: Fix detaching current branch during checkout git-gui: Correct starting of git-remote to handle -w option
2007-09-17Document ls-files --with-tree=<tree-ish>Libravatar Junio C Hamano1-1/+8
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-17git-commit: partial commit of paths only removed from the indexLibravatar Junio C Hamano2-3/+14
Because a partial commit is meant to be a way to ignore what are staged in the index, "git rm --cached A && git commit A" should just record what is in A on the filesystem. The previous patch made the command sequence to barf, saying that A has not been added yet. This fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-17git-commit: Allow partial commit of file removal.Libravatar Junio C Hamano3-1/+103
When making a partial commit, git-commit uses git-ls-files with the --error-unmatch option to expand and sanity check the user supplied path patterns. When any path pattern does not match with the paths known to the index, it errors out, in order to catch a common mistake to say "git commit Makefiel cache.h" and end up with a commit that touches only cache.h (notice the misspelled "Makefile"). This detection however does not work well when the path has already been removed from the index. If you drop a path from the index and try to commit that partially, i.e. $ git rm COPYING $ git commit -m 'Remove COPYING' COPYING the command complains because git does not know anything about COPYING anymore. This introduces a new option --with-tree to git-ls-files and uses it in git-commit when we build a temporary index to write a tree object for the partial commit. When --with-tree=<tree-ish> option is specified, names from the given tree are added to the set of names the index knows about, so we can treat COPYING file in the example as known. Of course, there is no reason to use "git rm" and git-aware people have long time done: $ rm COPYING $ git commit -m 'Remove COPYING' COPYING which works just fine. But this caused a constant confusion. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-17Merge branch 'jc/grep-c' into maintLibravatar Junio C Hamano2-14/+80
* jc/grep-c: Split grep arguments in a way that does not requires to add /dev/null.
2007-09-17Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano8-45/+293
* 'maint' of git://repo.or.cz/git-gui: git-gui: Disable native platform text selection in "lists" git-gui: Paper bag fix "Commit->Revert" format arguments git-gui: Provide 'uninstall' Makefile target to undo an installation git-gui: Font chooser to handle a large number of font families git-gui: Make backporting changes from i18n version easier git-gui: Don't delete send on Windows as it doesn't exist git-gui: Trim trailing slashes from untracked submodule names git-gui: Assume untracked directories are Git submodules git-gui: handle "deleted symlink" diff marker git-gui: show unstaged symlinks in diff viewer git-gui: Avoid use of libdir in Makefile git-gui: Disable Tk send in all git-gui sessions git-gui: lib/index.tcl: handle files with % in the filename properly git-gui: Properly set the state of "Stage/Unstage Hunk" action git-gui: Fix detaching current branch during checkout git-gui: Correct starting of git-remote to handle -w option
2007-09-17send-email: make message-id generation a bit more robustLibravatar Junio C Hamano1-4/+11
Earlier code took Unix time and appended a few random digits. If you are firing off many messages within a second, you could issue the same id to different messages, which is a no-no. If you send out 31 messages within a single second, with random integer taken out of rand(4200), you have about 10% chance of producing the same message ID. This fixes the problem by uses a prefix string which is constant-per-invocation (time and pid), with a serial number for each message generated by the process appended at the end. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-17Merge branch 'maint'Libravatar Junio C Hamano10-1009/+613
* maint: git-apply: fix whitespace stripping apply --index-info: fall back to current index for mode changes core-tutorial: minor cleanup documentation: replace Discussion section by link to user-manual chapter user-manual: todo updates and cleanup user-manual: fix introduction to packfiles user-manual: move packfile and dangling object discussion user-manual: rewrite object database discussion user-manual: reorder commit, blob, tree discussion user-manual: rewrite index discussion user-manual: create new "low-level git operations" chapter user-manual: rename "git internals" to "git concepts" user-manual: move object format details to hacking-git chapter user-manual: adjust section levels in "git internals" revision walker: --cherry-pick is a limited operation git-sh-setup: typofix in comments
2007-09-17git-apply: fix whitespace strippingLibravatar J. Bruce Fields1-3/+10
The algorithm isn't right here: it accumulates any set of 8 spaces into tabs even if they're separated by tabs, so <four spaces><tab><four spaces><tab> is converted to <tab><tab><tab> when it should be just <tab><tab> So teach git-apply that a tab hides any group of less than 8 previous spaces in a row. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-16git-gui: Disable native platform text selection in "lists"Libravatar Shawn O. Pearce3-9/+18
Sometimes we use a Tk text widget as though it were a listbox. This happens typically when we want to show an icon to the left of the text label or just when a text widget is generally a better choice then the native listbox widget. In these cases if we want the user to have control over the selection we implement our own "in_sel" tag that shows the selected region and we perform our own selection management in the background via keybindings and mouse bindings. In such uses we don't want the user to be able to activate the native platform selection by dragging their mouse through the text widget. Doing so creates a very confusing display and the user is left wondering what it may mean to have two different types of selection in the same widget. Tk doesn't allow us to delete the "sel" tag that it uses internally to manage the native selection but it will allow us to make it invisible by setting the tag to have the same display properties as unselected text. So long as we don't actually use the "sel" tag for anything in code its effectively invisible. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-16apply --index-info: fall back to current index for mode changesLibravatar Johannes Schindelin2-2/+39
"git diff" does not record index lines for pure mode changes (i.e. no lines changed). Therefore, apply --index-info would call out a bogus error. Instead, fall back to reading the info from the current index. Incidentally, this fixes an error where git-rebase would not rebase a commit including a pure mode change, and changes requiring a threeway merge. Noticed and later tested by Chris Shoemaker. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-15Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maintLibravatar Junio C Hamano5-1003/+548
* 'maint' of git://linux-nfs.org/~bfields/git: core-tutorial: minor cleanup documentation: replace Discussion section by link to user-manual chapter user-manual: todo updates and cleanup user-manual: fix introduction to packfiles user-manual: move packfile and dangling object discussion user-manual: rewrite object database discussion user-manual: reorder commit, blob, tree discussion user-manual: rewrite index discussion user-manual: create new "low-level git operations" chapter user-manual: rename "git internals" to "git concepts" user-manual: move object format details to hacking-git chapter user-manual: adjust section levels in "git internals"
2007-09-15core-tutorial: minor cleanupLibravatar J. Bruce Fields1-22/+10
Revise the introduction for concision, add pointers to the tutorial and user manual as appropriate, delete cvsimport note from the end, as that work's been done elsewhere already. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15documentation: replace Discussion section by link to user-manual chapterLibravatar J. Bruce Fields3-597/+54
The "Discussion" section has a lot of useful information, but is a little wordy, especially for an already-long man page, and is designed for an audience more of potential git hackers than users, which probably doesn't make as much sense as git matures. Also, I (perhaps foolishly) forked a version in the user manual, which has been significantly rewritten in an attempt to address some of the above problems. So, remove this section and replace it by a (very terse) summary of the original material--my attempt at the World's Shortest Git Overview--and a reference to the appropriate chapter of the user manual. It's unfortunate to remove something that's been in this place for a long time, as some people may still depend on finding it there. But I think we'll want to do this some day anyway. Cc: Andreas Ericsson <ae@op5.se> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: todo updates and cleanupLibravatar J. Bruce Fields1-13/+16
Format a couple lists. Reminder that we may want to add submodule documentation some day.
2007-09-15user-manual: fix introduction to packfilesLibravatar J. Bruce Fields1-2/+2
Actually I don't think we've previously mentioned .git/objects, so we need a different introduction here. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: move packfile and dangling object discussionLibravatar J. Bruce Fields1-148/+147
The discussions of packfiles and dangling objects both belong in the object database section. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: rewrite object database discussionLibravatar J. Bruce Fields1-139/+196
Rewrite the introduction. Rewrite each section completely to make them work in the new order, to add some examples, and to move plumbing commands (like git-commit-tree) to the following chapter. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: reorder commit, blob, tree discussionLibravatar J. Bruce Fields1-41/+41
The bottom-up blog, tree, commit order makes sense unless you want to give explicit examples--it's easier to discover objects to examine if you go in the other order...., Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: rewrite index discussionLibravatar J. Bruce Fields1-49/+55
Add an example using git-ls-files, standardize on the new "index" terminology (as opposed to "cache"), attempt to clarify discussion and make it a little shorter, avoid some unnecessary jargon ("write-back cache"). Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: create new "low-level git operations" chapterLibravatar J. Bruce Fields1-9/+24
The low-level index operations aren't as important to regular users as the rest of this "git concepts" chapter; so move it into a separate chapter, and do some minor cleanup. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: rename "git internals" to "git concepts"Libravatar J. Bruce Fields1-6/+10
"git internals" sounds like something only git developers must know about, but this stuff should be of wider interest. Rename the chapter and give it a slightly friendlier introduction. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: move object format details to hacking-git chapterLibravatar J. Bruce Fields1-23/+32
Most of this is probably only of interest to git developers. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15user-manual: adjust section levels in "git internals"Libravatar J. Bruce Fields1-5/+12
The descriptions of the various object types should all be a subsection of the "Object Database" section. I cribbed most of this chapter from the README (now core-intro.txt and git(7)), because there's stuff in there people need to know and I was too lazy to rewrite it. The audience isn't quite right, though--the chapter is a mixture of user- and developer- level documentation that isn't as appropriate now as it was originally. So, reserve this chapter for stuff users need to know, and move the source code introduction into a new "git hacking" chapter where we'll also move any hacker-only technical details. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2007-09-15revision walker: --cherry-pick is a limited operationLibravatar Johannes Schindelin2-0/+15
We used to rely on the fact that cherry-pick would trigger the code path to set limited = 1 in handle_commit(), when an uninteresting commit was encountered. However, when cherry picking between two independent branches, i.e. when there are no merge bases, and there is only linear development (which can happen when you cvsimport a fork of a project), no uninteresting commit will be encountered. So set limited = 1 when --cherry-pick was asked for. Noticed by Martin Bähr. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-15git-sh-setup: typofix in commentsLibravatar Junio C Hamano1-1/+1
Noticed by Anupam Srivastava. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-14Merge branch 'js/remote'Libravatar Junio C Hamano2-2/+12
* js/remote: Teach "git remote" a mirror mode
2007-09-14Merge branch 'js/tag'Libravatar Junio C Hamano1-1/+1
* js/tag: verify-tag: also grok CR/LFs in the tag signature
2007-09-14Merge branch 'lh/svn-first-parent'Libravatar Junio C Hamano1-4/+6
* lh/svn-first-parent: git-svn: always use --first-parent git-svn: add support for --first-parent
2007-09-14Merge branch 'np/delta'Libravatar Junio C Hamano4-59/+256
* np/delta: builtin-pack-objects.c: avoid bogus gcc warnings threaded delta search: proper locking for cache accounting threaded delta search: add pack.threads config variable fix threaded delta search locking threaded delta search: specify number of threads at run time threaded delta search: better chunck split point threaded delta search: refine work allocation basic threaded delta search rearrange delta search progress reporting localize window memory usage accounting straighten the list of objects to deltify
2007-09-14builtin-pack-objects.c: avoid bogus gcc warningsLibravatar Junio C Hamano1-6/+6
These empty statement marcos can solicit bogus "statement with no effect" warnings; squelch them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-14Merge branch 'jc/pack'Libravatar Junio C Hamano1-2/+23
* jc/pack: Keep last used delta base in the delta window
2007-09-14Merge branch 'dk/diff-delta'Libravatar Junio C Hamano1-23/+86
* dk/diff-delta: diff-delta.c: Rationalize culling of hash buckets diff-delta.c: pack the index structure
2007-09-14Merge branch 'jc/partial-remove'Libravatar Junio C Hamano4-3/+123
* jc/partial-remove: Document ls-files --with-tree=<tree-ish> git-commit: partial commit of paths only removed from the index git-commit: Allow partial commit of file removal.