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

14472 Commits

Author SHA1 Message Date
Anders Waldenborg
dee2775a29 gitweb: Convert string to internal form before chopping in chop_str
Fix chop_str not to cut in middle of utf8 multibyte chars. Without
this fix at least author name in short log may cut in middle of a
multibyte char. When the result comes to esc_html to_utf8 is called
again, which doesn't find valid utf8 and decodes using
$fallback_encoding making it even worse.

This also have the nice side effect that it actually tries to show the
first 10 _characters_, not the number of characters that happened to fit
into 10 bytes.

Signed-off-by: Anders Waldenborg <anders@0x63.nu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:03:43 -07:00
Junio C Hamano
1af8bca797 Merge branch 'maint'
* maint:
  git-am: fix typo in usage message
  doc/git-daemon: s/uploadarchive/uploadarch/
2008-05-21 14:42:30 -07:00
Junio C Hamano
008442f5e7 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  git-am: fix typo in usage message
  doc/git-daemon: s/uploadarchive/uploadarch/
2008-05-21 14:27:59 -07:00
Junio C Hamano
9d880582ee Merge branch 'ar/add-unreadable'
* ar/add-unreadable:
  Add a config option to ignore errors for git-add
  Add a test for git-add --ignore-errors
  Add --ignore-errors to git-add to allow it to skip files with read errors
  Extend interface of add_files_to_cache to allow ignore indexing errors
  Make the exit code of add_file_to_index actually useful
2008-05-21 14:16:46 -07:00
Junio C Hamano
8fe114a6e1 Merge branch 'ds/branch-auto-rebase'
* ds/branch-auto-rebase:
  Allow tracking branches to set up rebase by default.
2008-05-21 14:16:33 -07:00
Junio C Hamano
f0abea652b Merge branch 'sv/first-parent'
* sv/first-parent:
  revision.c: really honor --first-parent
  Simplify and fix --first-parent implementation
2008-05-21 14:15:52 -07:00
Junio C Hamano
1fe82d609f Merge branch 'np/pack'
* np/pack:
  pack-objects: fix early eviction for max depth delta objects
  pack-objects: allow for early delta deflating
  pack-objects: move compression code in a separate function
  pack-objects: clean up write_object() a bit
  pack-objects: simplify the condition associated with --all-progress
  pack-objects: remove some double negative logic
  pack-objects: small cleanup
2008-05-21 14:15:19 -07:00
Junio C Hamano
c748152612 Merge branch 'as/graph'
* as/graph:
  graph API: eliminate unnecessary indentation
  log and rev-list: add --graph option
  Add history graph API
  revision API: split parent rewriting and parent printing options
2008-05-21 14:05:02 -07:00
Junio C Hamano
c01cdde186 Merge branch 'jk/maint-send-email-compose'
* jk/maint-send-email-compose:
  send-email: rfc2047-quote subject lines with non-ascii characters
  send-email: specify content-type of --compose body

Conflicts:

	t/t9001-send-email.sh

Due to 065096c (git-send-email.perl: Handle shell metacharacters in
$EDITOR properly, 2008-05-04) which is a backward incompatible change (but
it makes handling of EDITOR consistent with other parts of the system),
the test script t9001 had to be adjusted.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:57:50 -07:00
Junio C Hamano
2c0577f74b Merge branch 'hb/maint-send-email-quote-recipients'
* hb/maint-send-email-quote-recipients:
  Fix recipient santitization
2008-05-21 13:09:31 -07:00
Trent Piepho
325abb7b1a cvsexportcommit: Create config option for CVS dir
For a given project the directory used with the -w option is almost always
the same each time.  Let it be specified with 'cvsexportcommit.cvsdir' so
it's not necessary to manually add it with -w each time.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:07:41 -07:00
Horst H. von Brand
18023c2065 Fix recipient santitization
Need to quote all special characters, not just the first one

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:50 -07:00
Jeff King
d54eaaa268 send-email: rfc2047-quote subject lines with non-ascii characters
We always use 'utf-8' as the encoding, since we currently
have no way of getting the information from the user.

This also refactors the quoting of recipient names, since
both processes can share the rfc2047 quoting code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:10 -07:00
Jeff King
0706bd19ef send-email: specify content-type of --compose body
If the compose message contains non-ascii characters, then
we assume it is in utf-8 and include the appropriate MIME
headers. If the user has already included a MIME-Version
header, then we assume they know what they are doing and
don't add any headers.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 13:05:09 -07:00
Christian Couder
824b5dc29c Documentation: rev-parse: add a few "--verify" and "--default" examples
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 12:57:18 -07:00
Miklos Vajna
c3170a83d6 git-merge: exclude unnecessary options from OPTIONS_SPEC
gitcli(5) already documents them, and there are no options named
--no-no-stat, --no-no-summary and --no-no-log.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 12:54:49 -07:00
Alex Riesen
26ec126a91 Fix t3701 if core.filemode disabled
[jc: squashed in suggestions from Jeff King]

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 11:20:34 -07:00
Marcel Koeppen
4be1fe1b94 Fix prepare-commit-msg hook and replace in-place sed
The patterns to the case statement could never be matched, so the hook
was a noop. This patch also replaces the non-portable use of in-place sed.

Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 09:45:53 -07:00
Jeff King
e77b0b5d0f git-am: fix typo in usage message
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-19 22:47:16 -07:00
Jeff King
74190d2363 doc/git-daemon: s/uploadarchive/uploadarch/
The git-daemon upload-archive feature has always used the
config directive 'daemon.uploadarch'; the documentation
which came later seems to have just mistakenly used the
wrong name.

Noticed by lionel@over-blog.com.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-19 22:46:13 -07:00
Gustaf Hendeby
6923972823 Documentation: Add missing git svn commands
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-19 22:42:29 -07:00
Brandon Casey
9231e3a953 t/Makefile: "trash" directory was renamed recently
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-18 21:39:58 -07:00
Alex Riesen
2a028a0cab Ensure that a test is run in the trash directory
Exit with error if cd into the "trash directory" failed (error
already reported, so just exit).

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-18 21:39:22 -07:00
Mike Ralphson
377d9c409f Makefile: update the default build options for AIX
NO_MKDTEMP is required to build, FREAD_READS_DIRECTORIES and the definition
of _LARGE_FILES fix test suite failures and INTERNAL_QSORT is required for
adequate performance.

Tested on AIX v5.3 Maintenance Level 06

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
Tested-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-17 02:39:30 -07:00
Junio C Hamano
6d2c1c2dc0 Merge branch 'maint'
* maint:
  git-filter-branch: Clarify file removal example.
2008-05-16 22:10:13 -07:00
Marcel Koeppen
d16d5cdf59 Replace in-place sed in t7502-commit
The in-place mode of sed used in t7502-commit is a non-POSIX extension.
That call of sed is replaced by a more portable version using a temporary file.

Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 22:05:22 -07:00
Jon Loeliger
e4d594c6bd git-filter-branch: Clarify file removal example.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 13:13:24 -07:00
Johannes Schindelin
be4d2c83b6 submodule update: add convenience option --init
When a submodule is not initialized and you do not want to change the
defaults from .gitmodules anyway, you can now say

	$ git submodule update --init <name>

When "update" is called without --init on an uninitialized submodule,
a hint to use --init is printed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 13:03:55 -07:00
Miklos Vajna
b30317819d git-fast-import: rename cmd_*() functions to parse_*()
There is a cmd_merge() function in fast-import that will conflict with
builtin-merge's cmd_merge() function. To keep it consistent, rename all
cmd_*() function to parse_*()

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 12:40:09 -07:00
Teemu Likonen
ed02091714 Documentation/git-web--browse.txt: fix small typo
Change "brower.konqueror.path" to "browser.konqueror.path" in
documentation.

Signed-off-by: Teemu Likonen <tlikonen@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 12:39:35 -07:00
Imran M Yousuf
a5099bb417 Use '-f' option to point to the .gitmodules file
'git config' has a '-f' option that takes the file to parse.
Using it rather than the environment variable seems more logical
and simplified.

Signed-off-by: Imran M Yousuf <imyousuf@smartitengineering.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-16 12:38:52 -07:00
Junio C Hamano
1fbb58b415 Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
  git-gui: Delete branches with 'git branch -D' to clear config
  git-gui: Setup branch.remote,merge for shorthand git-pull
  git-gui: Update German translation
  git-gui: Don't use '$$cr master' with aspell earlier than 0.60
  git-gui: Report less precise object estimates for database compression
2008-05-15 01:31:15 -07:00
Chris Frey
58949bb18a Documentation/git-prune.txt: document unpacked logic
Clarifies the git-prune man page, documenting that it only
prunes unpacked objects.

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-15 01:30:25 -07:00
Junio C Hamano
c7ea453618 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk: (44 commits)
  gitk: Add a progress bar for checking out a head
  gitk: Show current row number and total number of rows
  gitk: Allow users to view diffs in external diff viewer
  gitk: Synchronize highlighting in file view for 'f' and 'b' commands
  gitk: Make updates go faster
  gitk: Disable "Reset %s branch to here" when on a detached head
  gitk: German translation again updated
  gitk: Update German translation
  gitk: Makefile/install: force permissions when installing files and dirs
  gitk: Initial Swedish translation.
  gitk: Spanish translation of gitk
  gitk: Fix handling of tree file list with special chars in names
  gitk: Reorganize processing of arguments for git log
  gitk: Fix problem with target row not being in scroll region
  gitk: Avoid a crash in selectline if commitinfo($id) isn't set
  gitk: Fix some corner cases in computing vrowmod and displayorder
  gitk: Correct a few strings and comments to say "git log"
  gitk: Don't filter view arguments through git rev-parse
  gitk: Fix problems with target row stuff
  gitk: Handle updating with path limiting better
  ...
2008-05-14 21:27:55 -07:00
Junio C Hamano
4b172de81b Merge branch 'maint'
* maint:
  Documentation/git-describe.txt: make description more readable
2008-05-14 13:55:17 -07:00
Junio C Hamano
a473445ac2 Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  Documentation/git-describe.txt: make description more readable
2008-05-14 13:46:42 -07:00
Junio C Hamano
b66ae7955c Merge branch 'sb/committer'
* sb/committer:
  commit: Show committer if automatic
  commit: Show author if different from committer
  Preparation to call determine_author_info from prepare_to_commit
2008-05-14 13:45:20 -07:00
Junio C Hamano
761adeb4db Merge branch 'bd/tests'
* bd/tests:
  Rename the test trash directory to contain spaces.
  Fix tests breaking when checkout path contains shell metacharacters
  Don't use the 'export NAME=value' in the test scripts.
  lib-git-svn.sh: Fix quoting issues with paths containing shell metacharacters
  test-lib.sh: Fix some missing path quoting
  Use test_set_editor in t9001-send-email.sh
  test-lib.sh: Add a test_set_editor function to safely set $VISUAL
  git-send-email.perl: Handle shell metacharacters in $EDITOR properly
  config.c: Escape backslashes in section names properly
  git-rebase.sh: Fix --merge --abort failures when path contains whitespace

Conflicts:

	t/t9115-git-svn-dcommit-funky-renames.sh
2008-05-14 13:45:16 -07:00
Junio C Hamano
486d1a5644 Merge branch 'mv/format-cc'
* mv/format-cc:
  Add tests for sendemail.cc configuration variable
  git-send-email: add a new sendemail.cc configuration variable
  git-format-patch: add a new format.cc configuration variable
2008-05-14 13:34:34 -07:00
Junio C Hamano
29182f7da4 Merge branch 'cc/hooks-doc'
* cc/hooks-doc:
  Documentation: rename "hooks.txt" to "githooks.txt" and make it a man page
2008-05-14 13:34:23 -07:00
Junio C Hamano
adf59ec127 Merge branch 'jk/renamelimit' (early part)
* 'jk/renamelimit' (early part):
  diff: make "too many files" rename warning optional
  bump rename limit defaults
  add merge.renamelimit config option
2008-05-14 12:37:28 -07:00
Ian Hilt
b7893cde53 Documentation/git-describe.txt: make description more readable
Signed-off-by: Ian Hilt <ian.hilt@gmail.com>
Credit-to: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-14 11:47:03 -07:00
Jeff King
0bdf93cbf0 filter-branch: fix variable export logic
filter-branch tries to restore "old" copies of some
environment variables by using the construct:

  unset var
  test -z "$old_var" || var="$old_var" && export var

This is just wrong.  AND-list and OR-list operators && and || have equal
precedence and they bind left to right.  The second term, var="$old"
assignment always succeeds, so we always end up exporting var.

On bash and dash, exporting an unset variable has no effect. However, on
some shells (such as FreeBSD's /bin/sh), the shell exports the empty
value.

This manifested itself in this case as git-filter-branch setting
GIT_INDEX_FILE to the empty string, which in turn caused its call to
git-read-tree to fail, leaving the working tree pointing at the original
HEAD instead of the rewritten one.

To fix this, we change the short-circuit logic to better match the intent:

  test -z "$old_var" || {
    var="$old_var" && export var
  }

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13 21:45:28 -07:00
Jeff King
6d9878cc60 clone: bsd shell portability fix
When using /bin/sh from FreeBSD 6.1, the value of $? is lost
when calling a function inside the 'trap' action. This
resulted in clone erroneously indicating success when it
should have reported failure.

As a workaround, we save the value of $? before calling any
functions.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13 21:45:28 -07:00
Jeff King
30684dfaf8 t5000: tar portability fix
The output of 'tar tv' varies from system to system. In
particular, the t5000 was expecting to parse the date from
something like:

  -rw-rw-r-- root/root         0 2008-05-13 04:27 file

but FreeBSD's tar produces this:

  -rw-rw-r--  0 root   root        0 May 13 04:27 file

Instead of relying on tar's output, let's just extract the
file using tar and stat the result using perl.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13 21:45:28 -07:00
Jeff King
bbf08124e0 fix bsd shell negation
On some shells (notably /bin/sh on FreeBSD 6.1), the
construct

  foo && ! bar | baz

is true if

  foo && baz

whereas for most other shells (such as bash) is true if

  foo && ! baz

We can work around this by specifying

  foo && ! (bar | baz)

which works everywhere.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-13 21:44:48 -07:00
Alex Riesen
dad25e4a7c Add a config option to ignore errors for git-add
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12 21:40:15 -07:00
Alex Riesen
8959743645 Add a test for git-add --ignore-errors
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12 21:22:50 -07:00
Alex Riesen
984b83ef23 Add --ignore-errors to git-add to allow it to skip files with read errors
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12 20:54:52 -07:00
Alex Riesen
7ae02a30e8 Extend interface of add_files_to_cache to allow ignore indexing errors
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-12 20:54:52 -07:00