aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* api-run-command.txt: talk about run_hook()Stephan Beyer2009-01-17
| | | | | Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Move run_hook() from builtin-commit.c into run-command.c (libgit)Stephan Beyer2009-01-17
| | | | | | | | | | | | | | | | | | A function that runs a hook is used in several Git commands. builtin-commit.c has the one that is most general for cases without piping. The one in builtin-gc.c prints some useful warnings. This patch moves a merged version of these variants into libgit and lets the other builtins use this libified run_hook(). The run_hook() function used in receive-pack.c feeds the standard input of the pre-receive or post-receive hooks. This function is renamed to run_receive_hook() because the libified run_hook() cannot handle this. Mentored-by: Daniel Barkalow <barkalow@iabervon.org> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* checkout: don't crash on file checkout before running post-checkout hookStephan Beyer2009-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | In the case of git init echo exit >.git/hooks/post-checkout chmod +x .git/hooks/post-checkout touch foo git add foo rm foo git checkout -- foo git-checkout resulted in a Segmentation fault, because there is no new branch set for the post-checkout hook. This patch makes use of the null SHA as it is set for the old branch. While at it, I removed the xstrdup() around the sha1_to_hex(...) calls in builtin-checkout.c/post_checkout_hook() because sha1_to_hex() uses four buffers for the hex-dumped SHA and we only need two. (Duplicating one buffer is only needed if we need more than four.) Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2009-01-15
|\ | | | | | | | | | | | | * maint: t3404: Add test case for auto-amending only edited commits after "edit" t3404: Add test case for aborted --continue after "edit" t3501: check that commits are actually done
| * Merge branch 'maint-1.6.0' into maintJunio C Hamano2009-01-15
| |\ | | | | | | | | | | | | | | | | | | * maint-1.6.0: t3404: Add test case for auto-amending only edited commits after "edit" t3404: Add test case for aborted --continue after "edit" t3501: check that commits are actually done
| | * t3404: Add test case for auto-amending only edited commits after "edit"Stephan Beyer2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | Add a test case for the bugfix introduced by commit c14c3c82d "git-rebase--interactive: auto amend only edited commit". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * t3404: Add test case for aborted --continue after "edit"Stephan Beyer2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | Add a test case for the bugfix introduced by commit 8beb1f33d "git-rebase-interactive: do not squash commits on abort". Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * t3501: check that commits are actually doneStephan Beyer2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic idea of t3501 is to check whether revert and cherry-pick works on renamed files. But as there is no pure cherry-pick/revert test, it is good to also check if commits are actually done in that scenario. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | bash-completion: Add comments to remind about required argumentsTed Pavlic2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a few simple comments above commands that take arguments. These comments are meant to remind developers of potential problems that can occur when the script is sourced on systems with "set -u." Any function which requires arguments really ought to be called with explicit arguments given. Also adds a #!bash to the top of bash completions so that editing software can always identify that the file is of sh type. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | bash-completion: Try bash completions before simple filetypeTed Pavlic2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a git completion is not found, a bash shell should try bash-type completions first before going to standard filetype completions. This patch adds "-o bashdefault" to the completion line. If that option is not available, it uses the old method. This behavior was inspired by Mercurial's bash completion script. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | bash-completion: Support running when set -u is enabledTed Pavlic2009-01-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under "set -u" semantics, it is an error to access undefined variables. Some user environments may enable this setting in the interactive shell. In any context where the completion functions access an undefined variable, accessing a default empty string (aka "${1-}" instead of "$1") is a reasonable way to code the function, as it silences the undefined variable error while still supplying an empty string. In this patch, functions that should always take an argument still use $1. Functions that have optional arguments use ${1-}. Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2009-01-14
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * maint: Update draft release notes to 1.6.1.1 Make t3411 executable fix handling of multiple untracked files for git mv -k add test cases for "git mv -k"
| * | Update draft release notes to 1.6.1.1Junio C Hamano2009-01-14
| | |
| * | Merge branch 'maint-1.6.0' into maintJunio C Hamano2009-01-14
| |\ \ | | |/ | | | | | | | | | | | | * maint-1.6.0: fix handling of multiple untracked files for git mv -k add test cases for "git mv -k"
| | * fix handling of multiple untracked files for git mv -kMichael J Gruber2009-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-k" option to "git mv" should allow specifying multiple untracked files. Currently, multiple untracked files raise an assertion if they appear consecutively as arguments. Fix this by decrementing the loop index after removing one entry from the array of arguments. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * add test cases for "git mv -k"Michael J Gruber2009-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add test cases for ignoring nonexisting and untracked files using the -k option to "git mv". There is one known breakage related to multiple untracked files specfied as consecutive arguments. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Make t3411 executableMiklos Vajna2009-01-14
| | | | | | | | | | | | | | | Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Update 1.6.2 draft release notesJunio C Hamano2009-01-13
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2009-01-13
|\ \ \ | |/ / | | | | | | | | | | | | * maint: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly
| * | Merge branch 'maint-1.6.0' into maintJunio C Hamano2009-01-13
| |\ \ | | |/ | | | | | | | | | | | | * maint-1.6.0: fast-import: Cleanup mode setting. Git.pm: call Error::Simple() properly
| | * fast-import: Cleanup mode setting.Felipe Contreras2009-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "S_IFREG | mode" makes only sense for 0644 and 0755. Even though doing (S_IFREG | mode) may not hurt when mode is any other supported value, that is only true because S_IFREG mode bit happens to be already on for S_IFLNK or S_IFGITLINK. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| | * Git.pm: call Error::Simple() properlyJay Soffian2009-01-13
| | | | | | | | | | | | | | | | | | | | | The error message to Error::Simple() must be passed as a single argument. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'nd/grep-assume-unchanged'Junio C Hamano2009-01-13
|\ \ \ | | | | | | | | | | | | | | | | | | | | * nd/grep-assume-unchanged: grep: grep cache entries if they are "assume unchanged" grep: support --no-ext-grep to test builtin grep
| * | | grep: grep cache entries if they are "assume unchanged"Nguyễn Thái Ngọc Duy2008-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Assume unchanged" bit means "please pretend that I have never touched this file", so if user removes the file, we should not care. This patch teaches "git grep" to use cache version in such situations. External grep case has not been fixed yet. But given that on the platform that CE_VALID bit may be used like Windows, external grep is not available anyway, I would wait for people to raise their hands before touching it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | grep: support --no-ext-grep to test builtin grepNguyễn Thái Ngọc Duy2008-12-27
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'as/maint-shortlog-cleanup'Junio C Hamano2009-01-13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * as/maint-shortlog-cleanup: builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarily
| * | | | builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarilyAdeodato Simó2009-01-01
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make insert_one_record() use string_list_append(), instead of duplicating its code. Because of this, do not free the "util" member when clearing the "onelines" string lists: with the new code path it is not initialized to any value (was being initialized to NULL previously). Also, avoid unnecessary strdup() calls when inserting names in log->list. This list always has "strdup_strings" activated, hence strdup'ing namebuf is unnecessary. This change also removes a latent memory leak in the old code. NB: The duplicated code mentioned above predated the appearance of string_list_append(). Signed-off-by: Adeodato Simó <dato@net.com.org.es> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/maint-ls-tree'Junio C Hamano2009-01-13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-ls-tree: Document git-ls-tree --full-tree ls-tree: add --full-tree option
| * | | | Document git-ls-tree --full-treeNanako Shiraishi2009-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | ls-tree: add --full-tree optionJunio C Hamano2008-12-26
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The established behaviour of "git ls-tree $tree_ish" run from a subdirectory "sub/dir" in a work tree is to limit the output to the paths in the subdirectory, and strip off the leading "sub/dir" from the output, since 3c5e846 (ls-tree: major rewrite to do pathspec, 2005-11-26). This was a "usability" feature made back in the days when the line between Porcelain and plumbing was blurry, and in retrospect, it probably was misguided. The behaviour may be what the end user would expect when the command is run interactively from a subdirectory, but it also means that a scripted Porcelain that wants to use the command to list the full contents of a tree object has to do cd_to_toplevel (and save the output from "rev-parse --show-prefix" before doing so, so that it can be used as a pathspec if it wants to limit its operation to the original subdirectory in other commands). This new option makes the command operate on the full tree object, regardless of where in the work tree it is run from. It also implies the behaviour that is triggered by the existing --full-name option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/bundle-tags'Junio C Hamano2009-01-13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/bundle-tags: bundle: allow rev-list options to exclude annotated tags
| * | | | bundle: allow rev-list options to exclude annotated tagsJohannes Schindelin2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With options such as "--all --since=2.weeks.ago", annotated tags used to be included, when they should have been excluded. The reason is that we heavily abuse the revision walker to determine what needs to be included or excluded. And the revision walker does not show tags at all (and therefore never marks tags as uninteresting). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'js/add-not-submodule'Junio C Hamano2009-01-13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * js/add-not-submodule: git add: do not add files from a submodule
| * | | | | git add: do not add files from a submoduleJohannes Schindelin2009-01-05
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It comes quite as a surprise to an unsuspecting Git user that calling "git add submodule/file" (which is a mistake, alright) _removes_ the submodule in the index, and adds the file. Instead, complain loudly. While at it, be nice when the user said "git add submodule/" which is most likely the consequence of tab-completion, and stage the submodule, instead of trying to add the contents of that directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'pb/maint-git-pm-false-dir'Junio C Hamano2009-01-13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * pb/maint-git-pm-false-dir: Git.pm: correctly handle directory name that evaluates to "false"
| * | | | | Git.pm: correctly handle directory name that evaluates to "false"Philippe Bruhat (BooK)2009-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The repository constructor mistakenly rewrote a Directory parameter that Perl happens to evaluate to false (e.g. "0") to ".". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'pj/maint-ldflags'Junio C Hamano2009-01-13
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pj/maint-ldflags: configure clobbers LDFLAGS
| * | | | | | configure clobbers LDFLAGSPaul Jarc2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a couple of tests, configure clobbers the LDFLAGS value set by the caller. This patch fixes it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'fe/cvsserver'Junio C Hamano2009-01-13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fe/cvsserver: cvsserver: change generation of CVS author names cvsserver: add option to configure commit message
| * | | | | | | cvsserver: change generation of CVS author namesFabian Emmes2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CVS username is generated from local part email address. We take the whole local part but restrict the character set to the Portable Filename Character Set, which is used for Unix login names according to Single Unix Specification v3. This will obviously report different usernames from existing repositories for commits with the local part of the author e-mail address that contains characters outside the PFCS. Hopefully this won't break an old CVS checkout from an earlier version of git-cvsserver, because the names are always shown afresh to the CVS clients and not kept on the client side. Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | cvsserver: add option to configure commit messageFabian Emmes2009-01-03
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cvsserver annotates each commit message by "via git-CVS emulator". This is made configurable via gitcvs.commitmsgannotation. Signed-off-by: Fabian Emmes <fabian.emmes@rwth-aachen.de> Signed-off-by: Lars Noschinski <lars@public.noschinski.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'js/maint-bisect-gitk'Junio C Hamano2009-01-13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-bisect-gitk: bisect view: call gitk if Cygwin's SESSIONNAME variable is set
| * | | | | | | bisect view: call gitk if Cygwin's SESSIONNAME variable is setJohannes Schindelin2009-01-03
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that Cygwin sets the variable SESSIONNAME when an interactive desktop session is running, and does not set it when you log in via ssh. So we can use this variable to determine whether to run gitk or git log in git bisect view. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'np/no-loosen-prune-expire-now'Junio C Hamano2009-01-13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * np/no-loosen-prune-expire-now: objects to be pruned immediately don't have to be loosened
| * | | | | | | objects to be pruned immediately don't have to be loosenedNicolas Pitre2009-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is no grace period before pruning unreferenced objects, it is pointless to push those objects in their loose form just to delete them right away. Also be more explicit about the possibility of using "now" in the gc.pruneexpire config variable (needed for the above behavior to happen). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'cb/maint-unpack-trees-absense'Junio C Hamano2009-01-13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/maint-unpack-trees-absense: unpack-trees: remove redundant path search in verify_absent unpack-trees: fix path search bug in verify_absent unpack-trees: handle failure in verify_absent
| * | | | | | | | unpack-trees: remove redundant path search in verify_absentClemens Buchacher2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the only caller, verify_absent, relies on the fact that o->pos points to the next index entry anyways, there is no need to recompute its position. Furthermore, if a nondirectory entry were found, this would return too early, because there could still be an untracked directory in the way. This is currently not a problem, because verify_absent is only called if the index does not have this entry. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | unpack-trees: fix path search bug in verify_absentClemens Buchacher2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0cf73755 (unpack-trees.c: assume submodules are clean during check-out) changed an argument to verify_absent from 'path' to 'ce', which is however shadowed by a local variable of the same name. The bug triggers if verify_absent is used on a tree entry, for which the index contains one or more subsequent directories of the same length. The affected subdirectories are removed from the index. The testcase included in this commit bisects to 55218834 (checkout: do not lose staged removal), which reveals the bug in this case, but is otherwise unrelated. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | unpack-trees: handle failure in verify_absentClemens Buchacher2009-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 203a2fe1 (Allow callers of unpack_trees() to handle failure) changed the "die on error" behavior to "return failure code". verify_absent did not handle errors returned by verify_clean_subdirectory, however. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'mc/cd-p-pwd'Junio C Hamano2009-01-13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mc/cd-p-pwd: git-sh-setup: Fix scripts whose PWD is a symlink to a work-dir on OS X