1
0
mirror of https://github.com/git/git.git synced 2024-09-25 07:30:56 +02:00
Commit Graph

15122 Commits

Author SHA1 Message Date
Junio C Hamano
f556388747 git-apply --directory: make --root more similar to GNU diff
Applying a patch in the directory that is different from what the patch
records is done with --directory option in GNU diff.  The --root option we
introduced previously does the same, and we can call it the same way to
give users more familiar feel.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06 19:33:08 -07:00
Alex Riesen
77cb7bc232 git-clone: remove leftover debugging fprintf().
Acked-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06 19:25:29 -07:00
Mikael Magnusson
faf466ffb1 Fix grammar in git-rev-parse(1).
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06 19:20:50 -07:00
Johannes Schindelin
a5a9126bb4 git daemon: avoid calling syslog() from a signal handler
Signal handlers should never call syslog(), as that can raise signals
of its own.

Instead, call the syslog() from the master process.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06 19:10:31 -07:00
Junio C Hamano
87fb597d4e Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui:
  git-gui: Implement "Stage/Unstage Line"
  git-gui: Don't select the wrong file if the last listed file is staged.
  git-gui: Fix accidental staged state toggle when clicking top pixel row
  git-gui: Move on to the next filename after staging/unstaging a change
2008-07-06 12:55:34 -07:00
Jeff King
4e10738a93 Allow per-command pager config
There is great debate over whether some commands should set
up a pager automatically. This patch allows individuals to
set their own pager preferences for each command, overriding
the default. For example, to disable the pager for git
status:

  git config pager.status false

If "--pager" or "--no-pager" is specified on the command
line, it takes precedence over the config option.

There are two caveats:

  - you can turn on the pager for plumbing commands.
    Combined with "core.pager = always", this will probably
    break a lot of things. Don't do it.

  - This only works for builtin commands. The reason is
    somewhat complex:

    Calling git_config before we do setup_git_directory
    has bad side effects, because it wants to know where
    the git_dir is to find ".git/config". Unfortunately,
    we cannot call setup_git_directory indiscriminately,
    because some builtins (like "init") break if we do.

    For builtins, this is OK, since we can just wait until
    after we call setup_git_directory. But for aliases, we
    don't know until we expand (recursively) which command
    we're doing. This should not be a huge problem for
    aliases, which can simply use "--pager" or "--no-pager"
    in the alias as appropriate.

    For external commands, however, we don't know we even
    have an external command until we exec it, and by then
    it is too late to check the config.

    An alternative approach would be to have a config mode
    where we don't bother looking at .git/config, but only
    at the user and system config files. This would make the
    behavior consistent across builtins, aliases, and
    external commands, at the cost of not allowing per-repo
    pager config for at all.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-06 02:20:24 -07:00
Junio C Hamano
44701c67fd Merge branch 'qq/maint'
* qq/maint:
  Fix "config_error_nonbool" used with value instead of key
2008-07-06 00:35:13 -07:00
Miklos Vajna
af9a01e1c2 hg-to-git: use git init instead of git init-db
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:35:12 -07:00
Miklos Vajna
96f2395951 hg-to-git: rewrite "git-frotz" to "git frotz"
This is not just nice but necessary since git-frotz is no longer in
PATH.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:35:12 -07:00
Miklos Vajna
2553ede5a9 hg-to-git: abort if the project directory is not a hg repo
Check the exit code of the first hg command, and abort to avoid a later
ValueError exception.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:35:11 -07:00
Miklos Vajna
6376cffaeb hg-to-git: avoid raising a string exception
This fixes the following warning:
hg-to-git.py:92: DeprecationWarning: raising a string exception is deprecated

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:35:11 -07:00
Miklos Vajna
f45ed32c40 INSTALL: Update section about git-frotz form.
The old text stated that 'git-frotz' can be always used instead of 'git
frotz' which is no longer true.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:31:42 -07:00
Christian Couder
c96a6d3660 Fix "config_error_nonbool" used with value instead of key
The function "config_error_nonbool", that is defined in "config.c",
is used to report an error when a config key in the config file
should have a corresponding value but it hasn't.

So the parameter to this function should be the key and not the
value, because the value is undefined. And it could crash if the
value is used.

This patches fixes two occurences where the value was passed
instead of the key.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:31:09 -07:00
Christian Couder
3ecb171d2b Fix "config_error_nonbool" used with value instead of key
The function "config_error_nonbool", that is defined in "config.c",
is used to report an error when a config key in the config file
should have a corresponding value but it hasn't.

So the parameter to this function should be the key and not the
value, because the value is undefined. And it could crash if the
value is used.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 23:30:38 -07:00
Junio C Hamano
08b51f51e6 Merge branch 'qq/maint'
* qq/maint:
  clone -q: honor "quiet" option over native transports.
  attribute documentation: keep EXAMPLE at end
  builtin-commit.c: Use 'git_config_string' to get 'commit.template'
  http.c: Use 'git_config_string' to clean up SSL config.
  diff.c: Use 'git_config_string' to get 'diff.external'
  convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
  builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
  Documentation cvs: Clarify when a bare repository is needed
  Documentation: be precise about which date --pretty uses

Conflicts:

	Documentation/gitattributes.txt
2008-07-05 18:33:16 -07:00
Junio C Hamano
9b37322950 clone -q: honor "quiet" option over native transports.
The earlier built-in conversion seems to have broken "git-clone"; this
teaches the command to honor the "-q" option again when talking to the
remote end over native transports (file://, git:// and ssh://).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 18:32:36 -07:00
Junio C Hamano
8a33dd8b6e attribute documentation: keep EXAMPLE at end
The document gives overall definition of states in DESCRIPTION, describes
various aspects of git operations that can be influenced in EFFECTS, and
finally gives examples in the EXAMPLE section.  Archive creation however
was somehow documented after the EXAMPLE section, not insode EFFECTS.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 18:31:15 -07:00
Brian Hetro
984c6e7ec1 builtin-commit.c: Use 'git_config_string' to get 'commit.template'
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:54 -07:00
Brian Hetro
7ef8ea7035 http.c: Use 'git_config_string' to clean up SSL config.
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:46 -07:00
Brian Hetro
daec808cc6 diff.c: Use 'git_config_string' to get 'diff.external'
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:34 -07:00
Brian Hetro
cd8be6c9b6 convert.c: Use 'git_config_string' to get 'smudge' and 'clean'
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:30 -07:00
Brian Hetro
70cff3ac16 builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix'
Signed-off-by: Brian Hetro <whee@smaertness.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:24 -07:00
Matthew Ogilvie
a41a32bf1c Documentation cvs: Clarify when a bare repository is needed
New users sometimes import a project and then immediately
try to use the imported repository as a central shared repository.
This provides pointers about setting up a bare repository for that
in the parts of the documentation dealing with CVS migration.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:42:16 -07:00
Adam Brewster
1fc561d169 Move read_revisions_from_stdin from builtin-rev-list.c to revision.c
Reading rev-list parameters from the command line can be reused by
commands other than rev-list.  Move this function to more "library-ish"
place to promote code reuse.

Signed-off-by: Adam Brewster <asb@bu.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:30:58 -07:00
Ramsay Jones
6e1c23442a Fix some warnings (on cygwin) to allow -Werror
When printing valuds of type uint32_t, we should use PRIu32, and should
not assume that it is unsigned int.  On 32-bit platforms, it could be
defined as unsigned long. The same caution applies to ntohl().

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 17:26:29 -07:00
Nikolaus Schulz
2b2da68463 Documentation: be precise about which date --pretty uses
This makes it explicit that the --pretty formats 'medium' and 'email' use the
author date (and ignore the committer date).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 16:41:11 -07:00
Jonathan Nieder
db5d6666af manpages: use teletype font for sample command lines
I think that some of these uses of italics were meant to be
rendered in quotation marks, anyway.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder
5833d730ef manpages: italicize git subcommand names (which were in teletype font)
Italicize those git subcommand names already in teletype we missed.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder
2fd02c92db manpages: italicize nongit command names (if they are in teletype font)
Some manual pages use teletype font to set command names. We
change them to use italics, instead.  This creates a visual
distinction between names of commands and command lines that
can be typed at the command line. It is also more consistent
with other man pages outside Git.

In this patch, the commands named are non-git commands like bash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder
42d36bb841 manpages: italicize gitk's name (where it was in teletype font)
The name `gitk` is sometimes meant to be entered at the command
prompt, but most uses are just referring to the program with that
name (not the incantation to start it).

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder
ba020ef5eb manpages: italicize git command names (which were in teletype font)
The names of git commands are not meant to be entered at the
commandline; they are just names. So we render them in italics,
as is usual for command names in manpages.

Using

	doit () {
	  perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }'
	}
	for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \
	        merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt
	do
	  doit <"$i" >"$i+" && mv "$i+" "$i"
	done
	git diff

.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:40 -07:00
Jonathan Nieder
0979c10649 manpages: italicize command names
This includes nongit commands like RCS 'merge'.  This patch only
italicizes names of commands if they had no formatting before.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
04c2407eaf manpages: italicize command names in synopses
To tell command names from options in a glance.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
877276d4d3 gitdiffcore(7): fix awkward wording
The phrase "diff outputs" sounds awkward to my ear (I think
"output" is meant to be used as a substantive noun.)

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
467c0197fd Documentation: more "git-" versus "git " changes
With git-commands moving out of $(bindir), it is useful to make a
clearer distinction between the git subcommand 'git-whatever' and
the command you type, `git whatever <options>`.  So we use a dash
after "git" when referring to the former and not the latter.

I already sent a patch doing this same thing, but I missed some
spots.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
7a7d4ef69c Documentation: rewrap to prepare for "git-" vs "git " change
Rewrap lines in preparation for added dashes.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
d69806d198 git-commit(1): depersonalize description
The intent is to make git-commit(1) feel more like a manual page.  The
change also makes the page four words shorter.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
56992f765d git(1): add comma
Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
7f9d77f279 manpages: fix bogus whitespace
It's distracting.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
0cafe944e9 Documentation: fix gitlinks
Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Jonathan Nieder
9c67c75719 git-format-patch(1): fix stray \ in output
In listing blocks (set off by rows of dashes), the usual
formatting characters of asciidoc are instead rendered verbatim.
When the escaped double-hyphen of olden days is moved into such a
block along with other formatting improvements, it becomes
backslash-dash-dash.

So we remove the backslash.

Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 11:24:39 -07:00
Miklos Vajna
51add76e92 Retire 'stupid' merge strategy
As pointed out by Linus, this strategy tries to take the best merge
base, but 'recursive' just does it better. If one needs something more
than 'resolve' then he/she should really use 'recursive' and not
'stupid'.

Cf. Message-ID: <alpine.LFD.1.10.0807030947360.18105@woody.linux-foundation.org>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 10:43:46 -07:00
Thomas Rast
6cf91492d9 Fix apply --recount handling of no-EOL line
If a patch modifies the last line of a file that previously had no
terminating '\n', it looks like

    -old text
    \ No newline at end of file
    +new text

Hence, a '\' line does not signal the end of the hunk.  This modifies
'git apply --recount' to take this into account.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-05 00:37:44 -07:00
Junio C Hamano
7dde4bb367 Merge branch 'maint'
* maint:
  GIT 1.5.6.2
  Fix executable bits in t/ scripts
  Work around gcc warnings from curl headers
2008-07-04 01:59:57 -07:00
Junio C Hamano
78e3118685 GIT 1.5.6.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04 01:38:41 -07:00
Junio C Hamano
2b2828b452 Fix executable bits in t/ scripts
Pointed out by Ramsay Jones.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04 01:38:41 -07:00
Johannes Sixt
41872fd573 t4127-apply-same-fn: Avoid sed -i
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04 01:36:25 -07:00
Junio C Hamano
f444e5286e Work around gcc warnings from curl headers
After master.k.org upgrade, I started seeing these warning messages:

    transport.c: In function 'get_refs_via_curl':
    transport.c:458: error: call to '_curl_easy_setopt_err_write_callback' declared with attribute warning: curl_easy_setopt expects a curl_write_callback argument for this option

It appears that the curl header wants to enforce the function signature
for callback function given to curl_easy_setopt() to be compatible with
that of (*curl_write_callback) or fwrite.  This patch seems to work the
issue around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-04 00:37:40 -07:00
Junio C Hamano
6991357513 fast-export --export-marks: fix off by one error
The export_marks() function iterated over a (potentially sparsely
populated) hashtable, but it accessed it starting from offset 1 and one
element beyond the end.

Noticed by SungHyun Nam.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-03 00:34:59 -07:00
Thomas Rast
6cbf8b00fb git-send-email: Do not attempt to STARTTLS more than once
With the previous TLS patch, send-email would attempt to STARTTLS at
the beginning of every mail, despite reusing the last connection.  We
simply skip further encryption checks after successful TLS initiation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-02 22:41:18 -07:00