Commit Graph

16971 Commits

Author SHA1 Message Date
SZEDER Gábor
608efb875f bash: complete full refs
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>
2008-11-27 18:34:30 -08:00
SZEDER Gábor
8d8163f377 bash: remove dashed command leftovers
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>
2008-11-27 18:29:53 -08:00
Junio C Hamano
b21a226a42 Merge branch 'pw/maint-p4' into maint
* pw/maint-p4:
  git-p4: fix keyword-expansion regex
2008-11-27 13:18:25 -08:00
Pete Wyckoff
3d51c853df git-p4: fix keyword-expansion regex
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>
2008-11-27 13:17:58 -08:00
Ralf Wildenhues
76bac89036 Fix typos in the documentation.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-27 01:17:23 -08:00
Junio C Hamano
c0a4ae5caf Merge branch 'rw/maint-typofix' into rw/typofix
* rw/maint-typofix:
  Fix typos in the documentation.
2008-11-27 01:17:09 -08:00
Ralf Wildenhues
a0178ae2cf Fix typos in the documentation.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-27 01:00:45 -08:00
Nanako Shiraishi
6249067c61 git-gui: update Japanese translation
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-26 14:13:30 -08:00
Junio C Hamano
aa14a0c3f1 Merge branch 'maint'
* maint:
  Teach "git diff" to honour --[no-]ext-diff
2008-11-26 11:57:31 -08:00
Junio C Hamano
78a0014d80 Merge branch 'mm/sort-config-doc'
* mm/sort-config-doc:
  config.txt: alphabetize configuration sections
2008-11-26 11:57:28 -08:00
Junio C Hamano
5aa3bdd50d Merge branch 'mm/maint-sort-config-doc' into maint
* mm/maint-sort-config-doc:
  config.txt: alphabetize configuration sections
2008-11-26 11:57:15 -08:00
Junio C Hamano
42fc11c110 Merge branch 'mm/maint-sort-config-doc' into mm/sort-config-doc
* mm/maint-sort-config-doc:
  config.txt: alphabetize configuration sections

Conflicts:
	Documentation/config.txt
2008-11-26 11:11:18 -08:00
Matt McCutchen
b0f34c3d67 config.txt: alphabetize configuration sections
I figured the sections might as well be in some order, so I chose alphabetical
but with "core" at the beginning.  This should help people add new variables
in the right places.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26 11:07:57 -08:00
Jim Meyering
c095a1db30 xdiff-interface.c: remove 10 duplicated lines
Remove an accidentally duplicated sequence of 10 lines.
This happens to plug a leak, too.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26 10:47:41 -08:00
Marcel Koeppen
26d6cc555d t9129-git-svn-i18n-commitencoding: Make compare_svn_head_with() compatible with OSX sed
The sed call used in compare_svn_head_with() uses the + quantifier, which
is not supported in the OSX version of sed. It is replaced by the
equivalent \{1,\}.

Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26 10:09:52 -08:00
Junio C Hamano
61af494ca4 Teach "git diff" to honour --[no-]ext-diff
The original intention of 72909be (Add diff-option --ext-diff, 2007-06-30)
was to optionally allow the use of external diff viewer in "git log"
family (while keeping them disabled by default).  It exposed the "allow
external diff" bit to the UI, but forgot to adjust the "git diff" codepath
that was set up to always allow use of the external diff viewer.

Noticed by Nazri Ramliy; tests by René Scharfe squashed in.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26 09:58:41 -08:00
Trent Piepho
73c427eb99 send-email: Fix Pine address book parsing
See:  http://www.washington.edu/pine/tech-notes/low-level.html

Entries with a fcc or comment field after the address weren't parsed
correctly.

Continuation lines, identified by leading spaces, were also not handled.

Distribution lists which had ( ) around a list of addresses did not have
the parenthesis removed.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26 09:55:10 -08:00
Junio C Hamano
f20706220b Merge branch 'for-junio' of git://source.winehq.org/~julliard/git/git
* 'for-junio' of git://source.winehq.org/~julliard/git/git:
  git.el: Allow to commit even if there are no marked files.
  git.el: Add possibility to mark files directly in git-update-status-files.
  git.el: Add an insert file command.
  git.el: Never clear the status buffer, only update the files.
  git.el: Fix git-amend-commit to support amending an initial commit.
  git.el: Properly handle merge commits in git-amend-commit.
  git.el: Simplify handling of merge heads in the commit log-edit buffer.
  git.el: Remove the env parameter in git-call-process and git-call-process-string.
  git.el: Improve error handling for commits.
2008-11-25 21:52:28 -08:00
Christian Couder
ee2314f59a bisect: teach "skip" to accept special arguments like "A..B"
The current "git bisect skip" syntax is "git bisect skip [<rev>...]"
so it's already possible to skip a range of revisions using
something like:

$ git bisect skip $(git rev-list A..B)

where A and B are the bounds of the range we want to skip.

This patch teaches "git bisect skip" to accept:

$ git bisect skip A..B

as an abbreviation for the former command.

This is done by checking each argument to see if it contains two
dots one after the other ('..'), and by expending it using
"git rev-list" if that is the case.

Note that this patch will not make "git bisect skip" accept all
that "git rev-list" accepts, as things like "^A B" for exemple
will not work. But things like "A B..C D E F.. ..G H...I" should
work as expected.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-25 21:51:05 -08:00
Miklos Vajna
b5ff37ac6b builtin_clone: use strbuf in cmd_clone()
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-25 15:34:26 -08:00
Miklos Vajna
b9e125e07e builtin-clone: use strbuf in clone_local() and copy_or_link_directory()
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-25 15:34:25 -08:00
Miklos Vajna
32716a2c6c builtin-clone: use strbuf in guess_dir_name()
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-25 15:34:25 -08:00
Junio C Hamano
ef3b38b445 Merge branch 'maint'
* maint:
  Fix misleading wording for git-cherry-pick
2008-11-23 20:36:54 -08:00
René Scharfe
7de1950cb2 remove the unused files interpolate.c and interpolate.h
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:56:57 -08:00
René Scharfe
a47551c382 daemon: deglobalize variable 'directory'
Remove the global variable 'directory' and pass it as a parameter of
the two functions that use it instead, (almost) restoring their
interface to how it was before 49ba83fb67.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:56:36 -08:00
René Scharfe
d433ed0bb4 daemon: inline fill_in_extra_table_entries()
Having fill_in_extra_table_entries() as a separate function has no
advantage -- a function with no parameters and return values might as
well be an anonymous block of code.  Its name still refers to the table
of interpolate() which has been removed earlier, so it's better to
inline it at its only call site.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:56:26 -08:00
René Scharfe
9d7ca66746 daemon: use strbuf_expand() instead of interpolate()
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:56:06 -08:00
René Scharfe
ced621b2c1 merge-recursive: use strbuf_expand() instead of interpolate()
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:55:52 -08:00
René Scharfe
9b864e730b add strbuf_expand_dict_cb(), a helper for simple cases
The new callback function strbuf_expand_dict_cb() can be used together
with strbuf_expand() if there is only a small number of placeholders
for static replacement texts.  It expects its dictionary as an array of
placeholder+value pairs as context parameter, terminated by an entry
with the placeholder member set to NULL.

The new helper is intended to aid converting the remaining calls of
interpolate().  strbuf_expand() is smaller, more flexible and can be
used to go faster than interpolate(), so it should replace the latter.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:55:47 -08:00
Johannes Schindelin
2075ffb58e fast-export: use an unsorted string list for extra_refs
The list extra_refs contains tags and the objects referenced by them,
so that they can be handled at the end.  When a tag references a
commit, that commit is added to the list using the same name.

Also, the function handle_tags_and_duplicates() relies on the order
the items were added to extra_refs, so clearly we do not want to
use a sorted list here.

Noticed by Miklos Vajna.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Tested-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:54:51 -08:00
Miklos Vajna
283b953283 Add new testcase to show fast-export does not always exports all tags
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:54:24 -08:00
Joey Hess
cbacbf4e55 sha1_file: avoid bogus "file exists" error message
This avoids the following misleading error message:

error: unable to create temporary sha1 filename ./objects/15: File exists

mkstemp can fail for many reasons, one of which, ENOENT, can occur if
the directory for the temp file doesn't exist. create_tmpfile tried to
handle this case by always trying to mkdir the directory, even if it
already existed. This caused errno to be clobbered, so one cannot tell
why mkstemp really failed, and it truncated the buffer to just the
directory name, resulting in the strange error message shown above.

Note that in both occasions that I've seen this failure, it has not been
due to a missing directory, or bad permissions, but some other, unknown
mkstemp failure mode that did not occur when I ran git again. This code
could perhaps be made more robust by retrying mkstemp, in case it was a
transient failure.

Signed-off-by: Joey Hess <joey@kitenet.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:44:19 -08:00
Bryan Drewery
37a7744ffe Fix misleading wording for git-cherry-pick
Documentation for -n implies that -x is normally
used, however this is no longer true.

Signed-off-by: Bryan Drewery <bryan@shatow.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:32:39 -08:00
Alex Riesen
3b91c30b76 Fix t4030-diff-textconv.sh
Avoid passing cygwin pathnames to Perl. Some Perls have problems using them

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:32:07 -08:00
Alex Riesen
f755bb996b Fix handle leak in sha1_file/unpack_objects if there were damaged object data
In the case of bad packed object CRC, unuse_pack wasn't called after
check_pack_crc which calls use_pack.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:31:05 -08:00
Johannes Sixt
632f701787 compat/mingw.c: Teach mingw_rename() to replace read-only files
On POSIX, rename() can replace files that are not writable. On Windows,
however, read-only files cannot be replaced without additional efforts:
We have to make the destination writable first.

Since the situations where the destination is read-only are rare, we do not
make the destination writable on every invocation, but only if the first
try to rename a file failed with an "access denied" error.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:26:42 -08:00
Johannes Schindelin
850fb6ff81 Document levenshtein.c
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:23:34 -08:00
Samuel Tardieu
13c6bcd49f Fix deletion of last character in levenshtein distance
Without this change, "git tags" will not suggest "git tag"
(it will only suggest "git status"), and "git statusx" will
not suggest anything.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:23:33 -08:00
Christian Couder
1a93d67ba8 git-gui: french translation update
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-23 12:53:45 -08:00
Alexandre Julliard
1905a8666a git.el: Allow to commit even if there are no marked files.
This can be useful to commit a merge that didn't result in any
changes.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-23 11:54:42 +01:00
Alexandre Julliard
c4e8b72f22 git.el: Add possibility to mark files directly in git-update-status-files.
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>
2008-11-23 11:54:41 +01:00
Alexandre Julliard
b0a53e9e56 git.el: Add an insert file command.
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>
2008-11-23 11:54:38 +01:00
Alexandre Julliard
433ee03f97 git.el: Never clear the status buffer, only update the files.
This makes it unnecessary to save/restore the file marks.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21 20:39:33 +01:00
Alexandre Julliard
db18a182a2 git.el: Fix git-amend-commit to support amending an initial commit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21 20:39:03 +01:00
Alexandre Julliard
ef5133df7c git.el: Properly handle merge commits in git-amend-commit.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21 20:39:03 +01:00
Alexandre Julliard
6fb204266c git.el: Simplify handling of merge heads in the commit log-edit buffer.
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>
2008-11-21 20:39:02 +01:00
Alexandre Julliard
9ddf6d7c10 git.el: Remove the env parameter in git-call-process and git-call-process-string.
All callers that need to change the environment now set
process-environment themselves.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2008-11-21 20:39:02 +01:00
Alexandre Julliard
36d2078ff1 git.el: Improve error handling for commits.
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>
2008-11-21 20:39:02 +01:00
Peter Krefting
f6e4110bcd Updated Swedish translation (514t0f0u).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-21 07:07:02 -08:00
Michele Ballabio
3cf2801c41 git gui: update Italian translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-19 11:17:39 -08:00