Araxis merge is now a built-in diff/merge tool.
This adds araxis to git-completion and updates
the documentation to mention araxis.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add a comment showing how to include a web link (i.e. gitweb/cgit)
and a patch in the email that is sent for each pushed commit.
The quoting was tricky enough that it's worth documenting. To add
two blank lines (i.e. put \n\n in the printf), you would need to
say \\\\n\\\\n, and in the end, the pair of "echo" statements seemed
better. This is used in glibc.git repository:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary
push-triggered messages have been sent to this list since May 21:
http://sourceware.org/ml/glibc-cvs/2009-q2/
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
grep: fix word-regexp colouring
completion: use git rev-parse to detect bare repos
Cope better with a _lot_ of packs
for-each-ref: fix segfault in copy_email
Its check is more robust than a config check for core.bare
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* mh/show-branch-color:
bash completion: show-branch color support
show-branch: color the commit status signs
Conflicts:
contrib/completion/git-completion.bash
* maint:
completion: add missing options to show-branch and show
dir.c: clean up handling of 'path' parameter in read_directory_recursive()
Fix type-punning issues
Add --oneline and --abbrev-commit to show and --sparse to show-branch.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
test: checkout shouldn't say that HEAD has moved if it didn't
completion: enhance "current branch" display
completion: simplify "current branch" in __git_ps1()
completion: fix PS1 display during a merge on detached HEAD
builtin-checkout: Don't tell user that HEAD has moved before it has
pre-commit.sample: don't print incidental SHA1
tests: Add tests for missing format-patch long options
api-parse-options.txt: use 'func' instead of 'funct'
Turn on USE_ST_TIMESPEC for OpenBSD
ls-tree manpage: output of ls-tree is compatible with update-index
ls-tree manpage: use "unless" instead of "when ... is not"
Introduce GIT_PS1_DESCRIBE option you can set to "contains", "branch", or
"describe" to tweak the way how a detached HEAD is described.
The default behaviour is to describe only exact match with some tag
(otherwise use the first 7 hexdigits) as before.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
As I very often work on a detached HEAD, I found it pretty confusing
when __git_ps1() said 'some-name'. Did I create a branch with that name
by mistake, or do I happen to be on a commit with that exact tag?
This patch fixes the issue by enclosing non branch names in a pair of
parentheses when used to substitute %s token in __git_ps1() argument.
It also fixes a small bug where the branch part is left empty when
.git/HEAD is unreadable for whatever reason. The output now says
"(unknown)".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If your merge stops in a conflict while on a detached HEAD, recent
completion code fails to show anything. This was because various cases
added to support the operation-in-progress markers (e.g. REBASE, MERGING)
forgot that they need to set the variable "b" to something for the result
they computed to be displayed at all.
Probably not many people make trial merges on a detached HEAD (which is
tremendously useful feature of git, by the way), and that may be why this
was not noticed for a long time.
Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This makes it easier for users to get and unset their configuration
variables without having to open documentation or dig through their
configuration file.
__git_config_get_set_variables() retrieves the set configuration
variables from the appropriate configuration file. For example, if
the user has previously specified --global only the global variables
are returned. The same applies for --system, and --file. If no
location has been specified, all set variables are returned.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completion for --confirm, --suppress-cc, and --smtp-encryption
command line arguments. Add completion for aliasfiletype and confirm
configuration variables.
Since --smtp-ssl is deprecated, replace it with --smtp-encryption and
the two options ssl and tls.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add raw to the date formats too.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Essentially; s/type* /type */ as per the coding guidelines.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This implements completion of --color and --no-color for "git
show-branch" and color.showbranch for "git config".
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* da/difftool:
mergetool--lib: simplify API usage by removing more global variables
Fix misspelled mergetool.keepBackup
difftool/mergetool: refactor commands to use git-mergetool--lib
mergetool: use $( ... ) instead of `backticks`
bash completion: add git-difftool
difftool: add support for a difftool.prompt config variable
difftool: add various git-difftool tests
difftool: move 'git-difftool' out of contrib
difftool/mergetool: add diffuse as merge and diff tool
difftool: add a -y shortcut for --no-prompt
difftool: use perl built-ins when testing for msys
difftool: remove the backup file feature
difftool: remove merge options for opendiff, tkdiff, kdiff3 and xxdiff
git-mergetool: add new merge tool TortoiseMerge
git-mergetool/difftool: make (g)vimdiff workable under Windows
doc/merge-config: list ecmerge as a built-in merge tool
This adds completion for difftool's --tool flag.
The known diff tool names were also consolidated into
a single variable.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This prepares 'git-difftool' and its documentation for
mainstream use.
'git-difftool-helper' became 'git-difftool--helper'
since users should not use it directly.
'git-difftool' was added to the list of commands as
an ancillaryinterrogator.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This adds diffuse as a built-in merge tool.
Signed-off-by: Sebastian Pipping <sebastian@pipping.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is another consistency cleanup to make git-difftool's options
match git-mergetool.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I don't even know what $COMSPEC means so let's be safe and use the
same perly $^O test add--interactive uses. While we're at it, make
git-difftool match the prevalent git-perl style.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Most users find the backup file feature annoying and there's no
need for it since diff is supposed to be a read-only operation.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We shouldn't try to merge files when using difftool, so remove
any merge-specific options.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Under Windows vimdiff and gvimdiff are not available as symbolic links,
but as batch files vimdiff.bat and gvimdiff.bat. These files weren't
found by 'type vimdiff' which led to the following error:
The merge tool vimdiff is not available as 'vimdiff'
Even if they were found, it wouldn't work to invoke these batch files
from git-mergetool.
To solve this, use vim and gvim (vim.exe and gvim.exe) and pass the -d
command line switch over to them.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This adds --committer-date-is-author-date, --ignore-date, and --no-utf8
options. The --binary option is removed, as it was made a no-op by
cb3a160. The option list is also sorted alphabetically.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This can be used in GUIs to open installed HTML documentation in the
browser.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Update draft release notes to 1.6.2.2
Fix bash completion in path with spaces
bash completion: only show 'log --merge' if merging
git-tag(1): add hint about commit messages
Documentation: update graph api example.
* maint-1.6.1:
Fix bash completion in path with spaces
bash completion: only show 'log --merge' if merging
git-tag(1): add hint about commit messages
Documentation: update graph api example.
Conflicts:
contrib/completion/git-completion.bash
* maint-1.6.0:
Fix bash completion in path with spaces
bash completion: only show 'log --merge' if merging
git-tag(1): add hint about commit messages
Documentation: update graph api example.
Signed-off-by: Daniel Cheng (aka SDiZ) <j16sdiz+freenet@gmail.com>
Trivially-acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The gitk completion only shows --merge if MERGE_HEAD is present.
Do it the same way for git-log completion.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Embarrassingly, the common prefix calculation did not work properly, due
to a mistake in the assignment: instead of assigning the dirname of the
current file name, the dirname of the current common prefix needs to
be assigned to common prefix, when the current prefix does not match the
current file name.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The --staged option (synonym for --cached) isn't listed in the
completion choices for git diff. This tiny patch adds it.
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The import-tars script is typically employed to (re)create the past
history of a project from stored tars. Although assigning authorship in
these cases can be a somewhat arbitrary process, it makes sense to set
the author to whoever created the tars in the first place (if it's
known), and (s)he can in general be different from the committer
(whoever is running the script).
Implement this by having separate author and committer data, making them
settable from the usual GIT_* environment variables.
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* js/remote-improvements: (23 commits)
builtin-remote.c: no "commented out" code, please
builtin-remote: new show output style for push refspecs
builtin-remote: new show output style
remote: make guess_remote_head() use exact HEAD lookup if it is available
builtin-remote: add set-head subcommand
builtin-remote: teach show to display remote HEAD
builtin-remote: fix two inconsistencies in the output of "show <remote>"
builtin-remote: make get_remote_ref_states() always populate states.tracked
builtin-remote: rename variables and eliminate redundant function call
builtin-remote: remove unused code in get_ref_states
builtin-remote: refactor duplicated cleanup code
string-list: new for_each_string_list() function
remote: make match_refs() not short-circuit
remote: make match_refs() copy src ref before assigning to peer_ref
remote: let guess_remote_head() optionally return all matches
remote: make copy_ref() perform a deep copy
remote: simplify guess_remote_head()
move locate_head() to remote.c
move duplicated ref_newer() to remote.c
move duplicated get_local_heads() to remote.c
...
Conflicts:
builtin-clone.c
Some users have different mergetool and difftool settings, so teach
difftool to read config vars from the difftool.* namespace. This allows
having distinct configurations for the diff and merge scenarios.
We don't want to force existing users to set new values for no reason
so difftool falls back to existing mergetool config variables when the
difftool equivalents are not defined.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some users have tabs in their names, oddly enough. This
causes problems when loading the usercache from disk,
as split separates the fields on the wrong tabs. When
fast-import's parse_ident() tries to parse the committer
field, it is unhappy about the unbalanced <..> angle brackets.
It is easy enough to convert the tabs to single spaces.
Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fetch, pull, and push didn't know their options. They do now. merge's
options are factored into a variable so they can be shared between
_git_merge and _git_pull
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The code to complete --strategy was duplicated between _git_rebase and
_git_merge, and is about to gain a third caller (_git_pull). This patch
factors it into its own function.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sverre Rabbelier noticed a completion issue with push:
$ git push ori<tab>
git push origin
$ git push -f ori<tab>
git push -f origin/
Markus Heidelberg pointed out that the issue extends to fetch and pull.
The reason is that the current code naively assumes that if
COMP_CWORD=2, it should complete a remote name, otherwise it should
complete a refspec. This assumption fails if there are any --options.
This patch fixes that issue by instead scanning COMP_CWORDS to see if
the remote has been completed yet (we now assume the first non-dashed
argument is the remote). The new logic is factored into a function,
shared by fetch, pull, and push.
The new function also properly handles '.' as the remote.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* ns/pretty-format:
bash completion: add --format= and --oneline options for "git log"
Add tests for git log --pretty, --format and --oneline.
Add --oneline that is a synonym to "--pretty=oneline --abbrev-commit"
Give short-hands to --pretty=tformat:%formatstring
Add --format that is a synonym to --pretty
* tp/completion:
Fixup: Add bare repository indicator for __git_ps1
Add bare repository indicator for __git_ps1
completion: More fixes to prevent unbound variable errors
completion: Better __git_ps1 support when not in working directory
completion: Use consistent if [...] convention, not "test"
completion: For consistency, change "git rev-parse" to __gitdir calls
Provide a porcelain command for setting and deleting
$GIT_DIR/remotes/<remote>/HEAD.
While we're at it, document what $GIT_DIR/remotes/<remote>/HEAD is all
about.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We also add --format= completion for "git show".
Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Marius Storm-Olsen <git@storm-olsen.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After these changes, git-svnimport worked fine for me.
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this otherwise would create.
Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Prefixes the branch name with "BARE:" if you're in a
bare repository.
Signed-off-by: Marius Storm-Olsen <git@storm-olsen.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This avoids a possibly redundant sort in git-update-status-files and
git-status-filenames-map, and allows callers to continue using the
list without having to copy it.
It also fixes the confusing success messages reported by Brent
Goodrick.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The gitk completion only shows --merge if MERGE_HEAD is present.
Do it the same way for git-log completion.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Refactor options that are useful for more than one of them into a
variable used by the relevant completions. This has the effect of
adding the following options to git-log:
--branches --tags --remotes --first-parent --dense --sparse
--simplify-merges --simplify-by-decoration --first-parent
--no-merges
The following to git-shortlog:
--branches --tags --remotes --first-parent
And the following to gitk:
--branches --tags --remotes --first-parent --no-merges --max-count=
--max-age= --since= --after= --min-age= --until= --before= --dense
--sparse --full-history --simplify-merges --simplify-by-decoration
--left-right
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'git svn' got some new subcommands and otions in the last couple of
months. This patch adds completion support for them.
In particular:
* 'fetch', 'clone', etc.: '--ignore-paths='
* 'init' and 'clone': '--prefix=', '--use-log-author',
'--add-author-from'
* 'dcommit': '--commit-url', '--revision'
* 'log': '--color'
* 'rebase': '--dry-run'
* 'branch', 'tag', 'blame', 'migrate' subcommands and their options
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Namely: '--commit', '--stat', '--no-squash', '--ff', '--no-ff'.
One might wonder why add options that specify the default behaviour
anyway (e.g. '--commit', '--no-squash', etc.). Users can override the
default with config options (e.g. 'branch.<name>.mergeoptions',
'merge.log'), but sometimes might still need the default behaviour.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Several functions make use of "[-n ...]" and "[-z ...]". In many cases,
the variables being tested were declared with "local."
However, several __variables are not, and so they must be replaced with
their ${__-} equivalents.
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>
If .git/HEAD is not readable, __git_ps1 does nothing.
If --is-in-git-dir, __git_ps1 returns " (GIT_DIR!)" as a cautionary
note. The previous behavior would show the branch name (and would
optionally attempt to determine the dirtyState of the directory, which
was impossible because a "git diff" was used).
If --is-in-work-tree, __git_ps1 returns the branch name. Additionally,
if showDirtyState is on, the dirty state is displayed.
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>
The local coding convention in bash completion is to use [...] rather
than test. Additionally,
if [...]; then
is preferred over
if [...]
then
and so matching "if [...]\nthen" were changed accordingly.
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>
In the show_new_revisions function, the original code:
git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
isn't quite right since one can create a new branch and push it
without any new commits. In that case, two refs will have the same
sha1 but both would get filtered by the 'grep'. In the end, we'll
show ALL the history which is not what we want. Instead, we should
list the branches by name and remove the branch being updated and THEN
pass that list through rev-parse.
Revised as suggested by Jakub Narebski and Junio C Hamano to use
git-for-each-ref instead of git-branch. (Thanks!)
Signed-off-by: Pat Notz <pknotz@sandia.gov>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
vc-git is distributed with Emacs since version 22.2, and is maintained
in the Emacs CVS tree. This file is obsolete and causes trouble for
people who want to add contrib/emacs to their load-path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This allows using fill-paragraph on the log message without
interference from the various header fields.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Support for cherry-picking and reverting commits, with automatic
formatting of the commit log message. Bound to C-c C-p and C-c C-v
respectively.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Prompts for a branch name, create a new branch at HEAD and switch to
it. Bound to C-c C-b by default.
Based on a patch by Rémi Vanicat <vanicat@debian.org>.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Prompts for a branch name and checks it out. Bound to C-c C-o by
default.
Based on a patch by Rémi Vanicat <vanicat@debian.org>.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Add a tool 'git-resurrect.sh <branch>' that tries to find traces of
the <branch> in the HEAD reflog and, optionally, all merge commits in
the repository. It can then resurrect the branch, pointing it at the
most recent of all candidate commits found.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add a bit of code to __git_ps1 that lets it append '*' to the branch
name if there are any unstaged changes, and '+' if there are any
staged changes.
Since this is a rather expensive operation and will force a lot of
data into the cache whenever you first enter a repository, you have to
enable it manually by setting GIT_PS1_SHOWDIRTYSTATE to a nonempty
value. The configuration variable bash.showDirtyState can then be
used to disable it again for some repositories.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git difftool listed some candidates for mergetools twice, depending on
the environment.
This slightly changes the behavior when both KDE_FULL_SESSION and
GNOME_DESKTOP_SESSION_ID are set at the same time; in such a case
meld is used in favor of kdiff3 (the old code favored kdiff3 in such a
case), but it should not matter in practice.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When interrupting git-difftool with Ctrl-C, the output of this echo
command led to having the cursor at the beginning of the line below the
shell prompt.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-difftool worked for me on an up-to-date Gentoo Linux at home, but
didn't work on a somewhat older Ubuntu Linux 7.10 at work and failed
with the following error, where 'Makefile' was locally modified:
trap: 244: SIGINT: bad trap
external diff died, stopping at Makefile.
In 'man 1p trap' there is written:
"The condition can be EXIT, 0 (equivalent to EXIT), or a signal
specified using a symbolic name, without the SIG prefix, [...]"
"Implementations may permit names with the SIG prefix or ignore case
in signal names as an extension."
So now we do it the POSIX compliant way instead of using an extension.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff, log and show all take the same diff options. Refactor them from
__git_diff and __git_log into a variable, and complete them in
__git_show too.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Move the options --pickaxe-all and --pickaxe-regex to git-log, where
they make more sense than with git-diff.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
You only need to edit worktree files when comparing against
the worktree. Put the cursor automatically into its window for
vimdiff and gvimdiff to avoid doing <C-w>l every time.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch makes the difftool docs always refer to the
git-difftool script using the dashed form of the name.
Only command examples use the non-dashed form now.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
By default git-svn stores timestamps of fetched commits in
Subversion's UTC format. Passing --localtime to fetch will convert
them to the timezone of the server on which git-svn is run.
This makes the timestamps of a resulting "git log" agree with what
"svn log" shows for the same repository.
Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
'git difftool' is a git command that allows you to compare and edit files
between revisions using common merge tools. 'git difftool' does what
'git mergetool' does but its use is for non-merge situations such as
when preparing commits or comparing changes against the index.
It uses the same configuration variables as 'git mergetool' and
provides the same command-line interface as 'git diff'.
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Both 'git log' and 'show' have the same '--pretty=<format>' option
with the same formats. So refactor these formats into a common
variable.
While at it, also add 'format:' to the list.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
__gitcomp takes care of it since 5447aac7 (bash: fix long option with
argument double completion, 2008-03-05)
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
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>
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>
Vim's SVN repository doesn't offer the latest runtime files, since
normally they are only updated there on a release. Though currently
there is no difference between the SVN and HTTP/FTP version of the git
syntax files.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We attempt to give an explanation of the status of the files in this
directory.
Signed-off-by: jidanni <jidanni@jidanni.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Trivially-Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge two hunks if there is only the specified number of otherwise unshown
context between them. For --inter-hunk-context=1, the resulting patch has
the same number of lines but shows uninterrupted context instead of a
context header line in between.
Patches generated with this option are easier to read but are also more
likely to conflict if the file to be patched contains other changes.
This patch keeps the default for this option at 0. It is intended to just
make the feature available in order to see its advantages and downsides.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Unify all
fatal: Not a git repository
error messages so they include path information.
Signed-off-by: Richard Hartmann <richih@net.in.tum.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add 'normal' to config color options.
Add 'mergeoptions' to branch config options.
Add 'proxy' and 'mirror' to remote config options.
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sort the config variables to make sync-ing them with
Documents/config.txt easier in the future.
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Unfortunately, I introduced a bug in commit 7f705dc36 (git-p4: Fix bug in
p4Where method). This happens because sometimes the result from
"p4 where <somepath>" doesn't contain a "depotFile" key, but instead a
"data" key that needs further parsing. This commit should ensure that both
of these cases are checked.
Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When running:
p4 where //depot/SomePath/...
The result can in some situations look like:
//depot/SomePath/... //client/SomePath/... /home/user/p4root/SomePath/...
-//depot/SomePath/UndesiredSubdir/... //client/SomePath/UndesiredSubdir/... /home/user/p4root/SomePath/UndesiredSubdir/...
This depends on the users Client view. The current p4Where method will now
return /home/user/p4root/SomePath/UndesiredSubdir/... which is not what we
want. This patch loops through the results from "p4 where", and picks the one
where the depotFile exactly matches the given depotPath (//depot/SomePath/...
in this example).
Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
sha1_file.c: resolve confusion EACCES vs EPERM
sha1_file: avoid bogus "file exists" error message
git checkout: don't warn about unborn branch if -f is already passed
bash: offer refs instead of filenames for 'git revert'
bash: remove dashed command leftovers
git-p4: fix keyword-expansion regex
fast-export: use an unsorted string list for extra_refs
Add new testcase to show fast-export does not always exports all tags
The completion script for 'git revert' currently offers options and
filenames. However, 'git revert' doesn't take any filenames from the
command line, but a single commit. Therefore, it's more sane to offer
refs instead.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sometimes it's handy to complete full refs, e.g. the user has some
refs outside of refs/{heads,remotes,tags} or the user wants to
complete some git command's special refs (like 'git show
refs/bisect/bad').
To do that, we check whether the ref to be completed starts with
'refs/' or is 'refs' (to reduce the risk of matching 'refs-'). If it
does, then we offer full refs for completion; otherwise everything
works as usual.
This way the impact on the common case is fairly small (hopefully not
many users have branches or tags starting with 'refs'), and in the
special case the cost of typing out 'refs' is bearable.
While at it, also remove the unused 'cmd' variable from '__git_refs'.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit 5a625b07 (bash: remove fetch, push, pull dashed form leftovers,
2008-10-03) did that already, but there were still some git-cmd left
here and there.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This text:
my $dir = $File::Find::dir;
return if ($dir !~ m,$options->{dirpat}$,);
was improperly converted to:
my $dir = $File$dir !~ m,$options->{dirpat}$,);
by the keyword identifier expansion code. Add a \n
to make sure the regex doesn't go across end-of-line
boundaries.
Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This avoids the need to go through the list twice, which helps
performance on large file lists.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This allows to insert a file in the buffer no matter what its state
is, making it possible for instance to remove an up-to-date file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Use a single Merge: header instead of one Parent: header for each
parent, and don't list the current HEAD as a merged head. Support
symbolic references too.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Display all errors happening in the various subcommands of the commit
sequence, and abort on any error.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This makes git-p4 noticibly faster on Windows.
Signed-off-by: John Chapman <thestar@fussycoder.id.au>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Purged files are handled as if they are merely deleted, which is not
entirely optimal, but I don't know of any other way to handle them.
File data is deleted from memory as early as they can, and they are more
efficiently handled, at (significant) cost to CPU usage.
Still need to handle p4 branches with spaces in their names.
Still need to make git-p4 clone more reliable.
- Perhaps with a --continue option. (Sometimes the p4 server kills
the connection)
Signed-off-by: John Chapman <thestar@fussycoder.id.au>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add configuration option hooks.showrev, letting the user override how
revisions will be shown in the commit email.
Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The display of a revision in an email-appropriate format is done in
two places with similar code. In preparation for making that display
more complex, move it into a separate function that handles both cases.
Signed-off-by: Pete Harlan <pgit@pcharlan.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
git-svn: change dashed git-commit-tree to git commit-tree
Documentation: clarify information about 'ident' attribute
bash completion: add doubledash to "git show"
Use test-chmtime -v instead of perl in t5000 to get mtime of a file
Add --verbose|-v to test-chmtime
asciidoc: add minor workaround to add an empty line after code blocks
Plug a memleak in builtin-revert
Add file delete/create info when we overflow rename_limit
Install git-cvsserver in $(bindir)
Install git-shell in bindir, too
Completion for new workflow documentation introduced in f948dd8
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Hopefully the final draft release notes update before 1.6.0.3
diff(1): clarify what "T"ypechange status means
contrib: update packinfo.pl to not use dashed commands
force_object_loose: Fix memory leak
tests: shell negation portability fix
* maint:
t1301-shared-repo.sh: don't let a default ACL interfere with the test
git-check-attr(1): add output and example sections
xdiff-interface.c: strip newline (and cr) from line before pattern matching
t4018-diff-funcname: demonstrate end of line funcname matching flaw
t4018-diff-funcname: rework negated last expression test
Typo "does not exists" when git remote update remote.
remote.c: correct the check for a leading '/' in a remote name
Add testcase to ensure merging an early part of a branch is done properly
Conflicts:
t/t7600-merge.sh
* mw/sendemail:
bash completion: Add --[no-]validate to "git send-email"
send-email: signedoffcc -> signedoffbycc, but handle both
Docs: send-email: Create logical groupings for man text
Docs: send-email: Create logical groupings for --help text
Docs: send-email: Remove unnecessary config variable description
Docs: send-email: --chain_reply_to -> --[no-]chain-reply-to
send-email: change --no-validate to boolean --[no-]validate
Docs: send-email: Man page option ordering
Docs: send-email usage text much sexier
Docs: send-email's usage text and man page mention same options
* maint:
Update release notes for 1.6.0.3
Teach rebase -i to honor pre-rebase hook
docs: describe pre-rebase hook
do not segfault if make_cache_entry failed
make prefix_path() never return NULL
fix bogus "diff --git" header from "diff --no-index"
Fix fetch/clone --quiet when stdout is connected
builtin-blame: Fix blame -C -C with submodules.
bash: remove fetch, push, pull dashed form leftovers
Conflicts:
diff.c
We don't provide complation for git-commands in dashed form anymore,
so there is no need to keep those cases.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Tested-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv>
Acked-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
As of version 7.2, vim ships with its own syntax
highlighting for git commit messages, which is:
1. more comprehensive in splitting up the various
components of the file
2. in accordance with the usual vim behavior for syntax
highlighting (e.g., respecting b:current_syntax)
3. presumably better maintained (I have not been using
what's in git's contrib/ directory for some time in
favor of the upstream version)
Furthermore, vim upsream also provides syntax highlighting
for other git filetypes (gitconfig, rebase, send-email).
This patch gets rid of our local version and just points
interested parties to the upstream version.
The code for auto-detecting filetypes is taken from vim's
runtime/filetype.vim.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This script takes a range of commits (e.g. maint..next) as its arguments,
recreates merge commits in the range to prime rr-cache database.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Using this format simplifies the code for completing refs and (in some
cases) improves performance significantly.
For repositories like the current git.git (with more than 200 refs)
there is no real performance difference, but for a repository with 2000
refs the total time needed to complete the refs is reduced by ~25% (from
around 400ms to around 305ms).
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jc/maint-log-grep:
log --author/--committer: really match only with name part
diff --cumulative is a sub-option of --dirstat
bash completion: Hide more plumbing commands
git <tab><tab> still shows way too many commands, some of them
are clearly plumbing. This patch hides the plumbing commands
liberally (that is, in special cases, users still might want to
call one of the hidden commands, a *normal* workflow should never
involve these, though - and if it does, we have a UI problem anyway).
Signed-off-by: Petr Baudis <pasky@suse.cz>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When this option is passed to git p4 clone, the checkout at the end would
previously fail. This patch fixes it by optionally creating the master branch
from refs/heads/p4/master, which is the correct one for this option.
Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Acked-By: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently it is not possible to skip the submission of a change to Perforce
when running git-p4 submit. This patch compares the modification time before
and after the submit editor invokation and offers a prompt for skipping if
the submit template file was not saved.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch massages the documentation a bit for improved readability and cleans
it up from outdated options/commands.
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The function built a p4 command string via the p4_build_cmd function, but
ignored the result.
Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
"git-merge" is a binary executable these days, and looking for assignment
to $all_strategies variable with grep/sed does not work well.
When asked for an unknown strategy, pre-1.6.0 and post-1.6.0 "git merge"
commands respectively say:
$ $HOME/git-snap-v1.5.6.5/bin/git merge -s help
available strategies are: recur recursive octopus resolve stupid ours subtree
$ $HOME/git-snap-v1.6.0/bin/git merge -s help
Could not find merge strategy 'help'.
Available strategies are: recursive octopus resolve ours subtree.
both on their standard error stream. We can use this to learn what
strategies are supported.
The sed script is written in such a way that it catches both old and new
message styles ("Available" vs "available", and the full stop at the end).
It also allows future versions of "git merge" to line-wrap the list of
strategies, and add extra comments, like this:
$ $HOME/git-snap-v1.6.1/bin/git merge -s help
Could not find merge strategy 'help'.
Available strategies are: blame recursive octopus resolve ours
subtree.
Also you have custom strategies: theirs
Make sure you spell strategy names correctly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* ak/p4:
Utilise our new p4_read_pipe and p4_write_pipe wrappers
Add p4 read_pipe and write_pipe wrappers
Put in the two other configuration elements found in the source
Put some documentation in about the parameters that have been added
Move git-p4.syncFromOrigin into a configuration parameters section
Consistently use 'git-p4' for the configuration entries
If the user has configured various parameters, use them.
Switch to using 'p4_build_cmd'
If we are in verbose mode, output what we are about to run (or return)
Add a single command that will be used to construct the 'p4' command
Utilise the new 'p4_system' function.
Have a command that specifically invokes 'p4' (via system)
Utilise the new 'p4_read_pipe_lines' command
Create a specific version of the read_pipe_lines command for p4 invocations
Conflicts:
contrib/fast-import/git-p4
P4 on Windows expects the PWD environment variable to be set to the
current working dir, but os.chdir in python doesn't do so.
Signed-off-by: Robert Blum <rob.blum@gmail.com>
Acked-by: Simon Hausmann <simon@lst.de>
Acked-by: Han-Wen Nienhuys <hanwen@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Git allows access to the gitattributes man page via `git help attributes`,
but this is not discoverable via the bash-completion mechanism. This
patch adds all current non-command man pages to the completion candidate
list.
Signed-off-by: Marcus Griep <marcus@griep.us>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Two additional wrappers to cover 3 places where we utilise p4 in piped
form. Found by Tor Arvid Lund.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The --tool= long option to "git mergetool" can be completed with:
kdiff3 tkdiff meld xxdiff emerge
vimdiff gvimdiff ecmerge opendiff
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Bring completion up to date with the man page.
Signed-off-by: Eric Raible <raible@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I am not entirely clear what these parameters do but felt it
useful to call them out in the documentation.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some repositories require authentication and access to certain
hosts. Allow git-p4 to pull this information from the configuration
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rather than having three locations where the 'p4' command is built up,
refactor this into the one place. This will, eventually, allow us to
have one place where we modify the evironment or pass extra
command-line options to the 'p4' binary.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Similiar to our 'p4_read_pipe_lines' command, we can isolate
specific changes to the invocation method in the one location
with this change.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now that we have the new command, we can utilise it and then
eventually, isolate any changes required to the one place.
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This will make it easier to isolate changes to how 'p4' is invoked
(whether with parameters or not, etc.).
Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It will never trigger anyway because of the first check, and even if it
would, it would not offer the command line option.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--dry-run
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--cached --deleted --modified --others --ignored
--stage --directory --no-empty-directory --unmerged
--killed --exclude= --exclude-from=
--exclude-per-directory= --exclude-standard
--error-unmatch --with-tree= --full-name
--abbrev --ignored --exclude-per-directory
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--format= --list --verbose
--prefix= --remote= --exec=
The --format= long option can be completed with available formats
and the --remote= can be completed with defined remote repositories.
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add branch subcommand to completions and USAGE for git-stash.sh.
Complete stash names for show, apply, drop, pop, and branch.
Add "--index" long option for apply.
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--edit --mainline --no-edit --no-commit --signoff
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--quiet --bare --template= --shared
--shared={false|true|umask|group|all|world|everybody}
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--dry-run --quiet
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--local --no-hardlinks --shared --reference
--quiet --no-checkout --bare --mirror --origin
--upload-pack --template= --depth
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add completions for all long options specified in the docs
--cached
--text --ignore-case --word-regexp --invert-match
--full-name
--extended-regexp --basic-regexp --fixed-strings
--files-with-matches --name-only
--files-without-match
--count
--and --or --not --all-match
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Options added: --parents --children --full-history
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
completion for git diff-tree was removed in 5cfb4fe
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Rename cached __git_commandlist to __git_porcelain_commandlist and
add __git_all_commandlist that only filters out *--* helpers.
Completions for 'git help' will use the __git_all_commandlist, while
the __git_porcelain_commandlist is used for git command completion.
Users who actually read man pages may want to see help for plumbing
commands.
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commit d773c631 (bash: offer only paths after '--', 2008-07-08) did the
same for several other git commands, but 'git checkout' went unnoticed.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It previously used the same as 'log', but the options are quite
different and the arguments must be single refs (or globs).
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Options added: --cached --dry-run --ignore-unmatch --quiet
Signed-off-by: Lee Marlow <lee.marlow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
In r27729, libsvn introduced an assert which explicitly
forbids searching the tree at "/". Luckily enough, it
still accepts an empty string "" as the starting point.
http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_ra/ra_loader.c?r1=27653&r2=27729
Tested against libsvn0-1.5.0-4mdv2009.0 (needs the fix),
libsvn0-1.4.6-5mdv2008.1 (works anyway)
Signed-off-by: P. Christeas <p_christ@hol.gr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The git-rerere documentation talks about commands that invoke
"git rerere clear" automatically. git am --abort is added and
a typo is fixed additionally.
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
At least, this is true in 2007.2, according to the documentation.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This should have been part of 24a2293 (git-blame.el: show the when, who
and what in the minibuffer., 2008-02-12), that changed from using
--pretty=oneline to --pretty=format:... without terminating newline.
Acked-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
With git-am, it sounds awkward to have the patches in ".git/rebase/",
but for technical reasons, we have to keep the same directory name
for git-am and git-rebase. ".git/rebase-apply" seems to be a good
compromise.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sb/dashless:
Make usage strings dash-less
t/: Use "test_must_fail git" instead of "! git"
t/test-lib.sh: exit with small negagive int is ok with test_must_fail
Conflicts:
builtin-blame.c
builtin-mailinfo.c
builtin-mailsplit.c
builtin-shortlog.c
git-am.sh
t/t4150-am.sh
t/t4200-rerere.sh
* mv/merge-in-c:
reduce_heads(): protect from duplicate input
reduce_heads(): thinkofix
Add a new test for git-merge-resolve
t6021: add a new test for git-merge-resolve
Teach merge.log to "git-merge" again
Build in merge
Fix t7601-merge-pull-config.sh on AIX
git-commit-tree: make it usable from other builtins
Add new test case to ensure git-merge prepends the custom merge message
Add new test case to ensure git-merge reduces octopus parents when possible
Introduce reduce_heads()
Introduce get_merge_bases_many()
Add new test to ensure git-merge handles more than 25 refs.
Introduce get_octopus_merge_bases() in commit.c
git-fmt-merge-msg: make it usable from other builtins
Move read_cache_unmerged() to read-cache.c
Add new test to ensure git-merge handles pull.twohead and pull.octopus
Move parse-options's skip_prefix() to git-compat-util.h
Move commit_list_count() to commit.c
Move split_cmdline() to alias.c
Conflicts:
Makefile
parse-options.c
Since the files generated and used during a rebase are never to be
tracked, they should live in $GIT_DIR. While at it, avoid the rather
meaningless term "dotest" to "rebase", and unhide ".dotest-merge".
This was wished for on the mailing list, but so far unimplemented.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Since only 'git' and 'gitk' are in the user's $PATH now we do not
expect users to need completion support for git-fetch, and expect
they will instead rely upon the completion support for 'git fetch'.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sp/maint-bash-completion-optim:
bash completion: Resolve git show ref:path<tab> losing ref: portion
bash completion: Append space after file names have been completed
Add the following long options to be completed with 'git send-email':
--bcc --cc --cc-cmd --chain-reply-to --compose --dry-run
--envelope-sender --from --identity --in-reply-to
--no-chain-reply-to --no-signed-off-by-cc --no-suppress-from
--no-thread --quiet --signed-off-by-cc --smtp-pass --smtp-server
--smtp-server-port --smtp-ssl --smtp-user --subject --suppress-cc
--suppress-from --thread --to
Short ones like --to and --cc are not usable for actual completion
because of the shortness itself and because there are longer ones which
start with same letters (--thread, --compose). It's still useful to have
these shorter options _listed_ when user presses TAB key after typing
two dashes. It gives user an idea what options are available (and --to
and --cc are probably the most commonly used).
Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Linus reported that the bash completion for git show often dropped
the ref portion of the argument (stuff before the :) when trying
to complete a file name of a file in another branch or tag.
Björn Steinbrink tracked it down to the gvfs completion script
which comes standard on many Fedora Core based systems. That is
removing : from COMP_WORDBREAKS, making readline treat the entire
argument (including the ref) as the name that must be completed.
When the git completion routines supplied a completion of just the
filename, readline replaced everything.
Since Git users often need to use "ref:path" or "ref:ref" sort of
arguments, and expect completion support on both sides of the :
we really want the : in COMP_WORDBREAKS to provide a good user
experience. This is also the default that ships with bash as it
can be useful in other contexts, such as rcp/scp.
We now try to add : back to COMP_WORDBREAKS if it has been removed
by a script that loaded before us. However if this doesn't work
(as the : is stripped after we load) we fallback in the completion
routines to include "ref:" as part of the prefix for completions,
allowing readine to fully insert the argument the user wanted.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When completing `git show origin/maint:Makef<tab>` we should add a
space after the filename has been completed, so that the user can
immediately begin the next argument.
I also added a special case for the symlink variant so we treat it
just like a normal blob, as there are no items below it in the Git
tree structure.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sp/maint-bash-completion-optim:
bash completion: Don't offer "a.." as a completion for "a."
bash completion: Improve responsiveness of git-log completion
If the user is trying to complete "v1.5.3.<tab>" to see all of
the available maintenance releases for 1.5.3 we should not give
them an extra dot as the completion. Instead if the user wants
a ".." or a "..." operator they should key the two dots out on
their own. Its the same number of keystrokes either way.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio noticed the bash completion has been taking a long time lately.
Petr Baudis tracked it down to 72e5e989b ("bash: Add space after
unique command name is completed."). Tracing the code showed
we spent significant time inside of this loop within __gitcomp,
due to the string copying overhead.
[28.146109654] _git common over
[28.164791148] gitrefs in
[28.280302268] gitrefs dir out
[28.300939737] gitcomp in
[28.308378112] gitcomp pre-case
* [28.313407453] gitcomp iter in
* [28.701270296] gitcomp iter out
[28.713370786] out normal
Since __git_refs avoids this string copying by forking and using
echo we use the same trick here when we need to finish generating
the names for the caller.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
Start preparing release notes for 1.5.6.3
git-submodule - Fix bugs in adding an existing repo as a module
bash: offer only paths after '--'
Remove unnecessary pack-*.keep file after successful git-clone
make deleting a missing ref more quiet
This patch also converts the good ole' git-remote.perl to use it.
It is otherwise used in the repo.or.cz machinery and I guess other
scripts might find it useful too.
Unfortunately,
git-ls-remote --heads .
is subtly different from
git-ls-remote . refs/heads/
(since the second matches anywhere in the string, not just at the
beginning) so we have to provide interface for both.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Many git commands use '--' to separate subcommands, options, and refs
from paths. However, the programmable completion for several of these
commands does not respect the '--', and offer subcommands, options, or
refs after a '--', although only paths are permitted. e.g. 'git bisect
-- <TAB>' offers subcommands, 'git log -- --<TAB>' offers options and
'git log -- git<TAB>' offers all gitgui tags.
The completion for the following commands share this wrong behaviour:
am add bisect commit diff log reset shortlog submodule gitk.
To avoid this, we check the presence of a '--' on the command line first
and let the shell do filename completion, if one is found.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mentored-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This is not just nice but necessary since git-frotz is no longer in
PATH.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Check the exit code of the first hg command, and abort to avoid a later
ValueError exception.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This fixes the following warning:
hg-to-git.py:92: DeprecationWarning: raising a string exception is deprecated
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'git stash save' saves local modifications to a new stash, and runs 'git
reset --hard' to revert them to a clean index and work tree. When the
'--keep-index' option is specified, after that 'git reset --hard' the
previous contents of the index is restored and the work tree is updated
to match the index. This option is useful if the user wants to commit
only parts of his local modifications, but wants to test those parts
before committing.
Also add support for the completion of the new option, and add an
example use case to the documentation.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This removes, from the documentation and the bash completion script, the
two config options that were introduced by the git-whatchanged.sh script
and lost in the C rewrite. Today, we can use aliases as an alternative.
Signed-off-by: Olivier Marin <dkr@freesurf.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I'm working with a perforce repo using git-p4. There are some config
files which I need to change locally according to my environment. I'm
using a 'local' git branch to park these changes. And I want to avoid
accidentally checking them into p4 just by doing "git p4 submit"
mindlessly without realizing which branch I'm actually on.
This patch adds a new git config, 'git-p4.allowSubmit', which is a
whitelist of branch names. "git p4 submit" will only allow submissions
from local branches on the list. Useful for preventing inadvertently
submitting from a strictly local branch.
For backward compatibility, if this config is not set at all,
submissions from all branches are allowed.
Signed-off-by: Jing Xue <jingxue@digizenstudio.com>
Acked-By: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The script appp.sh can be used with the External Editor extension for
Mozilla Thunderbird in order to be able to send inline patches in an
easy way.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This reverts commit dbe48256b4, which
caused mis-encoding of non-ASCII author/committer names when the
git-status mode is used to create commits.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This patch adds an option to make hg-to-git quiet by default. Note:
it only suppresses those messages that would be printed when everything
was up-to-date.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If the hook gets invoked with identical old and new ids there
is no change taking place. We probably should not have been
called, but instead of failing silently allow the no-op.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If a user or group ACL file does not exist in the current tip
revision of the acl repository we will get an error from cat-file
when we ask for that blob as it cannot be resolved. A quick look
at the history by rev-list can tell us if there is a path there
or not.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Listing all files in a branch during branch creation is silly;
the user's file-level ACLs probably don't mean anything at this
point. We now treat the base case of 0{40} as an empty diff,
as this happens only when the user is creating the branch and
there are file level ACLs that diff against the old value of
the branch.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* db/clone-in-c:
Add test for cloning with "--reference" repo being a subset of source repo
Add a test for another combination of --reference
Test that --reference actually suppresses fetching referenced objects
clone: fall back to copying if hardlinking fails
builtin-clone.c: Need to closedir() in copy_or_link_directory()
builtin-clone: fix initial checkout
Build in clone
Provide API access to init_db()
Add a function to set a non-default work tree
Allow for having for_each_ref() list extra refs
Have a constant extern refspec for "--tags"
Add a library function to add an alternate to the alternates file
Add a lockfile function to append to a file
Mark the list of refs to fetch as const
Conflicts:
cache.h
t/t5700-clone-reference.sh
Thanks to Johannes Schindelin for various comments and improvements,
including supporting cloning full bundles.
Signed-off-by: Junio C Hamano <gitster@pobox.com>