Commit Graph

20478 Commits

Author SHA1 Message Date
Horst H. von Brand
c0ecb07048 git-pull.sh: Fix call to git-merge for new command format
Now "git merge <msg> HEAD" is officially deprecated, we should
clean our own use as well.

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-02 10:42:48 -08:00
Junio C Hamano
0748494e86 Merge branch 'maint'
* maint:
  Prepare for 1.6.5.4
  merge: do not add standard message when message is given with -m option
  Do not misidentify "git merge foo HEAD" as an old-style invocation

Conflicts:
	RelNotes
2009-12-02 10:30:12 -08:00
Junio C Hamano
28044baba6 Prepare for 1.6.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-02 10:29:00 -08:00
Junio C Hamano
ce9d823b91 merge: do not add standard message when message is given with -m option
Even if the user explicitly gave her own message to "git merge", the
command still added its standard merge message.  It resulted in a
useless repetition like this:

    % git merge -m "Merge early part of side branch" `git rev-parse side~2`
    % git show -s
    commit 37217141e7519629353738d5e4e677a15096206f
    Merge: e68e646 a1d2374
    Author: しらいし ななこ <nanako3@lavabit.com>
    Date:   Wed Dec 2 14:33:20 2009 +0900

	Merge early part of side branch

	Merge commit 'a1d2374f8f52f4e8a53171601a920b538a6cec23'

The gave her own message because she didn't want git to add the
standard message (if she wanted to, she wouldn't have given one,
or she would have prepared it using git-fmt-merge-msg command).

Noticed by Nanako Shiraishi

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-02 10:02:08 -08:00
Junio C Hamano
76bf488e61 Do not misidentify "git merge foo HEAD" as an old-style invocation
This was misinterpreted as an ancient style "git merge <message> HEAD
<commit> <commit>..." that merges one (or more) <commit> into the current
branch and record the resulting commit with the given message.  Then a
later sanity check found that there is no <commit> specified and gave
a usage message.

Tested-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-02 10:01:59 -08:00
Junio C Hamano
c86485dd15 Update draft release notes to 1.6.6 before -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 12:50:23 -08:00
Junio C Hamano
32ef08f4e5 Merge branch 'maint'
* maint:
  help: Do not unnecessarily look for a repository
  Documentation: Fix a few i.e./e.g. mix-ups
  Documentation: Document --branch option in git clone synopsis
2009-12-01 12:47:04 -08:00
Junio C Hamano
36a83f375b Merge branch 'jc/deprecate-old-syntax-from-merge'
* jc/deprecate-old-syntax-from-merge:
  git-merge: a deprecation notice of the ancient command line syntax
2009-12-01 12:47:01 -08:00
Junio C Hamano
b81e00a965 git-merge: a deprecation notice of the ancient command line syntax
The ancient form of git merge command used in the original sample script
has been copied from Linus and are still found everywhere, I think, and
people may still have it in their scripts, but on the other hand, it is so
unintuitive that even people reasonably familiar with git are surprised by
accidentally triggering the support to parse this ancient form.

Gently nudge people to upgrade their script to more recent and readable
style for eventual removal of the original syntax.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 12:45:34 -08:00
Junio C Hamano
4a2775974a Merge branch 'bw/remote-get-ref-states-fix'
* bw/remote-get-ref-states-fix:
  get_ref_states: strdup entries and free util in stale list
2009-12-01 12:26:45 -08:00
Bert Wesarg
92f676fce7 get_ref_states: strdup entries and free util in stale list
The entries in states->stale list is filled in handle_one_branch() that is
a call-back funcation to for_each_ref() using the callback parameter given
to it.  We need to strdup() the refnames (both the string list key and the
value stored in util) for more permanent storage and free them when we are
done.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 12:26:32 -08:00
David Aguilar
af6fbf9f81 help: Do not unnecessarily look for a repository
Although 'git help' actually doesn't need to be run inside a git
repository and uses no repository-specific information, it looks for a git
directory.  Searching for a git directory can be annoying in auto-mount
environments.  With this commit, 'git help' no longer searches for a
repository when run without any options.

7c3baa9 originally modified 'git help -a' to not require a repository.
This applies the same fix for 'git help'.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 12:10:09 -08:00
Michael J Gruber
3c652d1671 Documentation: Fix a few i.e./e.g. mix-ups
A git bundle can be transported by several means (such as e-mail), not
only by snekaernet, so use e.g. instead of i.e.

The mix-up in git-bundle.txt is obvious.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 12:09:46 -08:00
Junio C Hamano
8678bc09e3 Merge branch 'jn/gitweb-blame'
* jn/gitweb-blame:
  gitweb: Add link to other blame implementation in blame views
  gitweb: Make linking to actions requiring JavaScript a feature
  gitweb.js: fix padLeftStr() and its usage
  gitweb.js: Harden setting blamed commit info in incremental blame
  gitweb.js: fix null object exception in initials calculation
  gitweb: Minify gitweb.js if JSMIN is defined
  gitweb: Create links leading to 'blame_incremental' using JavaScript
  gitweb: Colorize 'blame_incremental' view during processing
  gitweb: Incremental blame (using JavaScript)
  gitweb: Add optional "time to generate page" info in footer

Conflicts:
	Makefile
	gitweb/gitweb.css
2009-12-01 11:28:15 -08:00
Jakub Narebski
87e573f660 gitweb: Add link to other blame implementation in blame views
Add link to 'blame_incremental' action (which requires JavaScript) in
'blame' view, and add link to 'blame' action in 'blame_incremental'
view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-01 11:25:21 -08:00
Jakub Narebski
e627e50a70 gitweb: Make linking to actions requiring JavaScript a feature
Let gitweb turn some links (like 'blame' links) into linking to actions
which require JavaScript (like 'blame_incremental' action) only if
'javascript-actions' feature is enabled.

This means that links to such actions would be present only if both
JavaScript is enabled and 'javascript-actions' feature is enabled.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-30 20:09:41 -08:00
Junio C Hamano
9eba92f684 Merge branch 'fc/maint-format-patch-pathspec-dashes'
Conflicts:
	t/t4014-format-patch.sh
2009-11-30 14:46:09 -08:00
Junio C Hamano
045c050485 Merge branch 'mm/maint-merge-ff-error-message-fix'
Conflicts:
	merge-recursive.c
2009-11-30 14:45:08 -08:00
Junio C Hamano
22c4e72d6e Merge branch 'ap/maint-merge-strategy-list-fix' 2009-11-30 14:44:43 -08:00
Junio C Hamano
684d0d8dcf Merge branch 'jc/pretty-lf'
Conflicts:
	pretty.c
	t/t6006-rev-list-format.sh
2009-11-30 14:44:22 -08:00
Junio C Hamano
261fbda903 Merge branch 'cc/bisect-doc' 2009-11-30 14:43:51 -08:00
Junio C Hamano
c142465c07 Merge branch 'em/commit-claim' 2009-11-30 14:43:26 -08:00
Junio C Hamano
d268cb940d Merge branch 'jc/mailinfo-remove-brackets'
Conflicts:
	Documentation/git-mailinfo.txt
	builtin-mailinfo.c
2009-11-30 14:43:24 -08:00
Junio C Hamano
0c7cc135c5 Merge branch 'fc/send-email-envelope' 2009-11-30 14:42:50 -08:00
Junio C Hamano
a689faeb58 Merge branch 'uk/maint-shortlog-encoding'
Conflicts:
	builtin-shortlog.c
2009-11-30 14:42:28 -08:00
Junio C Hamano
1bab4bba54 Merge branch 'ns/send-email-no-chain-reply-to' 2009-11-30 14:35:18 -08:00
Junio C Hamano
5e2f779cbf Merge branch 'jc/maint-am-keep' 2009-11-30 14:35:07 -08:00
Junio C Hamano
b918eb6c2a Merge branch 'bw/diff-color-hunk-header' 2009-11-30 14:34:45 -08:00
David Soria Parra
db9bc00e2b Documentation: Document --branch option in git clone synopsis
Document the --branch option as [-b <name>] in git clones synopsis.

Signed-off-by: David Soria Parra <dsp@php.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-30 08:47:54 -08:00
Matthieu Moy
e2ced7de19 builtin-merge: show user-friendly error messages for fast-forward too.
fadd069d03 (merge-recursive: give less scary messages when merge did not
start, Sep 7 2009) introduced some friendlier error message for merge
failure, but the messages were shown only for non-fast forward merges.
This patch uses the same for fast-forward.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 23:52:40 -08:00
Matthieu Moy
264b774ba6 merge-recursive: make the error-message generation an extern function
The construction of the struct unpack_trees_error_msgs was done within
git_merge_trees(), which prevented using the same messages easily from
another function.

[jc: backported for 1.6.5 maint before advice_commit_before_merge]

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 23:52:31 -08:00
Matthew Ogilvie
e160da7f60 t/README: Document GIT_TEST_INSTALLED and GIT_TEST_EXEC_PATH
These were added without documentation in 2009-03-16 (6720721).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 23:09:56 -08:00
Matthew Ogilvie
5d59a4016b t3409 t4107 t7406 t9150: use dashless commands
This is needed to allow test suite to run against a standard
install bin directory instead of GIT_EXEC_PATH.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 23:09:47 -08:00
Avery Pennarun
ed87465658 builtin-merge.c: call exclude_cmds() correctly.
We need to call exclude_cmds() after the loop, not during the loop, because
excluding a command from the array can change the indexes of objects in the
array.  The result is that, depending on file ordering, some commands
weren't excluded as they should have been.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 18:49:11 -08:00
Matthew Ogilvie
42ac496edc t2300: use documented technique to invoke git-sh-setup
This is needed to allow the test suite to run against a standard
install bin directory instead of GIT_EXEC_PATH.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 18:00:14 -08:00
Nanako Shiraishi
528fb08732 prepare send-email for smoother change of --chain-reply-to default
Give a warning message when send-email uses chain-reply-to to thread the
messages because of the current default, not because the user explicitly
asked to, either from the command line or from the configuration.

This way, by the time 1.7.0 switches the default, everybody will be ready.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-29 00:51:35 -08:00
Junio C Hamano
66abce05dd Update draft release notes to 1.6.6 before merging topics for -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-28 11:13:59 -08:00
Jonathan Nieder
7fc9d1526e Makefile: do not clean arm directory
The ARM SHA-1 implementation was removed by commit 30ae47b
(remove ARM and Mozilla SHA1 implementations, 2009-08-17).  Prune
its directory from the list of object files to delete in 'make
clean'.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-28 10:09:56 -08:00
Bert Wesarg
89cb73a19a Give the hunk comment its own color
Inspired by the coloring of quilt.

Introduce a separate color and paint the hunk comment part, i.e. the name
of the function, in a separate color "diff.func" (defaults to plain).

Whitespace between hunk header and hunk comment is printed in plain color.

Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-28 10:05:44 -08:00
Felipe Contreras
c89e324145 send-email: automatic envelope sender
This adds the option to specify the envelope sender as "auto" which
would pick the 'from' address. This is good because now we can specify
the address only in one place in $HOME/.gitconfig and change it easily.

[jc: added tests]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-27 23:45:24 -08:00
Junio C Hamano
06a4755270 emit_line(): don't emit an empty <SET><RESET> followed by a newline
When emit_line() is called with an empty line (but non-zero length, as we
send line terminating LF or CRLF to the function), it used to emit
<SET><RESET> followed by a newline.  Stop the wastefulness.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-27 22:33:53 -08:00
Junio C Hamano
c970a6fd01 Remove dead code from "git am"
Ever since the initial implementation, "git am" had kept a dead code that
never triggered due to a typo in the variable name.  Worse yet, the code,
if it weren't for the typo, would have attempted to add "[PATCH] " at the
beginning of the Subject: header when "git am" is run with its "-k"
option.  However, because "git am -k" tells mailinfo to keep such prefix
when parsing the input, the "[PATCH] " added by this dead code would have
really been unnecessary duplicate.

Embarrassing is that we kept _maintaining_ the codepath without anybody
noticing for four years.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-27 15:11:47 -08:00
Junio C Hamano
41d5b7e362 Merge branch 'maint'
* maint:
  builtin-apply.c: pay attention to -p<n> when determining the name
2009-11-27 00:56:05 -08:00
Johannes Sixt
e7821d73bd Add a notice that only certain functions can print color escape codes
We emulate color escape codes on Windows by overriding printf, fprintf,
and fputs. Warn developers that these are the only functions that can be
used to print them.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-27 00:28:40 -08:00
Felipe Contreras
7e93d3b9e5 format-patch: add test for parsing of "--"
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-26 21:23:55 -08:00
Felipe Contreras
382da4023f format-patch: fix parsing of "--" on the command line
When given a pathspec that does not match any path in the current work
tree with an explicit "--":

    git format-patch <commit> -- <path>

the command still complains that <path> does not exist in the current work
tree and the user needs to explicitly specify "--" and errors out.  This
is because it incorrectly removes "--" from the command line arguments
that is later passed to setup_revisions().

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-26 21:16:54 -08:00
Junio C Hamano
ec7fc0b1a4 builtin-apply.c: pay attention to -p<n> when determining the name
The patch structure has def_name component that is used to validate the
sanity of a "diff --git" patch by checking pathnames that appear on the
patch header lines for consistency.  The git_header_name() function is
used to compute this out of "diff --git a/... b/..." line, but the code
always stripped one level of prefix (i.e. "a/" and "b/"), without paying
attention to -p<n> option.  Code in find_name() function that parses other
lines in the patch header (e.g. "--- a/..." and "+++ b/..." lines) however
did strip the correct number of leading paths prefixes, and the sanity
check between these computed values failed.

Teach git_header_name() to honor -p<n> option like find_name() function
does.

Found and reported by Steven J. Murdoch who also wrote tests.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-26 19:02:24 -08:00
Björn Gustavsson
c8e1c3d3e8 gitworkflows: Consistently back-quote git commands
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-26 18:33:34 -08:00
Uwe Kleine-König
79f7ca063d shortlog: respect commit encoding
Don't take the author name information without re-encoding from the raw
commit object buffer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-25 15:36:54 -08:00
Junio C Hamano
ad7ace714d Merge branch 'rs/work-around-grep-opt-insanity'
* rs/work-around-grep-opt-insanity:
  Protect scripted Porcelains from GREP_OPTIONS insanity
  mergetool--lib: simplify guess_merge_tool()

Conflicts:
	git-instaweb.sh
2009-11-25 11:45:07 -08:00