Commit graph

13844 commits

Author SHA1 Message Date
Junio C Hamano b81a7b5887 Merge branch 'maint'
* maint:
  git-svn: fix find-rev error message when missing arg
  t0021: tr portability fix for Solaris
  launch_editor(): allow spaces in the filename
  git rebase --abort: always restore the right commit
2008-03-11 21:40:47 -07:00
Marc-Andre Lureau ea14e6c554 git-svn: fix find-rev error message when missing arg
Just let the user know that a revision argument is missing instead of
a perl error. This error message mimic the "init" error message, but
could be improved.

Signed-off-by: Marc-Andre Lureau <marcandre.lureau@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 21:20:50 -07:00
Jeff King 7339eb0823 t0021: tr portability fix for Solaris
Solaris' /usr/bin/tr doesn't seem to like multiple character
ranges in brackets (it simply prints "Bad string").

Instead, let's just enumerate the transformation we want.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 21:14:59 -07:00
Johannes Schindelin fc99469a2b launch_editor(): allow spaces in the filename
The construct

	sh -c "$0 \"$@\"" <editor> <file>

does not pick up quotes in <editor>, so you cannot give path to the
editor that has a shell IFS whitespace in it, and also give it initial
set of parameters and flags.  Replace $0 with <editor> to fix this issue.

This fixes

	git config core.editor '"c:/Program Files/What/Ever.exe"'

In other words, you can specify an editor with spaces in its path using a
config containing something like this:

	[core]
		editor = \"c:/Program Files/Darn/Spaces.exe\"

NOTE: we cannot just replace the $0 with \"$0\", because we still want
this to work:

	[core]
		editor = emacs -nw

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 19:57:56 -07:00
Mike Hommey 4201bb5f7e git rebase --abort: always restore the right commit
Previously, --abort would end by git resetting to ORIG_HEAD, but some
commands, such as git reset --hard (which happened in git rebase --skip,
but could just as well be typed by the user), would have already modified
ORIG_HEAD.

Just use the orig-head we store in $dotest instead.

[jc: cherry-picked from 48411d and 4947cf9 on 'master']

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-11 19:30:33 -07:00
Junio C Hamano 5d921e2931 Merge branch 'jc/cherry-pick' (early part)
* 'jc/cherry-pick' (early part):
  expose a helper function peel_to_type().
  merge-recursive: split low-level merge functions out.

Conflicts:

	Makefile
	builtin-merge-recursive.c
	sha1_name.c
2008-03-11 02:05:12 -07:00
Junio C Hamano 1c53606978 Merge branch 'maint'
* maint:
  git-pull documentation: warn about the option order
2008-03-11 01:54:46 -07:00
Junio C Hamano 92aeb994d3 Merge branch 'kb/maint-filter-branch-disappear' into maint
* kb/maint-filter-branch-disappear:
  filter-branch: handle "disappearing tree" case correctly in subdir filter
2008-03-11 00:38:29 -07:00
Junio C Hamano b50396d16c Merge branch 'aw/maint-shortlog-blank-lines' into maint
* aw/maint-shortlog-blank-lines:
  shortlog: take the first populated line of the description
2008-03-11 00:37:38 -07:00
SZEDER Gábor 702088afc6 update 'git rebase' documentation
Being in the project's top directory when starting or continuing a rebase
is not necessary since 533b703 (Allow whole-tree operations to be started
from a subdirectory, 2007-01-12).

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-10 17:38:03 -07:00
SZEDER Gábor 5447aac755 bash: fix long option with argument double completion
Pressing TAB right after 'git command --long-option=' results in
'git command --long-option=--long-option=' when the long option requires
an argument, but we don't provide completion for its arguments (e.g.
commit --author=, apply --exclude=).  This patch detects these long
options and provides empty completion array for them.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 20:02:15 -04:00
Teemu Likonen ce5a2c956f bash: Add more long options to be completed with "git --<TAB>"
Add the following long options to be completed with command "git":

	--paginate
	--work-tree=
	--help

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 20:00:40 -04:00
SZEDER Gábor 51fe120903 bash: use __gitdir when completing 'git rebase' options
When doing completion of rebase options in a subdirectory of the work
tree during an ongoing rebase, wrong options were offered because of the
hardcoded .git/.dotest-merge path.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:55:07 -04:00
Shawn O. Pearce 6753f2aa55 bash: Remove completion of core.legacyheaders option
This option is no longer recognized by git.  Completing it is
not worthwhile.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:49:28 -04:00
SZEDER Gábor 47f6ee2838 bash: add 'git svn' subcommands and options
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:45:40 -04:00
SZEDER Gábor 88b302f5e2 bash: add new 'git stash' subcommands
Namely 'save', 'drop', 'pop' and 'create'

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:45:20 -04:00
SZEDER Gábor 3ff1320d4b bash: refactor searching for subcommands on the command line
This patch adds the __git_find_subcommand function, which takes one
argument: a string containing all subcommands separated by spaces.  The
function searches through the command line whether a subcommand is
already present.  The first found subcommand will be printed to standard
output.

This enables us to remove code duplications from completion functions
for commands having subcommands.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:45:20 -04:00
SZEDER Gábor 1d17b22ebf bash: remove unnecessary conditions when checking for subcommands
Checking emptyness of $command is sufficient.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:45:20 -04:00
Kevin Ballard a5c4f85b16 bash: Properly quote the GIT_DIR at all times to fix subdirectory paths with spaces
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-03-10 19:44:40 -04:00
Junio C Hamano 5b10a3c124 git-pull documentation: warn about the option order
We might eventually be loosening this rule, but there is a longstanding
restriction that the users currently need to be aware of.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-10 01:22:03 -07:00
Jeff King 50753d00d6 Add a test for read-tree -u --reset with a D/F conflict
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 21:30:05 -08:00
Junio C Hamano 1cbcefb107 Merge branch 'ph/parseopt'
* ph/parseopt:
  parse-options: new option type to treat an option-like parameter as an argument.
  parse-opt: bring PARSE_OPT_HIDDEN and NONEG to git-rev-parse --parseopt
2008-03-08 21:29:59 -08:00
Junio C Hamano 175f559551 Merge branch 'dp/clean-fix'
* dp/clean-fix:
  git-clean: add tests for relative path
  git-clean: correct printing relative path
  Make private quote_path() in wt-status.c available as quote_path_relative()
  Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec())
  Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)
  Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files)
  get_pathspec(): die when an out-of-tree path is given
2008-03-08 21:29:56 -08:00
Junio C Hamano 0ae496ccd8 Merge branch 'ml/submodule-add-existing'
* ml/submodule-add-existing:
  git-submodule - Allow adding a submodule in-place
2008-03-08 21:29:52 -08:00
Junio C Hamano 6e79a88585 Merge branch 'mr/compat-snprintf'
* mr/compat-snprintf:
  Add compat/snprintf.c for systems that return bogus
2008-03-08 21:29:50 -08:00
Junio C Hamano 5b278ebe87 Merge branch 'sp/fetch-optim'
* sp/fetch-optim:
  Teach git-fetch to exploit server side automatic tag following
  Teach fetch-pack/upload-pack about --include-tag
  git-pack-objects: Automatically pack annotated tags if object was packed
  Teach git-fetch to grab a tag at the same time as a commit
  Make git-fetch follow tags we already have objects for sooner
  Teach upload-pack to log the received need lines to an fd
  Free the path_lists used to find non-local tags in git-fetch
  Allow builtin-fetch's find_non_local_tags to append onto a list
  Ensure tail pointer gets setup correctly when we fetch HEAD only
  Remove unnecessary delaying of free_refs(ref_map) in builtin-fetch
  Remove unused variable in builtin-fetch find_non_local_tags
2008-03-08 20:11:35 -08:00
Junio C Hamano 686bc52a89 Merge branch 'jc/describe-always'
* jc/describe-always:
  describe --always: fall back to showing an abbreviated object name
2008-03-08 20:10:09 -08:00
Junio C Hamano dabc42c713 Merge branch 'jc/am'
* jc/am:
  am: --rebasing
  am: remove support for -d .dotest
  am: read from the right mailbox when started from a subdirectory
2008-03-08 20:10:05 -08:00
Junio C Hamano b59fd2098e Merge branch 'cr/reset-parseopt'
* cr/reset-parseopt:
  Make builtin-reset.c use parse_options.
2008-03-08 20:09:55 -08:00
Junio C Hamano 11a1d351cf Merge branch 'jn/gitweb-pickaxe'
* jn/gitweb-pickaxe:
  gitweb: Fix and simplify pickaxe search
2008-03-08 20:09:51 -08:00
Junio C Hamano 832d586a0c Merge branch 'kb/maint-filter-branch-disappear'
* kb/maint-filter-branch-disappear:
  filter-branch: handle "disappearing tree" case correctly in subdir filter
2008-03-08 20:09:13 -08:00
Junio C Hamano ad416ed433 Merge branch 'maint' to sync with 1.5.4.4
* maint:
  GIT 1.5.4.4
  ident.c: reword error message when the user name cannot be determined
  Fix dcommit, rebase when rewriteRoot is in use
  Really make the LF after reset in fast-import optional
2008-03-08 20:07:57 -08:00
Junio C Hamano 56d5fe2855 GIT 1.5.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 19:43:21 -08:00
Santi Béjar 6c293d408d ident.c: reword error message when the user name cannot be determined
The "config --global" suggested in the message is a valid one-shot fix,
and hopefully one-shot across machines that NFS mounts the home directories.

This knowledge can hopefully be reused when you are forced to use git on
Windows, but the fix based on GECOS would not be applicable, so
it is not such a useful hint to mention the exact reason why the
name cannot be determined.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 19:43:21 -08:00
John Goerzen 0bb91d9a62 Fix dcommit, rebase when rewriteRoot is in use
When the rewriteRoot setting is used with git-svn, it causes the svn
IDs added to commit messages to bear a different URL than is actually
used to retrieve Subversion data.

It is common for Subversion repositories to be available multiple
ways: for instance, HTTP to the public, and svn+ssh to people with
commit access.  The need to switch URLs for access is fairly common as
well -- perhaps someone was just given commit access.  To switch URLs
without having to rewrite history, one can use the old url as a
rewriteRoot, and use the new one in the svn-remote url setting.

This works well for svn fetching and general git commands.

However, git-svn dcommit, rebase, and perhaps other commands do not
work in this scenario.  They scan the svn ID lines in commit messages
and attempt to match them up with url lines in [svn-remote] sections
in the git config.

This patch allows them to match rewriteRoot options, if such options
are present.

Signed-off-by: John Goerzen <jgoerzen@complete.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
2008-03-08 19:20:06 -08:00
Junio C Hamano 5b044ac387 filter-branch: handle "disappearing tree" case correctly in subdir filter
The subdirectory filter had a bug to notice that the commit in question
did not have anything in the path-limited part of the tree.  $commit:$path
does not name an empty tree when $path does not appear in $commit.

This should fix it.  The additional test in t7003 is originally from Kevin
Ballard but with fixups.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 13:25:57 -08:00
Charles Bailey caa99829a2 merge-tool documentation: describe custom command usage
The configuration variables for custom merge tools were documented
only in config.txt but there was no reference to the functionality in
git-mergetool.txt.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 13:22:55 -08:00
Charles Bailey bbdfbc4b01 git-mergetool documentaiton: show toolnames in typewriter font
Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 13:22:55 -08:00
Adeodato Simó 655e8515f2 Really make the LF after reset in fast-import optional
cmd_from() ends with a call to read_next_command(), which is needed
when using cmd_from() from commands where from is not the last element.

With reset, however, "from" is the last command, after which the flow
returns to the main loop, which calls read_next_command() again.

Because of this, always set unread_command_buf in cmd_reset_branch(),
even if cmd_from() was successful.

Add a test case for this in t9300-fast-import.sh.

Signed-off-by: Adeodato Simó <dato@net.com.org.es>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08 10:46:10 -08:00
Junio C Hamano 5c9afcff1a Merge branch 'aw/maint-shortlog-blank-lines'
* aw/maint-shortlog-blank-lines:
  shortlog: take the first populated line of the description
2008-03-08 02:23:42 -08:00
Junio C Hamano 972b9a8530 Merge branch 'mh/maint-http-proxy-fix' into maint
* mh/maint-http-proxy-fix:
  Set proxy override with http_init()
2008-03-08 02:20:37 -08:00
Junio C Hamano 1f1300b4f1 Merge branch 'js/maint-daemon' into maint
* js/maint-daemon:
  daemon: ensure that base-path is an existing directory
  daemon: send more error messages to the syslog
2008-03-08 02:20:30 -08:00
Junio C Hamano 274d9d3294 Merge branch 'js/maint-cvsexport' into maint
* js/maint-cvsexport:
  cvsexportcommit: be graceful when "cvs status" reorders the arguments

Conflicts:

	t/t9200-git-cvsexportcommit.sh
2008-03-08 02:13:52 -08:00
Junio C Hamano 925ca887b8 Merge branch 'jc/maint-log-merge-left-right' into maint
* jc/maint-log-merge-left-right:
  Fix "git log --merge --left-right"
2008-03-08 02:11:37 -08:00
Junio C Hamano ca2c19503c Merge branch 'ew/maint-svn-cert-fileprovider' into maint
* ew/maint-svn-cert-fileprovider:
  git-svn: Don't prompt for client cert password everytime.
2008-03-08 02:11:32 -08:00
Junio C Hamano 60e3cad92e Merge branch 'maint'
* maint:
  unquote_c_style: fix off-by-one.
  test-lib: fix TERM to dumb for test repeatability
  config.txt: refer to --upload-pack and --receive-pack instead of --exec
  git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-07 22:43:46 -08:00
Junio C Hamano ba51795c5f send-email: --no-signed-off-cc should suppress 'sob' cc
The logic to countermand suppression of Cc to the signers with a more
explicit --signed-off-by option done in 6564828 (git-send-email:
Generalize auto-cc recipient mechanism) suffers from a double-negation
error.

A --signed-off-cc option, when false, should actively suppress CC: to be
generated out of S-o-b lines, and it should refrain from suppressing when
it is true.

It also fixes "(sob) Adding cc:" status output; earlier it included the
line terminator LF inside '%s', which was totally bogus.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07 22:35:34 -08:00
Junio C Hamano d33046c1ed Merge branch 'js/reflog-delete'
* js/reflog-delete:
  t3903-stash.sh: Add tests for new stash commands drop and pop
  git-reflog.txt: Document new commands --updateref and --rewrite
  t3903-stash.sh: Add missing '&&' to body of testcase
  git-stash: add new 'pop' subcommand
  git-stash: add new 'drop' subcommand
  git-reflog: add option --updateref to write the last reflog sha1 into the ref
  refs.c: make close_ref() and commit_ref() non-static
  git-reflog: add option --rewrite to update reflog entries while expiring
  reflog-delete: parse standard reflog options
  builtin-reflog.c: fix typo that accesses an unset variable
  Teach "git reflog" a subcommand to delete single entries
2008-03-07 22:34:26 -08:00
Junio C Hamano 5628a7a309 Merge branch 'dc/format-pretty'
* dc/format-pretty:
  log/show/whatchanged: introduce format.pretty configuration
  specify explicit "--pretty=medium" with `git log/show/whatchanged`
  whatchanged documentation: share description of --pretty with others
2008-03-07 22:33:26 -08:00
Junio C Hamano 003b93cfb3 Merge branch 'cb/mergetool'
* cb/mergetool:
  Add a very basic test script for git mergetool
  Teach git mergetool to use custom commands defined at config time
  Changed an internal variable of mergetool to support custom commands
  Tidy up git mergetool's backup file behaviour
2008-03-07 22:30:07 -08:00