Commit graph

2484 commits

Author SHA1 Message Date
Daniel Barkalow a5a27c79b7 Add a --cover-letter option to format-patch
If --cover-letter is provided, generate a cover letter message before
the patches, numbered 0.

Original patch thanks to Johannes Schindelin

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-19 21:49:31 -08:00
Junio C Hamano cf5c51efc9 Sync with 1.5.4.2 and start 1.5.5 Release Notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-17 01:51:46 -08:00
Junio C Hamano 7cb97da17d Merge branch 'maint'
* maint:
  GIT 1.5.4.2
2008-02-17 01:16:44 -08:00
Junio C Hamano e5fc9a0aea GIT 1.5.4.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-17 00:20:38 -08:00
Junio C Hamano 2ac4b4b222 Merge branch 'sp/safecrlf'
* sp/safecrlf:
  safecrlf: Add mechanism to warn about irreversible crlf conversions
2008-02-16 17:59:20 -08:00
Junio C Hamano 990732609c Merge branch 'cc/browser'
* cc/browser:
  Documentation: add 'git-web--browse.txt' and simplify other docs.
  git-web--browse: fix misplaced quote in init_browser_path()
  web--browse: Add a few quotes in 'init_browser_path'.
  Documentation: instaweb: add 'git-web--browse' information.
  Adjust .gitignore for 5884f1(Rename 'git-help--browse.sh'...)
  git-web--browse: do not start the browser with nohup
  instaweb: use 'git-web--browse' to launch browser.
  Rename 'git-help--browse.sh' to 'git-web--browse.sh'.
  help--browse: add '--config' option to check a config option for a browser.
  help: make 'git-help--browse' usable outside 'git-help'.

Conflicts:

	git-web--browse.sh
2008-02-16 17:57:47 -08:00
Junio C Hamano 987e315a6b Merge branch 'jc/gitignore-ends-with-slash'
* jc/gitignore-ends-with-slash:
  gitignore: lazily find dtype
  gitignore(5): Allow "foo/" in ignore list to match directory "foo"
2008-02-16 17:57:06 -08:00
Junio C Hamano 1ae419cb39 Merge branch 'pb/prepare-commit-msg'
* pb/prepare-commit-msg:
  git-commit: add a prepare-commit-msg hook
  git-commit: Refactor creation of log message.
  git-commit: set GIT_EDITOR=: if editor will not be launched
  git-commit: support variable number of hook arguments
2008-02-16 17:56:59 -08:00
Junio C Hamano 093d50e0d2 Merge branch 'jc/submittingpatches'
* jc/submittingpatches:
  Documentation/SubmittingPatches - a suggested patch flow
  Documentation/SubmittingPatches: What's Acked-by and Tested-by?
  Documentation/SubmittingPatches: discuss first then submit
  Documentation/SubmittingPatches: Instruct how to use [PATCH] Subject header
2008-02-16 17:43:25 -08:00
Junio C Hamano 413b90f0da Merge branch 'maint'
* maint:
  Documentation/git-reset: Add an example of resetting selected paths
  Documentation/git-reset: don't mention --mixed for selected-paths reset
  Documentation/git-reset:
2008-02-16 17:41:23 -08:00
Junio C Hamano a941fb4a43 Documentation/SubmittingPatches - a suggested patch flow
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 17:33:31 -08:00
Pieter de Bie 965053b09a Documentation/git-reset: Add an example of resetting selected paths
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 10:57:05 -08:00
Pieter de Bie ceb4cacb42 Documentation/git-reset: don't mention --mixed for selected-paths reset
The option is accepted, but that is the only form selected-paths
variant of the reset command takes, so there is no point mentioning it.
And while we're at it, use the dashless git call.

Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 10:56:24 -08:00
Junio C Hamano 3983caa531 Documentation/git-reset:
Since 3368d11 (Remove unnecessary git-rm --cached reference from
status output), the status output marks the "Added but not yet
committed" section as "Changes to be committed".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 10:51:46 -08:00
Shawn O. Pearce e7e5170f80 Update fast-import documentation to discuss crash reports
Recent versions of fast-import will now dump information out upon
crashing, making it possible for the frontend developer to review
some state information and possibly restart the import from the
point where it crashed.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 00:47:08 -08:00
Christian Couder cb45f83cbd Documentation: add 'git-web--browse.txt' and simplify other docs.
'git-help.txt' and 'git-instaweb.txt' contained duplicated
information about 'git-web--browse'.

This patch puts this information where it belongs.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 00:46:33 -08:00
Junio C Hamano aa8d53ec38 Merge branch 'maint'
* maint:
  config: add test cases for empty value and no value config variables.
  cvsimport: have default merge regex also match beginning of commit message
  git clone -s documentation: force a new paragraph for the NOTE
  status: suggest "git rm --cached" to unstage for initial commit
  Protect get_author_ident_from_commit() from filenames in work tree
  upload-pack: Initialize the exec-path.
  bisect: use verbatim commit subject in the bisect log
  git-cvsimport.txt: fix '-M' description.
  Revert "pack-objects: only throw away data during memory pressure"
2008-02-13 14:33:19 -08:00
Miklos Vajna 846688726c git clone -s documentation: force a new paragraph for the NOTE
It should be loud and clear.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-13 14:15:44 -08:00
Sergei Organov 8608b33434 git-cvsimport.txt: fix '-M' description.
Fix '-M' description. Old one reads as if the user can somehow "see"
the default regex when using -M along with -m.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-13 11:08:41 -08:00
Junio C Hamano ecb879f877 Update the main documentation (stale notes section)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 19:21:23 -08:00
Junio C Hamano e3560df69d Merge branch 'mw/send-email'
* mw/send-email:
  git-send-email: Better handling of EOF
  git-send-email: SIG{TERM,INT} handlers
  git-send-email: ssh/login style password requests
2008-02-11 16:46:36 -08:00
Junio C Hamano e935626431 Merge branch 'db/send-email-omit-cc'
* db/send-email-omit-cc:
  git-send-email: Generalize auto-cc recipient mechanism.
2008-02-11 16:46:30 -08:00
Junio C Hamano 3960a95179 Merge branch 'ph/describe-match'
* ph/describe-match:
  git-name-rev: add a --(no-)undefined option.
  git-describe: Add a --match option to limit considered tags.
2008-02-11 16:35:41 -08:00
Junio C Hamano 14f9e128d3 Define the project whitespace policy
This establishes what the "bad" whitespaces are for this
project.

The rules are:

 - Unless otherwise specified, indent with SP that could be
   replaced with HT are not "bad".  But SP before HT in the
   indent is "bad", and trailing whitespaces are "bad".

 - For C source files, initial indent by SP that can be replaced
   with HT is also "bad".

 - Test scripts in t/ and test vectors in its subdirectories can
   contain anything, so we make it unrestricted for now.

Anything "bad" will be shown in WHITESPACE error indicator in
diff output, and "apply --whitespace=warn" will warn about it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 13:23:15 -08:00
Tim Stoakes 6fb5375ede Add `git svn blame' command
This command is identical to `git blame', but it shows SVN revision
numbers instead of git commit hashes.

[ew: support "^initial commit" and minor formatting fixes]

Signed-off-by: Tim Stoakes <tim@stoakes.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 13:23:14 -08:00
Junio C Hamano 04f32cf1b3 Merge branch 'maint'
* maint: (35 commits)
  config.c: guard config parser from value=NULL
  builtin-log.c: guard config parser from value=NULL
  imap-send.c: guard config parser from value=NULL
  wt-status.c: guard config parser from value=NULL
  setup.c: guard config parser from value=NULL
  remote.c: guard config parser from value=NULL
  merge-recursive.c: guard config parser from value=NULL
  http.c: guard config parser from value=NULL
  help.c: guard config parser from value=NULL
  git.c: guard config parser from value=NULL
  diff.c: guard config parser from value=NULL
  convert.c: guard config parser from value=NULL
  connect.c: guard config parser from value=NULL
  builtin-tag.c: guard config parser from value=NULL
  builtin-show-branch.c: guard config parser from value=NULL
  builtin-reflog.c: guard config parser from value=NULL
  builtin-log.c: guard config parser from value=NULL
  builtin-config.c: guard config parser from value=NULL
  builtin-commit.c: guard config parser from value=NULL
  builtin-branch.c: guard config parser from value=NULL
  ...
2008-02-11 13:23:06 -08:00
Jonas Fonseca ac3593da8f man pages are littered with .ft C and others
Jakub Narebski <jnareb@gmail.com> wrote Sun, Feb 03, 2008:
> Junio C Hamano wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> >
> > [From] http://thread.gmane.org/gmane.comp.version-control.git/53457/focus=53458
> Julian Phillips:
> > Are you using docbook xsl 1.72?  There are known problems building the
> > manpages with that version.  1.71 works, and 1.73 should work when it get
> > released.

I was able to solve this problem with this patch, which adds a XSL file
used specifically for DOCBOOK_XSL_172=YesPlease and where dots and
backslashes are escaped properly so they won't be substituted to the
wrong thing further down the "DocBook XSL pipeline". Doing the escaping
in the existing callout.xsl breaks v1.70.1. Hopefully v1.73 will end
this part of the manpage nightmare.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 12:51:55 -08:00
Johannes Schindelin 0ed50ceb48 Document that the default of branch.autosetupmerge is true
In 34a3e69 (git-branch: default to --track) the default was changed to
true, to help new git users.  But yours truly forgot to update the
documentation.  This fixes it.

Noticed by Kalle Olavi Niemitalo.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 12:14:03 -08:00
Junio C Hamano 473d33168b git-pull documentation: fix markup
A note paragraph was mistakenly made into an indented monospace display.
Noticed by Miklos Vajna.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 11:22:01 -08:00
Junio C Hamano 94bf9f7c37 Merge branch 'maint'
* maint:
  Fix typo in 'blame' documentation.
2008-02-10 00:54:42 -08:00
Christian Couder b261ec463a Documentation: instaweb: add 'git-web--browse' information.
Now that 'git-instaweb' uses 'git-web--browse', update the
documentation accordingly.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-09 23:42:37 -08:00
Johannes Schindelin 2b84b5a874 Introduce the config variable pack.packSizeLimit
"git pack-objects" has the option --max-pack-size to limit the file
size of the packs to a certain amount of bytes.  On platforms where
the pack file size is limited by filesystem constraints, it is easy
to forget this option, and this option does not exist for "git gc"
to begin with.

So introduce a config variable to set the default maximum, but make
this overrideable by the command line.

Suggested by Tor Arvid Lund.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-09 23:41:34 -08:00
Tim Stoakes 527270689c Fix typo in 'blame' documentation.
Signed-off-by: Tim Stoakes <tim@stoakes.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-09 20:22:23 -08:00
Steffen Prohaska 21e5ad50fc safecrlf: Add mechanism to warn about irreversible crlf conversions
CRLF conversion bears a slight chance of corrupting data.
autocrlf=true will convert CRLF to LF during commit and LF to
CRLF during checkout.  A file that contains a mixture of LF and
CRLF before the commit cannot be recreated by git.  For text
files this is the right thing to do: it corrects line endings
such that we have only LF line endings in the repository.
But for binary files that are accidentally classified as text the
conversion can corrupt data.

If you recognize such corruption early you can easily fix it by
setting the conversion type explicitly in .gitattributes.  Right
after committing you still have the original file in your work
tree and this file is not yet corrupted.  You can explicitly tell
git that this file is binary and git will handle the file
appropriately.

Unfortunately, the desired effect of cleaning up text files with
mixed line endings and the undesired effect of corrupting binary
files cannot be distinguished.  In both cases CRLFs are removed
in an irreversible way.  For text files this is the right thing
to do because CRLFs are line endings, while for binary files
converting CRLFs corrupts data.

This patch adds a mechanism that can either warn the user about
an irreversible conversion or can even refuse to convert.  The
mechanism is controlled by the variable core.safecrlf, with the
following values:

 - false: disable safecrlf mechanism
 - warn: warn about irreversible conversions
 - true: refuse irreversible conversions

The default is to warn.  Users are only affected by this default
if core.autocrlf is set.  But the current default of git is to
leave core.autocrlf unset, so users will not see warnings unless
they deliberately chose to activate the autocrlf mechanism.

The safecrlf mechanism's details depend on the git command.  The
general principles when safecrlf is active (not false) are:

 - we warn/error out if files in the work tree can modified in an
   irreversible way without giving the user a chance to backup the
   original file.

 - for read-only operations that do not modify files in the work tree
   we do not not print annoying warnings.

There are exceptions.  Even though...

 - "git add" itself does not touch the files in the work tree, the
   next checkout would, so the safety triggers;

 - "git apply" to update a text file with a patch does touch the files
   in the work tree, but the operation is about text files and CRLF
   conversion is about fixing the line ending inconsistencies, so the
   safety does not trigger;

 - "git diff" itself does not touch the files in the work tree, it is
   often run to inspect the changes you intend to next "git add".  To
   catch potential problems early, safety triggers.

The concept of a safety check was originally proposed in a similar
way by Linus Torvalds.  Thanks to Dimitry Potapov for insisting
on getting the naked LF/autocrlf=true case right.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
2008-02-06 13:07:28 -08:00
Paolo Bonzini 8089c85bcb git-commit: add a prepare-commit-msg hook
The prepare-commit-msg hook is run whenever a "fresh" commit message
is prepared, just before it is shown in the editor (if it is).
Its purpose is to modify the commit message in-place.

It takes one to three parameters.  The first is the name of the file that
the commit log message.  The second is the source of the commit message,
and can be: "message" (if a -m or -F option was given); "template" (if a
-t option was given or the configuration option commit.template is set);
"merge" (if the commit is a merge or a .git/MERGE_MSG file exists);
"squash" (if a .git/SQUASH_MSG file exists); or "commit", followed by
a commit SHA1 as the third parameter (if a -c, -C or --amend option
was given).

If its exit status is non-zero, git-commit will abort.  The hook is
not suppressed by the --no-verify option, so it should not be used
as a replacement for the pre-commit hook.

The sample prepare-commit-msg comments out the `Conflicts:` part of
a merge's commit message; other examples are commented out, including
adding a Signed-off-by line at the bottom of the commit messsage,
that the user can then edit or discard altogether.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 02:26:55 -08:00
Paolo Bonzini 406400ce4f git-commit: set GIT_EDITOR=: if editor will not be launched
This is a preparatory patch that provides a simple way for the future
prepare-commit-msg hook to discover if the editor will be launched.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 02:26:02 -08:00
Christian Couder 5884f1fe96 Rename 'git-help--browse.sh' to 'git-web--browse.sh'.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 01:01:48 -08:00
Junio C Hamano d6b8fc303b gitignore(5): Allow "foo/" in ignore list to match directory "foo"
A pattern "foo/" in the exclude list did not match directory
"foo", but a pattern "foo" did.  This attempts to extend the
exclude mechanism so that it would while not matching a regular
file or a symbolic link "foo".  In order to differentiate a
directory and non directory, this passes down the type of path
being checked to excluded() function.

A downside is that the recursive directory walk may need to run
lstat(2) more often on systems whose "struct dirent" do not give
the type of the entry; earlier it did not have to do so for an
excluded path, but we now need to figure out if a path is a
directory before deciding to exclude it.  This is especially bad
because an idea similar to the earlier CE_UPTODATE optimization
to reduce number of lstat(2) calls would by definition not apply
to the codepaths involved, as (1) directories will not be
registered in the index, and (2) excluded paths will not be in
the index anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:46:49 -08:00
David Brown 656482830d git-send-email: Generalize auto-cc recipient mechanism.
There are a few options to git-send-email to suppress the automatic
generation of 'Cc' fields: --suppress-from, and --signed-off-cc.
However, there are other times that git-send-email automatically
includes Cc'd recipients.  This is not desirable for all development
environments.

Add a new option --suppress-cc, which can be specified one or more
times to list the categories of auto-cc fields that should be
suppressed.  If not specified, it defaults to values to give the same
behavior as specified by --suppress-from, and --signed-off-cc.  The
categories are:

  self   - patch sender.  Same as --suppress-from.
  author - patch author.
  cc     - cc lines mentioned in the patch.
  cccmd  - avoid running the cccmd.
  sob    - signed off by lines.
  all    - all non-explicit recipients

Signed-off-by: David Brown <git@davidb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:42:32 -08:00
Junio C Hamano c11c3b5681 Documentation/SubmittingPatches: What's Acked-by and Tested-by?
We used to talk about "internal company procedures", but this
document is about submitting patches to the git mailing list.

More useful information is when to say Acked-by: and Tested-by:.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:39:03 -08:00
Junio C Hamano 0b0599402d Documentation/SubmittingPatches: discuss first then submit
This is something I've had in mind for some time.  I get enough
e-mails as-is, and I suspect the workflow to get list members
involved would work better if we get the discussion concluded on
the list first before patches hit my tree (even 'next').

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:39:03 -08:00
Junio C Hamano 4e891acf67 Documentation/SubmittingPatches: Instruct how to use [PATCH] Subject header
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:39:03 -08:00
Michael Witten 2363d7467d git-send-email: ssh/login style password requests
Whilst convenient, it is most unwise to record passwords
in any place but one's brain. Moreover, it is especially
foolish to store them in configuration files, even with
access permissions set accordingly.

git-send-email has been amended, so that if it detects
an smtp username without a password, it promptly prompts
for the password and masks the input for privacy.

Furthermore, the argument to --smtp-pass has been rendered
optional.

The documentation has been updated to reflect these changes.

Signed-off-by: Michael Witten <mfwitten@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:36:10 -08:00
Jonas Fonseca 7a2078b4b0 man pages are littered with .ft C and others
Jakub Narebski <jnareb@gmail.com> wrote Sun, Feb 03, 2008:
> Junio C Hamano wrote:
> > Jakub Narebski <jnareb@gmail.com> writes:
> >
> > [From] http://thread.gmane.org/gmane.comp.version-control.git/53457/focus=53458
> Julian Phillips:
> > Are you using docbook xsl 1.72?  There are known problems building the
> > manpages with that version.  1.71 works, and 1.73 should work when it get
> > released.

I was able to solve this problem with this patch, which adds a XSL file
used specifically for DOCBOOK_XSL_172=YesPlease and where dots and
backslashes are escaped properly so they won't be substituted to the
wrong thing further down the "DocBook XSL pipeline". Doing the escaping
in the existing callout.xsl breaks v1.70.1. Hopefully v1.73 will end
this part of the manpage nightmare.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 00:30:22 -08:00
Jörg Sommer 5ea55edb68 git-remote documentation: fix synopsis to match description
In the text, the argument of -m is <master> which should be used in the
command synopsis, too.

Signed-off-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-03 16:02:12 -08:00
Jari Aalto 71bda8b923 Documentation/git-stash.txt: Adjust SYNOPSIS command syntax (2)
Adjust the command syntax to better reflect the call parameters:
[save] [message...] => [save [<message>]].

Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-03 00:56:35 -08:00
Junio C Hamano 6ce8e44a1e Update stale documentation links from the main documentation.
This could have been part of the 1.5.4 commit, but it isn't.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-01 20:40:30 -08:00
Junio C Hamano c3c135291a GIT 1.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-01 19:10:10 -08:00
Miklos Vajna da101b82b6 git rev-parse manpage: spelling fix
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-31 13:59:00 -08:00
Junio C Hamano bb8eebb94f Revert "filter-branch docs: remove brackets so not to imply revision arg is optional"
This reverts commit c41b439244, as
we decided to default to HEAD when revision parameters are missing
and they are no longer mandatory.
2008-01-31 13:51:42 -08:00