Commit graph

14529 commits

Author SHA1 Message Date
Junio C Hamano 325566cc5d Merge branch 'cc/bisect'
* cc/bisect:
  bisect: use a detached HEAD to bisect
  bisect: trap critical errors in "bisect_start"
  bisect: fix left over "BISECT_START" file when starting with junk rev
  bisect: add test cases to check that "git bisect start" is atomic
2008-05-25 13:38:03 -07:00
Junio C Hamano 834836bd3f Merge branch 'ap/svn'
* ap/svn:
  git-svn: add test for --add-author-from and --use-log-author
  git-svn: add documentation for --add-author-from option.
  git-svn: Add --add-author-from option.
  git-svn: add documentation for --use-log-author option.
2008-05-25 13:37:25 -07:00
Junio C Hamano 6c99f18660 Merge branch 'js/cvsexportcommit'
* js/cvsexportcommit:
  cvsexportcommit: introduce -W for shared working trees (between Git and CVS)
  cvsexportcommit: chomp only removes trailing whitespace

Conflicts:

	git-cvsexportcommit.perl
2008-05-25 13:37:20 -07:00
Junio C Hamano 7e83003029 Merge branch 'js/ignore-submodule'
* js/ignore-submodule:
  Ignore dirty submodule states during rebase and stash
  Teach update-index about --ignore-submodules
  diff options: Introduce --ignore-submodules
2008-05-25 13:37:08 -07:00
Junio C Hamano 58dd4915ba Merge branch 'mo/cvsserver'
* mo/cvsserver:
  Documentation: Fix skipped section level
  git-cvsserver: add ability to guess -kb from contents
  implement gitcvs.usecrlfattr
  git-cvsserver: add mechanism for managing working tree and current directory
2008-05-25 13:37:04 -07:00
Clemens Buchacher 6a491a1765 http-push: remove remote locks on exit signals
If locks are not cleaned up the repository is inaccessible for 10 minutes.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 13:07:24 -07:00
Clemens Buchacher a129293938 Reset the signal being handled
This did not cause any problems, because remove_lock_file_on_signal is
only registered for SIGINT.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 13:06:55 -07:00
Paul Oliver 509792b94f Make git-cvsimport remove ['s from tags, as bad_ref_char doesn't allow them.
Signed-off-by: Paul Oliver <puzza007@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25 13:06:49 -07:00
Christian Couder b27a23e35d Documentation: convert tutorials to man pages
This patch renames the following documents and at the same time converts
them to the man page format:

cvs-migration.txt -> gitcvs-migration.txt
tutorial.txt      -> gittutorial.txt
tutorial-2.txt    -> gittutorial-2.txt

These new man pages are put in section 7, and other documents that reference
the above ones are change accordingly.

[jc: with help from Nanako to clean things up]

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24 22:28:16 -07:00
Miklos Vajna 0b0b8cd7c2 CodingGuidelines: Add a note to avoid assignments inside if()
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24 22:13:19 -07:00
Heikki Orsila 633f43e1f7 Remove redundant code, eliminate one static variable
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24 22:05:06 -07:00
Junio C Hamano 998b912927 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Fix bug introduced by "gitk: Fix "wrong # coordinates" error on reload"
  gitk: Fix bug where current row number display stops working
  gitk: Move es.po where it belongs
  gitk: Fix "wrong # coordinates" error on reload
2008-05-23 18:28:52 -07:00
Junio C Hamano 182fb4df91 Merge branch 'pb/push'
* pb/push:
  add special "matching refs" refspec
2008-05-23 16:06:07 -07:00
Junio C Hamano e5e9714a10 Merge branch 'bc/repack'
* bc/repack:
  Documentation/git-repack.txt: document new -A behaviour
  let pack-objects do the writing of unreachable objects as loose objects
  add a force_object_loose() function
  builtin-gc.c: deprecate --prune, it now really has no effect
  git-gc: always use -A when manually repacking
  repack: modify behavior of -A option to leave unreferenced objects unpacked

Conflicts:

	builtin-pack-objects.c
2008-05-23 16:06:01 -07:00
Junio C Hamano 6aad47dec7 Merge branch 'sp/ignorecase'
* sp/ignorecase:
  t0050: Fix merge test on case sensitive file systems
  t0050: Add test for case insensitive add
  t0050: Set core.ignorecase case to activate case insensitivity
  t0050: Test autodetect core.ignorecase
  git-init: autodetect core.ignorecase
2008-05-23 16:05:52 -07:00
Junio C Hamano e13067a749 Merge branch 'maint'
* maint:
  rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
  Add missing "short" alternative to --date in rev-list-options.txt
  git-show.txt: Not very stubby these days.
  Clarify repack -n documentation
2008-05-23 16:05:46 -07:00
Heikki Orsila dd0ffd5b31 Add log.date config variable
log.date config variable sets the default date-time mode for the log
command. Setting log.date value is similar to using git log's --date
option.

Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23 16:05:42 -07:00
Junio C Hamano 77599cc0bb Merge branch 'maint-1.5.4' into maint
* maint-1.5.4:
  rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
2008-05-23 15:52:43 -07:00
Johannes Sixt e00f3790b8 rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
The intention of --symbolic-full-name is to not print anything if a
revision is not an exact ref. But this command:

    $ git-rev-parse --symbolic-full-name --not master~1

still emitted a sole '^' to stdout (provided that there's no other ref at
master~1). This fixes it.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23 15:52:20 -07:00
Chris Parsons 950ce2e22d Updated status to show 'Not currently on any branch' in red
This provides additional warning to users when attempting to
commit to a detached HEAD. It is configurable in color.status.nobranch.

Signed-off-by: Chris Parsons <chris@edendevelopment.co.uk>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:51:22 -07:00
Heikki Orsila 26b4d0039d Add missing "short" alternative to --date in rev-list-options.txt
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:29:46 -07:00
Jon Loeliger 3a3e097b86 git-show.txt: Not very stubby these days.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:21:30 -07:00
Shawn O. Pearce c30f9936b0 Clarify repack -n documentation
While repacking a local repository a coworker thought the -n option
was necessary to git-repack to keep it from updating some unknown
file on the central server we all share.  Explaining further what
the option is (not) doing helps to make it clear the option does
not impact any remote repositories the user may have configured.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:21:29 -07:00
Johannes Schindelin f9189cf8f2 pull --rebase: exit early when the working directory is dirty
When rebasing fails during "pull --rebase", you cannot just clean up the
working directory and call "pull --rebase" again, since the remote branch
was already fetched.

Therefore, die early when the working directory is dirty.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 23:05:11 -07:00
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
Christian Couder 634f246444 bisect: use a detached HEAD to bisect
When "git bisect" was first written, it was not possible to
checkout a detached HEAD. The detached feature appeared latter.

That's why before this patch the "git bisect" process used a
"bisect" branch to checkout new revisions to be tested (and also
a "new-bisect" one to check if the checkouts could work).

This patch makes "git bisect" checkout revisions to be tested on
a detached HEAD. This simplifies the code a bit.

The tests to check that "git bisect" does not start if a
"bisect" or a "new-bisect" branch exists are removed as they
are not relevant any more.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 22:45:03 -07:00
Christian Couder ba963de859 bisect: trap critical errors in "bisect_start"
Before this patch, when using "git bisect start" with mistaken revs
or when the checkout of the branch we want to test failed, we exited
after having written files like ".git/BISECT_START",
".git/BISECT_NAMES" and after having written "refs/bisect/bad" and
"refs/bisect/good-*" refs.

With this patch we trap all errors that can happen when writing the
new state and when we are in "bisect_next". So that we can try to
clean up everything in case of problems, using "bisect_clean_state".

This patch also contains a "bisect_write" cleanup to make it exit
on error and return 0 otherwise.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 22:24:16 -07:00
Christian Couder 9d0cd91c4e bisect: fix left over "BISECT_START" file when starting with junk rev
Before this patch, when using for example:

$ git bisect start <stuff1> <stuff2>

with <stuff1> or <stuff2> that cannot be parsed as a revision, we
could leave a ".git/BISECT_START" file, from a previous
"git bisect start", alone.

This patch makes sure that it does not happen by removing the
"BISECT_START" file in "bisect_clean_state" and then always writing
it again at the end of "bisect_start".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 22:16:45 -07:00
Christian Couder d3aca58562 bisect: add test cases to check that "git bisect start" is atomic
This patch adds some test cases to check that "git bisect start"
doesn't leave us in a bad state, especially when it fails.

These test cases show that "git bisect start" is not atomic when it
fails and leave some files like .git/BISECT_START, and in some
cases some refs, over.

The test failures should be fixed in latter commits.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22 22:01:27 -07:00
Paul Mackerras a977953326 gitk: Fix bug introduced by "gitk: Fix "wrong # coordinates" error on reload"
Commit 94503a66c5 ("gitk: Fix "wrong #
coordinates" error on reload") was correct as far as it went, but
introduced a problem because it didn't also clear out boldrows and
boldnamerows in clear_display.  This resulted in Tcl errors after
scrolling through the graph for a while if some rows were highlighted.
This fixes it.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-22 21:12:19 +10:00
Gustaf Hendeby b592d88fb2 Documentation: Fix skipped section level
With xmlto 0.0.18 it seems to demand that no section levels are
skipped.  The commit 'implement gitcvs.usecrlfattr' (8a06a63297)
one such skip, which here is removed by increasing the level of the
offender.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-21 20:57:02 -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
Paul Mackerras 94b4a69f75 gitk: Fix bug where current row number display stops working
The display of the current row number would stop working if the user
clicked on a line, or if selectedline got unset for any other reason,
because the trace on it got lost when it was unselected.  This fixes
it by changing the places that unset selectedline to set it to the
empty string instead, and the places that tested for it being set or
unset to compare it with the empty string.  Thus it never gets unset
now.  This actually simplified the code in a few places since it can
be compared for equality with a row number now without first testing
if it is set.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-20 20:51:06 +10: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