summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2008-03-01Merge branch 'maint'Junio C Hamano
* maint: Documentation cherry-pick: Fix cut-and-paste error git.el: find the git-status buffer whatever its name is git-gui: Paper bag fix info dialog when no files are staged at commit
2008-03-01git.el: find the git-status buffer whatever its name isRémi Vanicat
git-status used the buffer name to find git-status buffers, and that can fail if the buffer has another name, for example when multiple working directories is tracked. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Acked-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Xavier Maillard <xma@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-28completion: support format-patch's --cover-letter optionJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27Merge branch 'git-p4' of git://repo.or.cz/git/git-p4Junio C Hamano
* 'git-p4' of git://repo.or.cz/git/git-p4: git-p4: Support usage of perforce client spec git-p4: git-p4 submit cleanups. git-p4: Removed git-p4 submit --direct. git-p4: Clean up git-p4 submit's log message handling. git-p4: Remove --log-substitutions feature. git-p4: support exclude paths
2008-02-27git.el: Do not display empty directories.Alexandre Julliard
Signed-off-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-27Merge branch 'db/checkout'Junio C Hamano
* db/checkout: (21 commits) checkout: error out when index is unmerged even with -m checkout: show progress when checkout takes long time while switching branches Add merge-subtree back checkout: updates to tracking report builtin-checkout.c: Remove unused prefix arguments in switch_branches path checkout: work from a subdirectory checkout: tone down the "forked status" diagnostic messages Clean up reporting differences on branch switch builtin-checkout.c: fix possible usage segfault checkout: notice when the switched branch is behind or forked Build in checkout Move code to clean up after a branch change to branch.c Library function to check for unmerged index entries Use diff -u instead of diff in t7201 Move create_branch into a library file Build-in merge-recursive Add "skip_unmerged" option to unpack_trees. Discard "deleted" cache entries after using them to update the working tree Send unpack-trees debugging output to stderr Add flag to make unpack_trees() not print errors. ... Conflicts: Makefile
2008-02-27git-p4: Support usage of perforce client specTor Arvid Lund
When syncing, git-p4 will only download files that are included in the active perforce client spec. This does not change the default behaviour - it requires that the user either supplies the command line argument --use-client-spec, or sets the git config option p4.useclientspec to "true". Signed-off-by: Tor Arvid Lund <torarvid@gmail.com> Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27git-p4: git-p4 submit cleanups.Simon Hausmann
Removed storing the list of commits in a configuration file. We only need the list of commits at run-time. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27git-p4: Removed git-p4 submit --direct.Simon Hausmann
This feature was originally meant to allow for quicker direct submits into perforce, but it turns out that it is not actually quicker than doing a git commit and then running git-p4 submit. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27git-p4: Clean up git-p4 submit's log message handling.Simon Hausmann
Instead of trying to substitute fields in the p4 submit template we now simply replace the description of the submit with the log message of the git commit. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27git-p4: Remove --log-substitutions feature.Simon Hausmann
This turns out to be rarely useful and is already covered by git's commit.template configuration variable. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-27git-p4: support exclude pathsTommy Thorn
Teach git-p4 about the -/ option which adds depot paths to the exclude list, used when cloning. The option is chosen such that the natural Perforce syntax works, eg: git p4 clone //branch/path/... -//branch/path/{large,old}/... Trailing ... on exclude paths are optional. This is a generalization of a change by Dmitry Kakurin (thanks). Signed-off-by: Tommy Thorn <tommy-git@thorn.ws> Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-24Use git-describe --exact-match in bash prompt on detached HEADShawn O. Pearce
Most of the time when I am on a detached HEAD and I am not doing a rebase or bisect operation the working directory is sitting on a tagged release of the repository. Showing the tag name instead of the commit SHA-1 is much more descriptive and a much better reminder of the state of this working directory. Now that git-describe --exact-match is available as a cheap means of obtaining the exact annotated tag or nothing at all, we can favor the annotated tag name over the abbreviated commit SHA-1. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-20git.el: Set process-environment instead of invoking envDavid Kågedal
This will make it a little less posix-dependent, and more efficient. Included is also a minor doc improvement. Signed-off-by: David Kågedal <davidk@lysator.liu.se> Acked-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16Build in checkoutDaniel Barkalow
The only differences in behavior should be: - git checkout -m with non-trivial merging won't print out merge-recursive messages (see the change in t7201-co.sh) - git checkout -- paths... will give a sensible error message if HEAD is invalid as a commit. - some intermediate states which were written to disk in the shell version (in particular, index states) are only kept in memory in this version, and therefore these can no longer be revealed by later write operations becoming impossible. - when we change branches, we discard MERGE_MSG, SQUASH_MSG, and rr-cache/MERGE_RR, like reset always has. I'm not 100% sure I got the merge recursive setup exactly right; the base for a non-trivial merge in the shell code doesn't seem theoretically justified to me, but I tried to match it anyway, and the tests all pass this way. Other than these items, the results should be identical to the shell version, so far as I can tell. [jc: squashed lock-file fix from Dscho in] Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16Merge branch 'maint'Junio C Hamano
* maint: commit: discard index after setting up partial commit filter-branch: handle filenames that need quoting diff: Fix miscounting of --check output hg-to-git: fix parent analysis mailinfo: feed only one line to handle_filter() for QP input diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver" Add "const" qualifier to "char *excludes_file". Add "const" qualifier to "char *editor_program". Add "const" qualifier to "char *pager_program". config: add 'git_config_string' to refactor string config variables. diff.c: remove useless check for value != NULL fast-import: check return value from unpack_entry() Validate nicknames of remote branches to prohibit confusing ones diff.c: replace a 'strdup' with 'xstrdup'. diff.c: fixup garding of config parser from value=NULL
2008-02-16hg-to-git: fix parent analysisStelian Pop
Fix a bug in the hg-to-git convertor introduced by commit 1bc7c13af9f936aa80893100120b542338a10bf4: when searching the changeset parents, 'hg log' returns an extra space at the end of the line, which confuses the .split(' ') based tokenizer: Traceback (most recent call last): File "hg-to-git.py", line 123, in <module> hgchildren[mparent] += ( str(cset), ) KeyError: '' Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11git-blame.el: show the when, who and what in the minibuffer.Junichi Uekawa
Change the default operation to show 'when (day the commit was made), who (who made the commit), what (what the commit log was)' in the minibuffer instead of SHA1 and title of the commit log. Since the user may prefer other displaying options, it is made as a user-configurable option. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Better handling of subprocess errors.Alexandre Julliard
Where possible, capture the output of the git command and display it if the command fails. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Check for existing buffers on revert.Alexandre Julliard
Refuse to revert a file if it is modified in an existing buffer but not saved. On success, revert the buffers that contains the files that have been reverted. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Added a command to amend a commit.Alexandre Julliard
It reverts the commit and sets up the status and edit log buffer to allow making changes and recommitting it. Bound to C-c C-a. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-08git.el: Support for showing unknown/ignored directories.Alexandre Julliard
Instead of recursing into directories that only contain unknown files, display only the directory itself. Its contents can be expanded with git-find-file (bound to C-m). Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-07git-p4: Fix indentation from tab to spacesToby Allsopp
Signed-off-by: Toby Allsopp <toby.allsopp@navman.co.nz>
2008-02-07Improve bash prompt to detect various states like an unfinished mergeRobin Rosenberg
This patch makes the git prompt (when enabled) show if a merge or a rebase is unfinished. It also detects if a bisect is being done as well as detached checkouts. An uncompleted git-am cannot be distinguised from a rebase (the non-interactive version). Instead of having an even longer prompt we simply ignore that and hope the power users that use git-am knows the difference. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>
2008-02-03git-p4: Fix an obvious typoTommy Thorn
The regexp "$," can't match anything. Clearly not intended. This was introduced in ce6f33c8 which is quite a while ago. Signed-off-by: Tommy Thorn <tommy-git@thorn.ws> Acked-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-03git-p4: Ensure the working directory and the index are clean before "git-p4 ↵Simon Hausmann
rebase" Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-03git-p4: Fix submit user-interface.Simon Hausmann
Don't ask any questions when submitting, behave similar to git-svn dcommit. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-02-03Remove $Id: ..$ $Header: ..$ etc from +ko and +k files during importJason McMullan
This patch removes the '$Keyword: ...$' '...' data, so that files don't have spurious megre conflicts between branches. Handles both +ko and +k styles, and leaves the '$Foo$' in the original file. Signed-off-by: Simon Hausmann <simon@lst.de>
2008-01-20Update git-completion for new 'remote rm' optionDan McGee
Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18Officially deprecate repo-config.Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-16hg-to-git: improve popen callsMark Drago
This patch improves all of the popen calls in hg-to-git.py by specifying the template 'hg log' should use instead of calling 'hg log' and grepping for the desired data. Signed-off-by: Mark Drago <markdrago@gmail.com> Acked-by: Stelian Pop <stelian@popies.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-14Remove usage of git- (dash) commands from email hookDan McGee
Switch all git command calls to use the git (space) command format, and remove the use of git-repo-config in place of git config. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-09git.el: Make status refresh faster.Alexandre Julliard
Don't set the needs-refresh flag when inserting a new file info, since ewoc refreshes it upon insert already; this makes a full refresh twice as fast. Also make git-fileinfo-prettyprint a little faster by not retrieving permission values twice. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-09git.el: Refresh files from their real state upon commit.Alexandre Julliard
Instead of just setting the state to up-to-date, retrieve the full state again, so that the file type can be displayed properly. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-09git.el: Make sure we never insert the same file twice.Alexandre Julliard
Skip non-zero stage files during git-ls-files -c, they are handled later. Also fix git-insert-info-list to merge duplicate file names. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07git.el: Display file types and type changes.Alexandre Julliard
Handle the T status from git-diff-index to display type changes between file/symlink/subproject. Also always show the file type for symlink and subprojects to indicate that they are not normal files. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07git.el: Retrieve the permissions for up-to-date files.Alexandre Julliard
This allows displaying correctly the executable flag for the initial commit, and will make it possible to show the file type for up-to-date symlinks and subprojects. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-07git.el: Support for getting diffs from inside the log-edit buffer.Alexandre Julliard
Take advantage of the new log-edit feature that allows to show a diff with C-c C-d while editing the log message. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-27contrib: resurrect scripted git-revert.Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16teach bash completion to treat commands with "--" as a helperJeff King
There is a convention that commands containing a double-dash are implementation details and not to be used by mortals. We should automatically remove them from the completion suggestions as such. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-11git.el: Added a menu for git-status-mode.Alexandre Julliard
Originally written by Rémi Vanicat, I just changed the layout a little. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06hg-to-git: handle an empty dir in hg.Junio C Hamano
Mark Drago had a subversion repository which was then converted to hg and now is moving in to git. The first commit in the svn repo was just the creation of the empty directory. This made its way in to the hg repository fine, but converting from hg to git would cause an error. The problem was that hg-to-git.py tries to commit the change, git-commit fails, and then hg-to-git.py tries to checkout the new revision and that fails (because it was not created). This may have only caused an error because it was the first commit in the repository. If an empty directory was added in the middle of the repo somewhere things might have worked out fine. This patch will use the new --allow-empty option to git-commit to record such an "empty" commit, to reproduce the history recorded in hg more faithfully. Tested-by: Mark Drago <markdrago@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05Merge branch 'kh/commit'Junio C Hamano
* kh/commit: (33 commits) git-commit --allow-empty git-commit: Allow to amend a merge commit that does not change the tree quote_path: fix collapsing of relative paths Make git status usage say git status instead of git commit Fix --signoff in builtin-commit differently. git-commit: clean up die messages Do not generate full commit log message if it is not going to be used Remove git-status from list of scripts as it is builtin Fix off-by-one error when truncating the diff out of the commit message. builtin-commit.c: export GIT_INDEX_FILE for launch_editor as well. Add a few more tests for git-commit builtin-commit: Include the diff in the commit message when verbose. builtin-commit: fix partial-commit support Fix add_files_to_cache() to take pathspec, not user specified list of files Export three helper functions from ls-files builtin-commit: run commit-msg hook with correct message file builtin-commit: do not color status output shown in the message template file_exists(): dangling symlinks do exist Replace "runstatus" with "status" in the tests t7501-commit: Add test for git commit <file> with dirty index. ...
2007-12-04contrib: Make remotes2config.sh script more robustJakub Narebski
The remotes2config.sh script replaced all 'unsafe' characters in repo name with '.'; include '-' in the 'safe' characters set (the set is probably even larger). Script required also space after "URL:", "Push:" and "Pull:" in remotes file. This for example made the following remote URL: git://git.kernel.org/pub/scm/git/git.git Pull: refs/heads/master:refs/heads/origin Pull:+refs/heads/pu:refs/heads/pu miss 'pu' branch (forced branch) in config file after conversion. Allow for any number of whitespace after "URL:", "Push:", "Pull:". Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-29Merge branch 'maint'Junio C Hamano
* maint: scripts: do not get confused with HEAD in work tree Improve description of git-branch -d and -D in man page.
2007-11-29bash completion: add diff optionsJohannes Schindelin
I use "git diff" (the porcelain) really often, and am almost as often annoyed that the completions do not know how to complete something simple as --cached. Now they do. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-25Merge branch 'jk/send-pack'Junio C Hamano
* jk/send-pack: (24 commits) send-pack: cluster ref status reporting send-pack: fix "everything up-to-date" message send-pack: tighten remote error reporting make "find_ref_by_name" a public function Fix warning about bitfield in struct ref send-pack: assign remote errors to each ref send-pack: check ref->status before updating tracking refs send-pack: track errors for each ref git-push: add documentation for the newly added --mirror mode Add tests for git push'es mirror mode Update the tracking references only if they were succesfully updated on remote Add a test checking if send-pack updated local tracking branches correctly git-push: plumb in --mirror mode Teach send-pack a mirror mode send-pack: segfault fix on forced push Reteach builtin-ls-remote to understand remotes send-pack: require --verbose to show update of tracking refs receive-pack: don't mention successful updates more terse push output Build in ls-remote ...
2007-11-25Merge branch 'sb/clean'Junio C Hamano
* sb/clean: Teach git clean to use setup_standard_excludes() git-clean: Fix error message if clean.requireForce is not set. Make git-clean a builtin
2007-11-23Port git commit to C.Kristian Høgsberg
This makes git commit a builtin and moves git-commit.sh to contrib/examples. This also removes the git-runstatus helper, which was mostly just a git-status.sh implementation detail. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22git-merge-ours: make it a builtin.Thomas Harning
Except that this fixes a longstanding corner case bug by tightening the way underlying diff-index command is run, it is functionally equivalent to the scripted version. Signed-off-by: Thomas Harning Jr <harningt@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>