git.git
15 years agoTest that git-am does not lose -C/-p/--whitespace options
Junio C Hamano [Fri, 5 Dec 2008 01:08:48 +0000 (17:08 -0800)]
Test that git-am does not lose -C/-p/--whitespace options

These tests make sure that "git am" does not lose command line options
specified when it was started, after it is interrupted by a patch that
does not apply earlier in the series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am: propagate --3way options as well
Junio C Hamano [Thu, 4 Dec 2008 23:38:27 +0000 (15:38 -0800)]
git-am: propagate --3way options as well

The reasoning is the same as the previous patch, where we made -C<n>
and -p<n> propagate across a failure.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am: propagate -C<n>, -p<n> options as well
Junio C Hamano [Thu, 4 Dec 2008 23:38:27 +0000 (15:38 -0800)]
git-am: propagate -C<n>, -p<n> options as well

These options are meant to deal with patches that do not apply cleanly
due to the differences between the version the patch was based on and
the version "git am" is working on.

Because a series of patches applied in the same "git am" run tends to
come from the same source, it is more useful to propagate these options
after the application stops.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-am --whitespace: do not lose the command line option
Junio C Hamano [Thu, 4 Dec 2008 23:03:28 +0000 (15:03 -0800)]
git-am --whitespace: do not lose the command line option

When you start "git am --whitespace=fix" and the patch application process
is interrupted by an unapplicable patch early in the series, after
fixing the offending patch, the remainder of the patch should be processed
still with --whitespace=fix when restarted with "git am --resolved" (or
dropping the offending patch with "git am --skip").

The breakage was introduced by the commit 67dad68 (add -C[NUM] to git-am,
2007-02-08); this should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'dm/svn-remote'
Junio C Hamano [Thu, 4 Dec 2008 06:44:26 +0000 (22:44 -0800)]
Merge branch 'dm/svn-remote'

* dm/svn-remote:
  git-svn: Make branch use correct svn-remote

15 years agoMerge branch 'jn/gitweb-utf8'
Junio C Hamano [Thu, 4 Dec 2008 06:03:09 +0000 (22:03 -0800)]
Merge branch 'jn/gitweb-utf8'

* jn/gitweb-utf8:
  gitweb: Fix handling of non-ASCII characters in inserted HTML files

15 years agoadd stage to gitignore
Jeff King [Thu, 4 Dec 2008 03:42:03 +0000 (22:42 -0500)]
add stage to gitignore

This is a generated builtin since 24b1f65f (Install git-stage in
exec-path).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosubmodule: use git rev-parse -q
Miklos Vajna [Wed, 3 Dec 2008 13:26:52 +0000 (14:26 +0100)]
submodule: use git rev-parse -q

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agorebase: use git rev-parse -q
Miklos Vajna [Wed, 3 Dec 2008 13:26:51 +0000 (14:26 +0100)]
rebase: use git rev-parse -q

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agopull: use git rev-parse -q
Miklos Vajna [Wed, 3 Dec 2008 13:26:50 +0000 (14:26 +0100)]
pull: use git rev-parse -q

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agolost-found: use git rev-parse -q
Miklos Vajna [Wed, 3 Dec 2008 13:26:49 +0000 (14:26 +0100)]
lost-found: use git rev-parse -q

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agofilter-branch: use git rev-parse -q
Miklos Vajna [Wed, 3 Dec 2008 13:26:48 +0000 (14:26 +0100)]
filter-branch: use git rev-parse -q

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-svn: Make branch use correct svn-remote
Deskin Miller [Tue, 2 Dec 2008 02:43:00 +0000 (21:43 -0500)]
git-svn: Make branch use correct svn-remote

The 'branch' subcommand incorrectly had the svn-remote to use hardcoded
as 'svn', the default remote name.  This meant that branches derived
from other svn-remotes would try to use the branch and tag configuration
for the 'svn' remote, potentially copying would-be branches to the wrong
place in SVN, into the branch namespace for another project.

Fix this by using the remote name extracted from the svn info for the
specified git ref.  Add a testcase for this behaviour.

[jc: squashed in a fix to test from Michael J Gruber for older svn (1.4)]

Signed-off-by: Deskin Miller <deskinm@umich.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jc/rm-i-t-a'
Junio C Hamano [Wed, 3 Dec 2008 08:38:12 +0000 (00:38 -0800)]
Merge branch 'jc/rm-i-t-a'

* jc/rm-i-t-a:
  git add --intent-to-add: do not let an empty blob be committed by accident
  git add --intent-to-add: fix removal of cached emptiness
  builtin-rm.c: explain and clarify the "local change" logic
  Extend index to save more flags

15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Dec 2008 08:34:58 +0000 (00:34 -0800)]
Merge branch 'maint'

* maint:
  xdiff: give up scanning similar lines early

15 years agoInstall git-stage in exec-path
Junio C Hamano [Wed, 3 Dec 2008 08:30:34 +0000 (00:30 -0800)]
Install git-stage in exec-path

Earlier the plan was to eventually eradicate git-foo executables from the
filesystem for all the built-in commands, but when we released 1.6.0 we
decided not to do so.  Instead, it has been promised that by prepending
the output from $(git --exec-path) to your $PATH, you can keep using the
dashed form of commands.

This also allows "git stage" to appear in the autogenerated command list,
which is used to offer man pages by "git help" command.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'jk/maint-commit-v-strip' into maint
Junio C Hamano [Wed, 3 Dec 2008 07:47:25 +0000 (23:47 -0800)]
Merge branch 'jk/maint-commit-v-strip' into maint

* jk/maint-commit-v-strip:
  commit: Fix stripping of patch in verbose mode.

15 years agoxdiff: give up scanning similar lines early
Davide Libenzi [Sat, 8 Nov 2008 05:24:33 +0000 (21:24 -0800)]
xdiff: give up scanning similar lines early

In a corner case of large files whose lines do not match uniquely, the
loop to eliminate a line that matches multiple locations adjacent to a run
of lines that do not uniquely match wasted too much cycles.  Fix this by
giving up early after scanning 100 lines in both direction.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'bc/maint-keep-pack' into maint
Junio C Hamano [Wed, 3 Dec 2008 07:00:04 +0000 (23:00 -0800)]
Merge branch 'bc/maint-keep-pack' into maint

* bc/maint-keep-pack:
  repack: only unpack-unreachable if we are deleting redundant packs
  t7700: test that 'repack -a' packs alternate packed objects
  pack-objects: extend --local to mean ignore non-local loose objects too
  sha1_file.c: split has_loose_object() into local and non-local counterparts
  t7700: demonstrate mishandling of loose objects in an alternate ODB
  builtin-gc.c: use new pack_keep bitfield to detect .keep file existence
  repack: do not fall back to incremental repacking with [-a|-A]
  repack: don't repack local objects in packs with .keep file
  pack-objects: new option --honor-pack-keep
  packed_git: convert pack_local flag into a bitfield and add pack_keep
  t7700: demonstrate mishandling of objects in packs with a .keep file

15 years agoMerge branch 'js/mingw-rename-fix' into maint
Junio C Hamano [Wed, 3 Dec 2008 06:38:07 +0000 (22:38 -0800)]
Merge branch 'js/mingw-rename-fix' into maint

* js/mingw-rename-fix:
  compat/mingw.c: Teach mingw_rename() to replace read-only files

15 years agogitweb: Fix handling of non-ASCII characters in inserted HTML files
Jakub Narebski [Mon, 1 Dec 2008 18:01:42 +0000 (19:01 +0100)]
gitweb: Fix handling of non-ASCII characters in inserted HTML files

Use new insert_file() subroutine to insert HTML chunks from external
files: $site_header, $home_text (by default indextext.html),
$site_footer, and $projectroot/$project/REAME.html.

All non-ASCII chars of those files will be broken by Perl IO layer
without decoding to utf8, so insert_file() does to_utf8() on each
printed line; alternate solution would be to open those files with
"binmode $fh, ':utf8'", or even all files with "use open qw(:std :utf8)".

Note that inserting README.html lost one of checks for simplicity.

Noticed-by: Tatsuki Sugiura <sugi@nemui.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-stash: use git rev-parse -q
Miklos Vajna [Tue, 2 Dec 2008 00:56:09 +0000 (01:56 +0100)]
git-stash: use git rev-parse -q

Don't redirect stderr to /dev/null, use -q to suppress the output on
stderr.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Dec 2008 00:13:21 +0000 (16:13 -0800)]
Merge branch 'maint'

* maint:
  User's Manual: remove duplicated url at the end of Appendix B

15 years agot4030-diff-textconv: Make octal escape sequence more portable
Johannes Sixt [Tue, 2 Dec 2008 08:31:01 +0000 (09:31 +0100)]
t4030-diff-textconv: Make octal escape sequence more portable

There are printfs around that do not grok '\1', but need '\01'.
Discovered on AIX 4.3.x.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAdd a built-in alias for 'stage' to the 'add' command
Scott Chacon [Tue, 2 Dec 2008 06:14:55 +0000 (22:14 -0800)]
Add a built-in alias for 'stage' to the 'add' command

This comes from conversation at the GitTogether where we thought it would
be helpful to be able to teach people to 'stage' files because it tends
to cause confusion when told that they have to keep 'add'ing them.

This continues the movement to start referring to the index as a
staging area (eg: the --staged alias to 'git diff'). Also adds a
doc file for 'git stage' that basically points to the docs for
'git add'.

Signed-off-by: Scott Chacon <schacon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoAdd backslash to list of 'crud' characters in real name
Linus Torvalds [Mon, 1 Dec 2008 16:41:50 +0000 (08:41 -0800)]
Add backslash to list of 'crud' characters in real name

We remove crud characters at the beginning and end of real-names so that
when we see email addresses like

From: "David S. Miller" <davem@davemloft.net>

we drop the quotes around the name when we parse that and split it up into
name and email.

However, the list of crud characters was basically just a random list of
common things that are found around names, and it didn't contain the
backslash character that some insane scripts seem to use when quoting
things. So now the kernel has a number of authors listed like

Author: \"Rafael J. Wysocki\ <rjw@sisk.pl>

because the author name had started out as

From: \"Rafael J. Wysocki\" <rjw@sisk.pl>

and the only "crud" character we noticed and removed was the final
double-quote at the end.

We should probably do better quote removal from names anyway, but this is
the minimal obvious patch.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: introduce NO_PTHREADS
Junio C Hamano [Sat, 15 Nov 2008 12:08:14 +0000 (04:08 -0800)]
Makefile: introduce NO_PTHREADS

This introduces make variable NO_PTHREADS for platforms that lack the
support for pthreads library or people who do not want to use it for
whatever reason.  When defined, it makes the multi-threaded index
preloading into a no-op, and also disables threaded delta searching by
pack-objects.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Tested-by: Johannes Sixt <j6t@kdbg.org> (AIX 4.3.x)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: describe how to "bisect skip" a range of commits
Christian Couder [Tue, 2 Dec 2008 13:53:51 +0000 (14:53 +0100)]
Documentation: describe how to "bisect skip" a range of commits

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
15 years agobisect: fix "git bisect skip <commit>" and add tests cases
Christian Couder [Tue, 2 Dec 2008 13:53:47 +0000 (14:53 +0100)]
bisect: fix "git bisect skip <commit>" and add tests cases

The patch that allows "git bisect skip" to be passed a range of
commits using the "<commit1>..<commit2>" notation is flawed because
it introduces a regression when it was passed a simple rev or commit.

"git bisect skip <commit>" doesn't work any more, because <commit>
is quoted but not properly unquoted.

This patch fixes that and add tests cases to better check when it is
passed commits and range of commits.

While at it, this patch also properly quotes the non range arguments
using the "sq" function.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
15 years agoUpdate comment on gitweb_check/get_feature
Giuseppe Bilotta [Tue, 2 Dec 2008 22:57:28 +0000 (14:57 -0800)]
Update comment on gitweb_check/get_feature

This is taken from a patch from Giuseppe but unfortunately it came
too late to replace the series that was already on "next".  The comment
he updated here is better than the version we had previously, so I am
cherry-picking this bit not to lose it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'gb/gitweb-feature'
Junio C Hamano [Tue, 2 Dec 2008 23:27:22 +0000 (15:27 -0800)]
Merge branch 'gb/gitweb-feature'

* gb/gitweb-feature:
  gitweb: make gitweb_check_feature a boolean wrapper
  gitweb: rename gitweb_check_feature to gitweb_get_feature
  gitweb: fix 'ctags' feature check and others

15 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Tue, 2 Dec 2008 23:27:05 +0000 (15:27 -0800)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.

15 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Tue, 2 Dec 2008 23:25:48 +0000 (15:25 -0800)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Add a menu option to start git gui
  gitk: Make line origin search update the busy status
  gitk: Update German translation
  gitk: Fix bug in accessing undefined "notflag" variable
  gitk: Highlight only when search type is "containing:".
  gitk: Fix context menu items for generating diffs when in tree mode

15 years agoUser's Manual: remove duplicated url at the end of Appendix B
Miklos Vajna [Mon, 1 Dec 2008 18:50:02 +0000 (19:50 +0100)]
User's Manual: remove duplicated url at the end of Appendix B

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.
Mark Burton [Tue, 2 Dec 2008 15:15:02 +0000 (15:15 +0000)]
git-gui: Teach start_push_anywhere_action{} to notice when remote is a mirror.

When the destination repository is a mirror, this function goofed by still
passing a refspec to git-push. Now it notices that the remote is a mirror
and holds the refspec.

Signed-off-by: Mark Burton <markb@ordern.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agogitk: Add a menu option to start git gui
Alexander Gavrilov [Thu, 13 Nov 2008 20:12:42 +0000 (23:12 +0300)]
gitk: Add a menu option to start git gui

Git gui already has menu commands to start gitk, and this makes the
relation symmetric.

[paulus@samba.org - changed "Git Gui" in the menu item to "git gui"]

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agogitk: Make line origin search update the busy status
Alexander Gavrilov [Mon, 1 Dec 2008 17:30:09 +0000 (20:30 +0300)]
gitk: Make line origin search update the busy status

Currently the 'show origin of this line' feature does not update the
status field of the gitk window, so it is not evident that any
processing is going on.  It may seem at first that clicking the item
had no effect.

This commit adds calls to set and clear the busy status with an
appropriate title, similar to other search commands.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agogitk: Update German translation
Christian Stimming [Sat, 25 Oct 2008 11:25:35 +0000 (13:25 +0200)]
gitk: Update German translation

This takes into account the most recent po file merge.

Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agogitk: Fix bug in accessing undefined "notflag" variable
Paul Mackerras [Mon, 1 Dec 2008 22:17:46 +0000 (09:17 +1100)]
gitk: Fix bug in accessing undefined "notflag" variable

As pointed out by Johannes Sixt and Alexander Gavrilov, commit
2958228430b63f2e38c55519d1f98d8d6d9e23f3 ("gitk: Fix switch statement
in parseviewargs") exposed a latent bug in that $notflag was never
initialized.  Since it isn't used either, this removes it entirely.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agogitk: Highlight only when search type is "containing:".
Paul Mackerras [Mon, 1 Dec 2008 22:02:46 +0000 (09:02 +1100)]
gitk: Highlight only when search type is "containing:".

When the search type is "touching paths" or "adding/removing string",
it's not very useful to highlight instances of the search string in
the commit message, headline or author name, so this disables the
highlighting in those cases.

This was suggested by Mark Burton <markb@ordern.com>, but the
implementation is different to his patch, which tested $gdttype at
each place where $markingmatches was tested.

Signed-off-by: Paul Mackerras <paulus@samba.org>
15 years agoGIT 1.6.1-rc1 v1.6.1-rc1
Junio C Hamano [Mon, 1 Dec 2008 07:01:53 +0000 (23:01 -0800)]
GIT 1.6.1-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoInclude git-gui--askpass in git-gui RPM package
Junio C Hamano [Mon, 1 Dec 2008 08:53:54 +0000 (00:53 -0800)]
Include git-gui--askpass in git-gui RPM package

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Mon, 1 Dec 2008 06:59:41 +0000 (22:59 -0800)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Avoid handling the Return key twice in Add Branch
  gitk: Show local changes properly when we have a path limit
  gitk: Fix switch statement in parseviewargs
  gitk: Index line[hnd]tag arrays by id rather than row number

15 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Mon, 1 Dec 2008 06:54:39 +0000 (22:54 -0800)]
Merge git://repo.or.cz/git-gui

* git://repo.or.cz/git-gui:
  git-gui: update Japanese translation
  git-gui: french translation update
  Updated Swedish translation (514t0f0u).
  git gui: update Italian translation
  Update Hungarian translation. 100% completed.

15 years agosend-email: do not reverse the command line arguments
Junio C Hamano [Mon, 1 Dec 2008 06:38:20 +0000 (22:38 -0800)]
send-email: do not reverse the command line arguments

The loop picks elements from @ARGV one by one, sifts them into arguments
meant for format-patch and the script itself, and pushes them to @files
and @rev_list_opts arrays.  Pick elements from @ARGV starting at the
beginning using shift, instead of at the end using pop, as push appends
them to the end of the array.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Mon, 1 Dec 2008 02:43:56 +0000 (18:43 -0800)]
Merge branch 'maint'

* maint:
  Update draft release notes to 1.6.0.5
  generate-cmdlist.sh: avoid selecting synopsis at wrong place

15 years agoUpdate draft release notes to 1.6.0.5
Junio C Hamano [Mon, 1 Dec 2008 02:33:20 +0000 (18:33 -0800)]
Update draft release notes to 1.6.0.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'st/maint-tag' into maint
Junio C Hamano [Mon, 1 Dec 2008 02:18:50 +0000 (18:18 -0800)]
Merge branch 'st/maint-tag' into maint

* st/maint-tag:
  tag: Add more tests about mixing incompatible modes and options
  tag: Check that options are only allowed in the appropriate mode

15 years agoMerge branch 'mk/maint-cg-push' into maint
Junio C Hamano [Mon, 1 Dec 2008 02:18:11 +0000 (18:18 -0800)]
Merge branch 'mk/maint-cg-push' into maint

* mk/maint-cg-push:
  git push: Interpret $GIT_DIR/branches in a Cogito compatible way

15 years agogenerate-cmdlist.sh: avoid selecting synopsis at wrong place
Nguyễn Thái Ngọc Duy [Sun, 30 Nov 2008 10:54:31 +0000 (17:54 +0700)]
generate-cmdlist.sh: avoid selecting synopsis at wrong place

In "common" man pages there is luckily no "NAME" anywhere except at
beginning of documents. If there is another "NAME", sed could
mis-select it and lead to common-cmds.h corruption. So better nail it
at beginning of line, which would reduce corruption chance.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitweb: make gitweb_check_feature a boolean wrapper
Giuseppe Bilotta [Sat, 29 Nov 2008 21:07:29 +0000 (13:07 -0800)]
gitweb: make gitweb_check_feature a boolean wrapper

The gitweb_get_feature() function retrieves the configuration parameters
for the feature (such as the list of snapshot formats or the list of
additional actions), but it is very often used to see if feature is
enabled (which is returned as the first element in the list).

Because accepting the returned list in the scalar context by mistake
yields the number of elements in the array, which is non-zero in all
cases, such a mistake would result in a bug for the latter use, with
disabled features appearing enabled.  All existing callers that call the
function for this purpose assign the return value in the list context to
retrieve the first element, but that is only because we fixed careless
callers recently.

This adds gitweb_check_feature() as a wrapper to gitweb_get_feature() that
can be called safely in the scalar context to see if a feature is enabled
to reduce the risk of future bugs.  Callers of "get" that use the call
only to see if the feature is enabled are updated to call this wrapper.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitweb: rename gitweb_check_feature to gitweb_get_feature
Junio C Hamano [Sat, 29 Nov 2008 21:02:08 +0000 (13:02 -0800)]
gitweb: rename gitweb_check_feature to gitweb_get_feature

The function is about retrieving the configuration parameter list for the
feature.  A more robust way to check if a feature is enabled will be
introduced in the next patch, and the function will be called
gitweb_check_feature.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogitweb: fix 'ctags' feature check and others
Junio C Hamano [Sat, 29 Nov 2008 20:53:41 +0000 (12:53 -0800)]
gitweb: fix 'ctags' feature check and others

gitweb_check_feature() function is to retrieve the configuration parameter
list and calling it in the scalar context does not give its first element
that tells if the feature is enabled.  This fixes all the existing callers
to call the function correctly in the list context.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit add --intent-to-add: do not let an empty blob be committed by accident
Junio C Hamano [Sat, 29 Nov 2008 03:56:34 +0000 (19:56 -0800)]
git add --intent-to-add: do not let an empty blob be committed by accident

Writing a tree out of an index with an "intent to add" entry is blocked.
This implies that you cannot "git commit" from such a state; however you
can still do "git commit -a" or "git commit $that_path".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit add --intent-to-add: fix removal of cached emptiness
Junio C Hamano [Sat, 29 Nov 2008 03:55:25 +0000 (19:55 -0800)]
git add --intent-to-add: fix removal of cached emptiness

This uses the extended index flag mechanism introduced earlier to mark
the entries added to the index via "git add -N" with CE_INTENT_TO_ADD.

The logic to detect an "intent to add" entry for the purpose of allowing
"git rm --cached $path" is tightened to check not just for a staged empty
blob, but with the CE_INTENT_TO_ADD bit.  This protects an empty blob that
was explicitly added and then modified in the work tree from being dropped
with this sequence:

$ >empty
$ git add empty
$ echo "non empty" >empty
$ git rm --cached empty

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-rm.c: explain and clarify the "local change" logic
Junio C Hamano [Sat, 29 Nov 2008 02:41:21 +0000 (18:41 -0800)]
builtin-rm.c: explain and clarify the "local change" logic

Explain the logic to check local modification a bit more in the comment,
especially because the existing comment that talks about "git rm --cached"
was placed in a part that was not about "--cached" at all.

Also clarify "if .. else if .." structure.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'nd/narrow' (early part) into jc/add-i-t-a
Junio C Hamano [Sat, 29 Nov 2008 01:22:35 +0000 (17:22 -0800)]
Merge branch 'nd/narrow' (early part) into jc/add-i-t-a

* 'nd/narrow' (early part):
  Extend index to save more flags

15 years agoMerge branch 'cc/bisect-skip'
Junio C Hamano [Fri, 28 Nov 2008 03:25:25 +0000 (19:25 -0800)]
Merge branch 'cc/bisect-skip'

* cc/bisect-skip:
  bisect: teach "skip" to accept special arguments like "A..B"

15 years agoMerge branch 'js/mingw-rename-fix'
Junio C Hamano [Fri, 28 Nov 2008 03:25:06 +0000 (19:25 -0800)]
Merge branch 'js/mingw-rename-fix'

* js/mingw-rename-fix:
  compat/mingw.c: Teach mingw_rename() to replace read-only files

15 years agoMerge branch 'st/levenshtein'
Junio C Hamano [Fri, 28 Nov 2008 03:24:47 +0000 (19:24 -0800)]
Merge branch 'st/levenshtein'

* st/levenshtein:
  Document levenshtein.c
  Fix deletion of last character in levenshtein distance

15 years agoMerge branch 'cr/remote-update-v'
Junio C Hamano [Fri, 28 Nov 2008 03:24:40 +0000 (19:24 -0800)]
Merge branch 'cr/remote-update-v'

* cr/remote-update-v:
  git-remote: add verbose mode to git remote update

15 years agoMerge branch 'rs/strbuf-expand'
Junio C Hamano [Fri, 28 Nov 2008 03:24:36 +0000 (19:24 -0800)]
Merge branch 'rs/strbuf-expand'

* rs/strbuf-expand:
  remove the unused files interpolate.c and interpolate.h
  daemon: deglobalize variable 'directory'
  daemon: inline fill_in_extra_table_entries()
  daemon: use strbuf_expand() instead of interpolate()
  merge-recursive: use strbuf_expand() instead of interpolate()
  add strbuf_expand_dict_cb(), a helper for simple cases

15 years agoMerge branch 'mv/clone-strbuf'
Junio C Hamano [Fri, 28 Nov 2008 03:24:25 +0000 (19:24 -0800)]
Merge branch 'mv/clone-strbuf'

* mv/clone-strbuf:
  builtin_clone: use strbuf in cmd_clone()
  builtin-clone: use strbuf in clone_local() and copy_or_link_directory()
  builtin-clone: use strbuf in guess_dir_name()

15 years agoMerge branch 'lt/preload-lstat'
Junio C Hamano [Fri, 28 Nov 2008 03:24:13 +0000 (19:24 -0800)]
Merge branch 'lt/preload-lstat'

* lt/preload-lstat:
  Fix index preloading for racy dirty case
  Add cache preload facility

15 years agoMerge branch 'ta/quiet-pull'
Junio C Hamano [Fri, 28 Nov 2008 03:24:11 +0000 (19:24 -0800)]
Merge branch 'ta/quiet-pull'

* ta/quiet-pull:
  Retain multiple -q/-v occurrences in git pull
  Teach/Fix pull/fetch -q/-v options

15 years agoMerge branch 'ph/send-email'
Junio C Hamano [Fri, 28 Nov 2008 03:24:00 +0000 (19:24 -0800)]
Merge branch 'ph/send-email'

* ph/send-email:
  git send-email: ask less questions when --compose is used.
  git send-email: add --annotate option
  git send-email: interpret unknown files as revision lists
  git send-email: make the message file name more specific.

15 years agoMerge branch 'maint'
Junio C Hamano [Fri, 28 Nov 2008 03:23:51 +0000 (19:23 -0800)]
Merge branch 'maint'

* 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

15 years agoMerge branch 'mv/fast-export' into maint
Junio C Hamano [Fri, 28 Nov 2008 03:23:27 +0000 (19:23 -0800)]
Merge branch 'mv/fast-export' into maint

* mv/fast-export:
  fast-export: use an unsorted string list for extra_refs
  Add new testcase to show fast-export does not always exports all tags

15 years agosha1_file.c: resolve confusion EACCES vs EPERM
Sam Vilain [Fri, 14 Nov 2008 07:19:34 +0000 (20:19 +1300)]
sha1_file.c: resolve confusion EACCES vs EPERM

An earlier commit 916d081 (Nicer error messages in case saving an object
to db goes wrong, 2006-11-09) confused EACCES with EPERM, the latter of
which is an unlikely error from mkstemp().

Signed-off-by: Sam Vilain <sam@vilain.net>
15 years agosha1_file: avoid bogus "file exists" error message
Joey Hess [Thu, 20 Nov 2008 18:56:28 +0000 (13:56 -0500)]
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>
15 years agogit checkout: don't warn about unborn branch if -f is already passed
Matt McCutchen [Mon, 24 Nov 2008 06:55:22 +0000 (01:55 -0500)]
git checkout: don't warn about unborn branch if -f is already passed

I think it's unnecessary to warn that the checkout has been forced due to an
unborn current branch if -f has been explicitly passed.  For one project, I am
using git-new-workdir to create workdirs from a bare repository whose HEAD is
set to an unborn branch, and this warning started to irritate me.

Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: offer refs instead of filenames for 'git revert'
SZEDER Gábor [Thu, 27 Nov 2008 13:35:53 +0000 (14:35 +0100)]
bash: offer refs instead of filenames for 'git revert'

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>
15 years agobash: complete full refs
SZEDER Gábor [Fri, 28 Nov 2008 00:46:38 +0000 (01:46 +0100)]
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>
15 years agobash: remove dashed command leftovers
SZEDER Gábor [Thu, 27 Nov 2008 13:35:38 +0000 (14:35 +0100)]
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>
15 years agoMerge branch 'pw/maint-p4' into maint
Junio C Hamano [Thu, 27 Nov 2008 21:18:25 +0000 (13:18 -0800)]
Merge branch 'pw/maint-p4' into maint

* pw/maint-p4:
  git-p4: fix keyword-expansion regex

15 years agogit-p4: fix keyword-expansion regex
Pete Wyckoff [Wed, 26 Nov 2008 18:52:15 +0000 (13:52 -0500)]
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>
15 years agoFix typos in the documentation.
Ralf Wildenhues [Thu, 27 Nov 2008 07:32:01 +0000 (08:32 +0100)]
Fix typos in the documentation.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'rw/maint-typofix' into rw/typofix
Junio C Hamano [Thu, 27 Nov 2008 09:17:09 +0000 (01:17 -0800)]
Merge branch 'rw/maint-typofix' into rw/typofix

* rw/maint-typofix:
  Fix typos in the documentation.

15 years agoFix typos in the documentation.
Ralf Wildenhues [Thu, 27 Nov 2008 07:32:01 +0000 (08:32 +0100)]
Fix typos in the documentation.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-gui: update Japanese translation
Nanako Shiraishi [Wed, 26 Nov 2008 10:21:44 +0000 (19:21 +0900)]
git-gui: update Japanese translation

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 26 Nov 2008 19:57:31 +0000 (11:57 -0800)]
Merge branch 'maint'

* maint:
  Teach "git diff" to honour --[no-]ext-diff

15 years agoMerge branch 'mm/sort-config-doc'
Junio C Hamano [Wed, 26 Nov 2008 19:57:28 +0000 (11:57 -0800)]
Merge branch 'mm/sort-config-doc'

* mm/sort-config-doc:
  config.txt: alphabetize configuration sections

15 years agoMerge branch 'mm/maint-sort-config-doc' into maint
Junio C Hamano [Wed, 26 Nov 2008 19:57:15 +0000 (11:57 -0800)]
Merge branch 'mm/maint-sort-config-doc' into maint

* mm/maint-sort-config-doc:
  config.txt: alphabetize configuration sections

15 years agoMerge branch 'mm/maint-sort-config-doc' into mm/sort-config-doc
Junio C Hamano [Wed, 26 Nov 2008 19:11:18 +0000 (11:11 -0800)]
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

15 years agoconfig.txt: alphabetize configuration sections
Matt McCutchen [Wed, 26 Nov 2008 08:26:50 +0000 (03:26 -0500)]
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>
15 years agoxdiff-interface.c: remove 10 duplicated lines
Jim Meyering [Wed, 26 Nov 2008 13:27:10 +0000 (14:27 +0100)]
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>
15 years agot9129-git-svn-i18n-commitencoding: Make compare_svn_head_with() compatible with OSX sed
Marcel Koeppen [Wed, 26 Nov 2008 16:51:01 +0000 (17:51 +0100)]
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>
15 years agoTeach "git diff" to honour --[no-]ext-diff
Junio C Hamano [Wed, 26 Nov 2008 17:58:41 +0000 (09:58 -0800)]
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>
15 years agosend-email: Fix Pine address book parsing
Trent Piepho [Wed, 26 Nov 2008 02:55:00 +0000 (18:55 -0800)]
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>
15 years agoMerge branch 'for-junio' of git://source.winehq.org/~julliard/git/git
Junio C Hamano [Wed, 26 Nov 2008 05:52:28 +0000 (21:52 -0800)]
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.

15 years agobisect: teach "skip" to accept special arguments like "A..B"
Christian Couder [Sun, 23 Nov 2008 21:02:49 +0000 (22:02 +0100)]
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>
15 years agobuiltin_clone: use strbuf in cmd_clone()
Miklos Vajna [Fri, 21 Nov 2008 00:45:01 +0000 (01:45 +0100)]
builtin_clone: use strbuf in cmd_clone()

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-clone: use strbuf in clone_local() and copy_or_link_directory()
Miklos Vajna [Fri, 21 Nov 2008 00:45:00 +0000 (01:45 +0100)]
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>
15 years agobuiltin-clone: use strbuf in guess_dir_name()
Miklos Vajna [Fri, 21 Nov 2008 00:44:59 +0000 (01:44 +0100)]
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>
15 years agoMerge branch 'maint'
Junio C Hamano [Mon, 24 Nov 2008 04:36:54 +0000 (20:36 -0800)]
Merge branch 'maint'

* maint:
  Fix misleading wording for git-cherry-pick

15 years agoremove the unused files interpolate.c and interpolate.h
René Scharfe [Sat, 22 Nov 2008 23:16:59 +0000 (00:16 +0100)]
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>
15 years agodaemon: deglobalize variable 'directory'
René Scharfe [Sat, 22 Nov 2008 23:21:52 +0000 (00:21 +0100)]
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 49ba83fb67d9e447b86953965ce5f949c6a93b81.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodaemon: inline fill_in_extra_table_entries()
René Scharfe [Sat, 22 Nov 2008 23:19:09 +0000 (00:19 +0100)]
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>
15 years agodaemon: use strbuf_expand() instead of interpolate()
René Scharfe [Sat, 22 Nov 2008 23:15:01 +0000 (00:15 +0100)]
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>
15 years agomerge-recursive: use strbuf_expand() instead of interpolate()
René Scharfe [Sat, 22 Nov 2008 23:13:00 +0000 (00:13 +0100)]
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>