1
0
mirror of https://github.com/git/git.git synced 2024-10-22 11:18:17 +02:00
Commit Graph

34986 Commits

Author SHA1 Message Date
Jonathan Nieder
0e3b378c3a Merge branch 'rt/cherry-pick-status'
* rt/cherry-pick-status:
  status: show commit sha1 in "You are currently cherry-picking" message
  status test: add missing && to <<EOF blocks
2013-10-14 11:08:47 -07:00
Jonathan Nieder
865156a7cb Merge branch 'rj/doc-formatting-fix'
* rj/doc-formatting-fix:
  howto/revert-a-faulty-merge: fix unescaped '^'s
  howto/setup-git-server-over-http: fix unescaped '^'s
2013-10-14 11:07:50 -07:00
Jonathan Nieder
c766e6f429 Merge branch 'po/remote-set-head-usage'
* po/remote-set-head-usage:
  remote set-head -h: add long options to synopsis
  remote doc: document long forms of set-head options
2013-10-14 11:07:29 -07:00
Jonathan Nieder
cabb411fcf Merge branch 'nd/clone-local-with-colon'
* nd/clone-local-with-colon:
  clone: tighten "local paths with colons" check a bit
2013-10-14 11:06:57 -07:00
Jonathan Nieder
13f17f338c Merge branch 'jx/clean-interactive'
* jx/clean-interactive:
  path-utils test: rename mingw_path function to print_path
2013-10-14 11:03:48 -07:00
Jonathan Nieder
92d2afd563 Merge branch 'jk/diff-algo'
* jk/diff-algo:
  merge-recursive: fix parsing of "diff-algorithm" option
2013-10-14 10:59:51 -07:00
Julien Carsique
1f6806cf2d git-prompt.sh: optionally show upstream branch name
When working with multiple remotes, it is common to switch the upstream
from a remote to another. Doing so, the prompt may not be the expected
one. Providing an option to display tracking information sounds useful.

Add a "name" option to GIT_PS1_SHOWUPSTREAM which will show the upstream
abbrev name. This option is ignored if "verbose" is false.

Signed-off-by: Julien Carsique <julien.carsique@gmail.com>
Improved-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 10:24:34 -07:00
Sebastian Schuberth
7ffd18fce1 path-utils test: rename mingw_path function to print_path
mingw_path was introduced in abd4284 to output a mangled path as it is
passed as an argument to main(). But the name is misleading because
mangling does not come from MinGW, but from MSYS [1]. As abd4284 does not
introduce any MSYS or MinGW specific code but just prints out argv[2] as
it is passed to main(), give the function the more generic and less
confusing name "print_path".

[1] http://www.mingw.org/wiki/Posix_path_conversion

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 07:32:53 -07:00
Ramsay Jones
78bef06589 howto/revert-a-faulty-merge: fix unescaped '^'s
Several uses of the '^' operator are being interpreted by asciidoc
as requests to show the following text as a superscript. In order
to fix this problem, use backticks (`) to quote the text of the
affected git command invocations.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 07:25:42 -07:00
Ramsay Jones
6430692135 howto/setup-git-server-over-http: fix unescaped '^'s
The text contains two 'grep' invocations which include the 'start
of line' regular expression character '^'. Asciidoc mis-interprets
this use of '^' as a superscript request. In order to fix this
formatting problem, use backticks (`) to quote the text of the
affected 'grep' command invocations.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14 07:23:40 -07:00
Stefan Saasen
c5f424fd01 mergetools/diffmerge: support DiffMerge as a git mergetool
DiffMerge is a non-free (but gratis) tool that supports OS X, Windows and Linux.

    See http://www.sourcegear.com/diffmerge/

DiffMerge includes a script `/usr/bin/diffmerge` that can be used to launch the
graphical compare tool.

This change adds mergetool support for DiffMerge and adds 'diffmerge' as an
option to the mergetool help.

Signed-off-by: Stefan Saasen <ssaasen@atlassian.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-13 16:00:57 -07:00
Thomas Rast
22bbddeafe .mailmap: switch to Thomas Rast's personal address
Normalize to my personal address, as my ETH addresses will expire
soon.  Also add my new corp account to be somewhat futureproof.

Note that despite the private address being first, Google owns the
copyright as long as I am employed there.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-13 14:28:27 -07:00
Johan Herland
f849bb6b3b git-svn: Warn about changing default for --prefix in Git v2.0
In Git v2.0, we will change the default --prefix for init/clone from
none/empty to "origin/" (which causes SVN-tracking branches to be
placed at refs/remotes/origin/* instead of refs/remotes/*).

This patch warns users about the upcoming change, both in the git-svn
manual page, and on stderr when running init/clone in the "multi-mode"
without providing a --prefix.

Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-12 22:30:53 +00:00
Johan Herland
7091a2d0bf Documentation/git-svn: Promote the use of --prefix in docs + examples
Currently, the git-svn defaults to using an empty prefix, which ends
up placing the SVN-tracking refs directly in refs/remotes/*. This
placement runs counter to Git's convention of placing remote-tracking
branches in refs/remotes/$remote/*.

Furthermore, combining git-svn with "regular" Git remotes run the risk
of clobbering refs under refs/remotes (e.g. if you have a git remote
called "tags" with a "v1" branch, it will overlap with the git-svn's
tracking branch for the "v1" tag from Subversion.

Even though the git-svn refs stored in refs/remotes/* are not "proper"
remote-tracking branches (since they are not covered by a proper git
remote's refspec), they clearly represent a similar concept, and would
benefit from following the same convention.

For example, if git-svn tracks Subversion branch "foo" at
refs/remotes/foo, and you create a local branch refs/heads/foo to add
some commits to be pushed back to Subversion (using "git svn dcommit),
then it is clearly unhelpful of Git to throw

  warning: refname 'foo' is ambiguous.

every time you checkout, rebase, or otherwise interact with the branch.

At this time, the user is better off using the --prefix=foo/ (the
trailing slash is important) to git svn init/clone, to cause the
SVN-tracking refs to be placed at refs/remotes/foo/* instead of
refs/remotes/*. This patch updates the documentation to encourage
use of --prefix.

This is also in preparation for changing the default value of --prefix
at some point in the future.

Cc: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-12 22:30:39 +00:00
Ralf Thielow
bffd809870 status: show commit sha1 in "You are currently cherry-picking" message
Especially helpful when cherry-picking multiple commits.

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-11 10:42:45 -07:00
Jonathan Nieder
59c2220528 status test: add missing && to <<EOF blocks
When a test forgets to include && after each command, it is possible
for an early command to succeed but the test to fail, which can hide
bugs.

Checked using the following patch to the test harness:

	--- a/t/test-lib.sh
	+++ b/t/test-lib.sh
	@@ -425,7 +425,17 @@ test_eval_ () {
		eval </dev/null >&3 2>&4 "$*"
	 }

	+check_command_chaining_ () {
	+	eval >&3 2>&4 "(exit 189) && $*"
	+	eval_chain_ret=$?
	+	if test "$eval_chain_ret" != 189
	+	then
	+		error 'bug in test script: missing "&&" in test commands'
	+	fi
	+}
	+
	 test_run_ () {
	+	check_command_chaining_ "$1"
		test_cleanup=:
		expecting_failure=$2
		setup_malloc_check

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-11 10:35:46 -07:00
Jeff King
d644c5502f cherry-pick: handle "-" after parsing options
Currently, we only try converting argv[1] from "-" into "@{-1}".  This
means we do not notice "-" when used together with an option.  Worse,
when "git cherry-pick" is run with no options, we segfault.  Fix this
by doing the substitution after we have checked that there is
something in argv to cherry-pick and know any remaining options are
meant for the revision-listing machinery.

This still does not handle "-" after the first non-cherry-pick option.
For example,

	git cherry-pick foo~2 - bar~5

and

	git cherry-pick --no-merges -

will still dump usage.

Reported-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-10 15:33:46 -07:00
Keshav Kini
945b9c14ff git-svn.txt: elaborate on rev_map files
The man page for `git svn` describes a situation in which "'git svn'
will not be able to rebuild" your $GIT_DIR/svn/**/.rev_map* files, but
no mention is made of in what circumstances `git svn` *will* be able to
do so, how to get `git svn` to do so, or even what these files are.

This patch adds a FILES section to the man page with a description of
what $GIT_DIR/svn/**/.rev_map* files are and how they are (re)built, and
links to this description from various other parts of the man page.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:56:12 +00:00
Keshav Kini
6fe7a30aec git-svn.txt: replace .git with $GIT_DIR
As $GIT_DIR may not equal '.git', it's usually more generally correct to
refer to files in $GIT_DIR rather than in .git .

This will also allow me to link some of the occurrences of '.git' in
git-svn.txt to a new reference target inside this file in an upcoming
commit, because in AsciiDoc definitions apparently can't start with
a '.' character.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:56:05 +00:00
Keshav Kini
e618c3960a git-svn.txt: reword description of gc command
It's redundant to say that $GIT_DIR/svn/<refname>/unhandled.log or
$GIT_DIR/svn/<refname>/index is in .git/svn when $GIT_DIR is '.git', and
is wrong when $GIT_DIR is not '.git'

Also, a '/' was missing from the pathname $GIT_DIR/svn/<refname>/index .

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:55:48 +00:00
Keshav Kini
9ebeb3392b git-svn.txt: fix AsciiDoc formatting error
As asterisks are used to indicate bold text in AsciiDoc, shell glob
expressions must be escaped appropriately.

Signed-off-by: Keshav Kini <keshav.kini@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:55:23 +00:00
Nicolas Vigier
60786bd41a git-svn: fix signed commit parsing
When parsing a commit object, git-svn wrongly think that a line
containing spaces means the end of headers and the start of the commit
message. In case of signed commit, the gpgsig entry contains a line with
one space, so "git svn dcommit" will include part of the signature in
the commit message.

An example of such problem :
http://svnweb.mageia.org/treasurer?view=revision&revision=86

This commit changes the regex to only match an empty line as separator
between the headers and the commit message.

Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-10-10 06:48:10 +00:00
Stefan Beller
b0afc02649 checkout test: enable test with complex relative path
This test was added, commented out, in fed1b5ca (git-checkout: Test
for relative path use, 2007-11-09).  Later git's path handling was
improved (d089ebaa, setup: sanitize absolute and funny paths in
get_pathspec(), 2008-01-28) but we forgot to enable the now-working
test.

This test expects to run from a subdirectory, so add a 'cd'.  While
we're here, examine the content of the checked-out file instead of
just checking that it exists.  The other checkout tests already do the
same.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-09 12:49:55 -07:00
Jonathan Nieder
1e155359bf Merge branch 'tz/credential-netrc'
* tz/credential-netrc:
  git-credential-netrc: fix uninitialized warning
2013-10-08 13:56:50 -07:00
Ted Zlatanov
506524aea5 git-credential-netrc: fix uninitialized warning
Simple patch to avoid unitialized warning and log what we'll do.

Signed-off-by: Ted Zlatanov <tzz@lifelogs.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-08 13:56:36 -07:00
John Keeping
0079d6ebd7 Documentation/Makefile: make AsciiDoc dblatex dir configurable
On my system this is in /usr/share/asciidoc/dblatex not
/etc/asciidoc/dblatex.  Extract this portion of the path to a variable
so that is can be set in config.mak.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-03 12:21:19 -07:00
Kirill A. Shutemov
568950388b rebase -i: respect core.abbrev
collapse_todo_ids() uses `git rev-parse --short=7' to abbreviate
commit ids before showing them to the user in a text editor.  Let's
drop argument from --short to the configured value instead (still
defaulting to 7).

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30 14:34:50 -07:00
Matthieu Moy
9cd755b2fc RelNotes/1.8.5: direct script writers to "git status --porcelain"
[jn: with wording tweak from Keshav Kini]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 17:05:02 -07:00
Philip Oakley
e49c8f33ab remote set-head -h: add long options to synopsis
Document --auto and --delete alongside their short forms -a and -d in
the first line of 'git remote set-head -h' output.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 16:51:27 -07:00
Philip Oakley
159543e831 remote doc: document long forms of set-head options
"git remote set-head" has always supported --add and --delete
as synonyms for the -a and -d option but forgot to document
them.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 16:49:18 -07:00
Nguyễn Thái Ngọc Duy
8d3d28f5db clone: tighten "local paths with colons" check a bit
commit 6000334 (clone: allow cloning local paths with colons in them -
2013-05-04) made it possible to specify a path that has colons in it
without file://, e.g. ../foo:bar/somewhere. But the check was a bit
sloppy.

Consider the url '[foo]:bar'. The '[]' unwrapping code will turn the
string to 'foo\0:bar'. In effect this new string is the same as
'foo/:bar' in the check "path < strchrnul(host, '/')", which mistakes
it for a local path (with '/' before the first ':') when it's actually
not.

So disable the check for '/' before ':' when the URL has been mangled
by '[]' unwrapping.

[jn: with tests from Jeff King]

Noticed-by: Morten Stenshorne <mstensho@opera.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27 14:47:49 -07:00
Stefan Beller
6dab2781a1 contrib: remove ciabot
Almost a year ago the CIA service irrevocably crashed.  The CIA author
had plans to revive the service, but the effort has since sunk without
trace.

Projects tend to use "irker" instead these days.  Repository hook
scripts for irker ship with the irker distribution.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Acked-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 15:49:36 -07:00
Jonathan Nieder
8de8e40caa Sync with Git 1.8.4.1 2013-09-26 15:36:57 -07:00
Jonathan Nieder
02a110ad43 Git 1.8.4.1
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
v1.8.4.1
2013-09-26 15:01:41 -07:00
John Keeping
6562928ae9 merge-recursive: fix parsing of "diff-algorithm" option
The "diff-algorithm" option to the recursive merge strategy takes the
name of the algorithm as an option, but it uses strcmp on the option
string to check if it starts with "diff-algorithm=", meaning that this
options cannot actually be used.

Fix this by switching to prefixcmp.  At the same time, clarify the
following line by using strlen instead of a hard-coded length, which
also makes it consistent with nearby code.

Reported-by: Luke Noel-Storr <luke.noel-storr@integrate.co.uk>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26 13:52:16 -07:00
Jonathan Nieder
437ce600fb Merge branch 'mm/rebase-continue-freebsd-WB' into maint
* mm/rebase-continue-freebsd-WB:
  rebase: fix run_specific_rebase's use of "return" on FreeBSD
2013-09-26 12:41:14 -07:00
Jonathan Nieder
76deaab4e8 Merge branch 'km/svn-1.8-serf-only' into maint
* km/svn-1.8-serf-only:
  Git.pm: revert _temp_cache use of temp_is_locked
  git-svn: allow git-svn fetching to work using serf
  Git.pm: add new temp_is_locked function
2013-09-26 12:34:23 -07:00
Jonathan Nieder
be5e85016f Merge branch 'js/xread-in-full' into maint
* js/xread-in-full:
  stream_to_pack: xread does not guarantee to read all requested bytes
2013-09-26 12:30:44 -07:00
Jonathan Nieder
31d757d512 Merge branch 'bc/send-email-ssl-die-message-fix' into maint
* bc/send-email-ssl-die-message-fix:
  send-email: don't call methods on undefined values
2013-09-26 12:27:29 -07:00
Jonathan Nieder
5636a20070 Merge branch 'bc/submodule-status-ignored'
* bc/submodule-status-ignored:
  Improve documentation concerning the status.submodulesummary setting
  submodule: don't print status output with ignore=all
  submodule: fix confusing variable name
2013-09-24 23:36:08 -07:00
Jonathan Nieder
80f165a58a Merge branch 'cc/replace-with-the-same-type'
* cc/replace-with-the-same-type:
  Doc: 'replace' merge and non-merge commits
  t6050-replace: use some long option names
  replace: allow long option names
  Documentation/replace: add Creating Replacement Objects section
  t6050-replace: add test to clean up all the replace refs
  t6050-replace: test that objects are of the same type
  Documentation/replace: state that objects must be of the same type
  replace: forbid replacing an object with one of a different type
2013-09-24 23:35:24 -07:00
Jonathan Nieder
d0c789084c Merge branch 'kb/msvc-compile'
* kb/msvc-compile:
  Windows: do not redefine _WIN32_WINNT
  MinGW: Fix stat definitions to work with MinGW runtime version 4.0
  MSVC: fix stat definition hell
  MSVC: fix compile errors due to macro redefinitions
  MSVC: fix compile errors due to missing libintl.h
2013-09-24 23:31:58 -07:00
Jonathan Nieder
87bcf148d7 Merge branch 'nd/unpack-entry-optim-in-pack-objects'
* nd/unpack-entry-optim-in-pack-objects:
  pack-objects: no crc check when the cached version is used
2013-09-24 23:29:55 -07:00
Jonathan Nieder
7f794aab3e Merge branch 'jk/shortlog-tolerate-broken-commit'
* jk/shortlog-tolerate-broken-commit:
  shortlog: ignore commits with missing authors
2013-09-24 23:29:00 -07:00
Jonathan Nieder
a301889980 Merge branch 'jc/strcasecmp-pure-inline'
* jc/strcasecmp-pure-inline:
  mailmap: work around implementations with pure inline strcasecmp
2013-09-24 23:28:13 -07:00
Jonathan Nieder
b7f571618c Merge branch 'sg/complete-untracked-filter'
* sg/complete-untracked-filter:
  completion: improve untracked directory filtering for filename completion
2013-09-24 23:27:44 -07:00
Jonathan Nieder
40b77322d2 Merge branch 'nd/fetch-pack-error-reporting-fix'
* nd/fetch-pack-error-reporting-fix:
  fetch-pack.c: show correct command name that fails
2013-09-24 23:27:02 -07:00
Jonathan Nieder
eb34959e10 Merge branch 'es/contacts-in-subdir'
* es/contacts-in-subdir:
  contacts: fix to work in subdirectories
2013-09-24 23:25:23 -07:00
Jonathan Nieder
1939ce67ed Merge branch 'jc/push-cas'
* jc/push-cas:
  t5541: mark passing c-a-s test as success
2013-09-24 23:22:03 -07:00
Jonathan Nieder
962393b5d9 Merge branch 'maint'
* maint:
  git-remote-mediawiki: bugfix for pages w/ >500 revisions
2013-09-24 23:19:00 -07:00