summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't use "<unknown>" for placeholders and suppress printing of empty user ↵Michal Vitecek2007-09-266-16/+11
| | | | | | | | | | | | formats. This changes the interporate() to replace entries with NULL values by the empty string, and uses it to interpolate missing fields in custom format output used in git-log and friends. It is most useful to avoid <unknown> output from %b format for a commit log message that lack any body text. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: create .dotest-merge after validating options.Matt Kraai2007-09-261-4/+4
| | | | | | | | | | | | Creating .dotest-merge before validating the options prevents both --continue and --interactive from working if the options are invalid, so only create it after validating the options. [jc: however, just moving the creation of DOTEST breaks output] Signed-off-by: Matt Kraai <kraai@ftbfs.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: avoid exporting GIT_AUTHOR_* variablesJohannes Schindelin2007-09-251-2/+8
| | | | | | | | | | | | It is somewhat unsafe to export the GIT_AUTHOR_* variables, since a later call to git-commit or git-merge could pick them up inadvertently. So avoid the export, using a recipe provided by Johannes Sixt. Incidentally, this fixes authorship of merges with "rebase --preserve -i". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: Fix numbers in progress reportJohannes Schindelin2007-09-251-2/+2
| | | | | | | | Instead of counting all lines in done and todo, we now count the actions before outputting "$Rebasing ($count/$total)". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: style fixes and minor cleanupsJohannes Schindelin2007-09-251-18/+30
| | | | | | | | | | | | | | | | | | | | | | This patch indents ";;" consistently with the rest of git's shell scripts, and makes sure that ";;" are before each "esac". It introduces a helper function "has_action", to make it easier to read the intentions of the code. Errors from "git rev-parse --verify" are no longer ignored. Spaces are quoted using single quotes instead of a backslash, for readability. A "test $preserve=f" (missing spaces) was fixed; hashes are no longer written to "$DOTEST"/rewritten/ unnecessarily. We used to quote the message for a squash, only to have "echo" unquote it. Now we use "printf" and do not need to quote to start with. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rebase -i: commit when continuing after "edit"Johannes Schindelin2007-09-252-7/+24
| | | | | | | | | | | | | When doing an "edit" on a commit, editing and git-adding some files, "git rebase -i" complained about a missing "author-script". The idea was that the user would call "git commit --amend" herself. But we can be nice and do that for the user. Noticed by Dmitry Potapov. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make merge-recursive honor diff.renamelimitLars Hjemli2007-09-251-0/+6
| | | | | | | | | | | | | | | It might be a sign of source code management gone bad, but when two branches has diverged almost beyond recognition and time has come for the branches to merge, the user is going to need all the help his tool can give him. Honoring diff.renamelimit has great potential as a painkiller in such situations. The painkiller effect could have been achieved by e.g. 'merge.renamelimit', but the flexibility gained by a separate option is questionable: our user would probably expect git to detect renames equally good when merging as when diffing (I known I did). Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Move convert-objects to contrib.Matt Kraai2007-09-256-4/+1
| | | | | | | | | | | | | convert-objects was needed to convert from an old-style repository, which hashed the compressed contents and used a different date format. Such repositories are presumably no longer common and, if such conversions are necessary, should be done by writing a frontend for git-fast-import. Linus, the original author, is OK with moving it to contrib. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-09-253-8/+12
|\ | | | | | | | | | | | | * maint: Do not over-quote the -f envelopesender value. unexpected Make output (e.g. from --debug) causes build failure Fixed minor typo in t/t9001-send-email.sh test command line.
| * Do not over-quote the -f envelopesender value.Jim Meyering2007-09-251-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Without this, the value passed to sendmail would have an extra set of single quotes. At least exim's sendmail emulation would object to that: exim: bad -f address "'list-addr@example.org'": malformed address: ' \ may not follow 'list-addr@example.org error: hooks/post-receive exited with error code 1 Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * unexpected Make output (e.g. from --debug) causes build failureJim Meyering2007-09-251-1/+1
| | | | | | | | | | | | | | | | Without this, the extra output produced e.g., by "make --debug" would go into $INSTLIBDIR and then cause the sed command to fail. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Fixed minor typo in t/t9001-send-email.sh test command line.Glenn Rempe2007-09-241-1/+1
| | | | | | | | | | | | | | The git-send-email command line in the test was missing a single hyphen. Signed-off-by: Glenn Rempe <glenn@rempe.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Start RelNotes for 1.5.4Junio C Hamano2007-09-241-0/+21
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jn/web'Junio C Hamano2007-09-231-36/+2
|\ \ | | | | | | | | | | | | | | | * jn/web: gitweb: No difftree output for trivial merge gitweb: Remove parse_from_to_diffinfo code from git_patchset_body
| * | gitweb: No difftree output for trivial mergeJakub Narebski2007-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 'commitdiff' view, for the merge commit, there is an extra header for the difftree table, with links to commitdiffs to individual parents. Do not show such header when there is nothing to show, for trivial merges. This means that for trivial merge you have to go to 'commit' view to get links to diffs to each parent. Signed-off-by: Jakub Narebski <jnareb@gmail.com>
| * | gitweb: Remove parse_from_to_diffinfo code from git_patchset_bodyJakub Narebski2007-09-231-35/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | In commit 90921740bd00029708370673fdc537522aa48e6f "gitweb: Split git_patchset_body into separate subroutines" a part of git_patchset_body code was separated into parse_from_to_diffinfo subroutine. But instead of replacing the separated code by the call to mentioned subroutine, the call to subroutine was placed before the separated code. This patch removes parse_from_to_diffinfo code from git_patchset_body subroutine. Signed-off-by: Jakub Narebski <jnareb@gmail.com>
* | Merge branch 'je/hooks'Junio C Hamano2007-09-234-0/+295
|\ \ | | | | | | | | | | | | | | | * je/hooks: Added example hook script to save/restore permissions/ownership. Add post-merge hook, related documentation, and tests.
| * | Added example hook script to save/restore permissions/ownership.Josh England2007-09-182-1/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage info is emebed in the script, but the gist of it is to run the script from a pre-commit hook to save permissions/ownership data to a file and check that file into the repository. Then, a post_merge hook reads the file and updates working tree permissions/ownership. All updates are transparent to the user (although there is a --verbose option). Merge conflicts are handled in the "read" phase (in pre-commit), and the script aborts the commit and tells you how to fix things in the case of a merge conflict in the metadata file. This same idea could be extended to handle file ACLs or other file metadata if desired. Signed-off-by: Josh England <jjengla@sandia.gov> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Add post-merge hook, related documentation, and tests.Josh England2007-09-183-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>
* | | Merge branch 'js/apply-build-ancestor'Junio C Hamano2007-09-233-21/+31
|\ \ \ | | | | | | | | | | | | | | | | * js/apply-build-ancestor: apply: get rid of --index-info in favor of --build-fake-ancestor
| * | | apply: get rid of --index-info in favor of --build-fake-ancestorJohannes Schindelin2007-09-183-21/+31
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-am used "git apply -z --index-info" to find the original versions of the files touched by the diff, to be able to do an inexpensive three-way merge. This operation makes only sense in a repository, since the index information in the diff refers to blobs, which have to be present in the current repository. Therefore, teach "git apply" a mode to write out the result as an index file to begin with, obviating the need for scripts to do it themselves. The sole user for --index-info is "git am" is converted to use --build-fake-ancestor in this patch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2007-09-2325-38/+252
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: git-svn: don't attempt to spawn pager if we don't want one Supplant the "while case ... break ;; esac" idiom User Manual: add a chapter for submodules user-manual: don't assume refs are stored under .git/refs Detect exec bit in more cases. Conjugate "search" correctly in the git-prune-packed man page. Move the paragraph specifying where the .idx and .pack files should be Documentation/git-lost-found.txt: drop unnecessarily duplicated name.
| * | Merge branch 'maint' of git://linux-nfs.org/~bfields/git into maintJunio C Hamano2007-09-231-7/+213
| |\ \ | | | | | | | | | | | | | | | | | | | | * 'maint' of git://linux-nfs.org/~bfields/git: User Manual: add a chapter for submodules user-manual: don't assume refs are stored under .git/refs
| | * | User Manual: add a chapter for submodulesMiklos Vajna2007-09-231-0/+202
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Smith <msmith@cbnco.com> Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| | * | user-manual: don't assume refs are stored under .git/refsJ. Bruce Fields2007-09-231-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scripts taken from Tony Luck's howto assume all refs can be found under .git/refs, but this is not necessarily true, especially since git-gc runs git-pack-refs. Also add a note warning of this in the chapter that introduces refs, and fix the same incorrect assumption in one other spot. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
| * | | git-svn: don't attempt to spawn pager if we don't want oneEric Wong2007-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though config_pager() unset the $pager variable, we were blindly calling exec() on it through run_pager(). Noticed-by: Chris Moore <christopher.ian.moore@gmail.com> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Supplant the "while case ... break ;; esac" idiomDavid Kastrup2007-09-2319-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of shell scripts contained stuff starting with while case "$#" in 0) break ;; esac and similar. I consider breaking out of the condition instead of the body od the loop ugly, and the implied "true" value of the non-matching case is not really obvious to humans at first glance. It happens not to be obvious to some BSD shells, either, but that's because they are not POSIX-compliant. In most cases, this has been replaced by a straight condition using "test". "case" has the advantage of being faster than "test" on vintage shells where "test" is not a builtin. Since none of them is likely to run the git scripts, anyway, the added readability should be worth the change. A few loops have had their termination condition expressed differently. Signed-off-by: David Kastrup <dak@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Detect exec bit in more cases.David Brown2007-09-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | git-p4 was missing the execute bit setting if the file had other attribute bits set. Acked-By: Simon Hausmann <simon@lst.de>
| * | | Conjugate "search" correctly in the git-prune-packed man page.Matt Kraai2007-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Move the paragraph specifying where the .idx and .pack files should beMatt Kraai2007-09-211-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Documentation/git-lost-found.txt: drop unnecessarily duplicated name.Junio C Hamano2007-09-211-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | I only did this back when I wanted to make sure git-log and gitk work properly with non Occidental characters. There is really no reason to keep it around. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | rev-list --bisect: Fix best == NULL case.Christian Couder2007-09-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Earlier commit ce0cbad77 broke rev-list --bisect to cause it segfault when the resulting set is empty. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint' to sync with 1.5.3.2Junio C Hamano2007-09-192-0/+59
|\ \ \ | |/ / | | / | |/ |/| | | | | This is an evil merge that also updates the stale document links in Documentation/git.txt Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * GIT 1.5.3.2v1.5.3.2Junio C Hamano2007-09-193-2/+60
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2007-09-188-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
| * Fixed update-hook example allow-users format.Väinö Järvelä2007-09-181-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>
| * Documentation/git-svn: updated design philosophy notesEric Wong2007-09-181-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>
| * t/t4014: test "am -3" with mode-only change.Junio C Hamano2007-09-181-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>
| * Fix lapsus in builtin-apply.cPierre Habouzit2007-09-181-1/+1
| | | | | | | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-push: documentation and tests for pushing only branchesJeff King2007-09-183-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>
| * git-svnimport: Use separate arguments in the pipe for git-rev-parseMatthias Urlichs2007-09-181-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>
* | git-commit.sh: Shell script cleanupDavid Kastrup2007-09-181-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>
* | preserve executable bits in zip archivesDmitry Potapov2007-09-181-2/+4
| | | | | | | | | | | | | | Correct `git-archive --format=zip' command to preserve executable bits in zip archives. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | contrib/fast-import: add perl version of simple exampleJeff King2007-09-181-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>
* | contrib/fast-import: add simple shell exampleNguyen Thai Ngoc Duy2007-09-181-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>
* | rev-list --bisect: Bisection "distance" clean up.Christian Couder2007-09-181-11/+7
| | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rev-list --bisect: Move some bisection code into best_bisection.Christian Couder2007-09-181-17/+26
| | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rev-list --bisect: Move finding bisection into do_find_bisection.Christian Couder2007-09-181-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>
* | Merge branch 'cr/reset'Junio C Hamano2007-09-1814-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".
| * \ Merge branch 'jc/cachetree' into cr/resetJunio C Hamano2007-09-1411-81/+184
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/cachetree: Simplify cache API git-format-patch --in-reply-to: accept <message@id> with angle brackets git-add -u: do not barf on type changes Remove duplicate note about removing commits with git-filter-branch git-clone: improve error message if curl program is missing or not executable git.el: Allow the add and remove commands to be applied to ignored files. git.el: Allow selecting whether to display uptodate/unknown/ignored files. git.el: Keep the status buffer sorted by filename. hooks--update: Explicitly check for all zeros for a deleted ref.