1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-06 01:03:02 +01:00
Commit graph

19980 commits

Author SHA1 Message Date
Stephen Boyd
81334502ee octopus: make merge process simpler to follow
Its not very easy to understand what heads are being merged given
the current output of an octopus merge. Fix this by replacing the
sha1 with the (usually) better description in GITHEAD_<SHA1>.

Suggested-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-13 23:17:46 -08:00
Junio C Hamano
9861b644e0 Git 1.6.5.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10 15:42:30 -08:00
Junio C Hamano
782a0005fc Fix archive format with -- on the command line
Giving --format from the command line, or using output file extention to
DWIM the output format, with a pathspec that is disambiguated with an
explicit double-dash on the command line, e.g.

    git archive -o file --format=zip HEAD -- path
    git archive -o file.zip HEAD -- path

didn't work correctly.

This was because the code reordered (when one was given) or added (when
the format was inferred) a --format argument at the end, effectively
making it to "archive HEAD -- path --format=zip", i.e. an extra pathspec
that is unlikely to match anything.

The command line argument list should always be "options, revs and then
paths", and we should set a good example by inserting the --format at the
beginning instead.

Reported-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10 15:29:05 -08:00
Junio C Hamano
1456b043fc Remove post-upload-hook
This hook runs after "git fetch" in the repository the objects are
fetched from as the user who fetched, and has security implications.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-10 12:21:40 -08:00
Junio C Hamano
5c30b8f7dd Merge branch 'mm/maint-merge-ff-error-message-fix' into maint
* mm/maint-merge-ff-error-message-fix:
  builtin-merge: show user-friendly error messages for fast-forward too.
  merge-recursive: make the error-message generation an extern function

Conflicts:
	merge-recursive.c
2009-12-08 22:42:23 -08:00
Junio C Hamano
389e0baa94 Merge branch 'jn/maint-pull-rebase-error-message' into maint
* jn/maint-pull-rebase-error-message:
  pull: clarify advice for the unconfigured error case
2009-12-08 22:39:20 -08:00
Junio C Hamano
a876433c5f Merge branch 'jk/maint-add-p-delete-fix' into maint
* jk/maint-add-p-delete-fix:
  add-interactive: fix deletion of non-empty files
2009-12-08 22:37:50 -08:00
Jeff King
8947fdd598 add-interactive: fix deletion of non-empty files
Commit 24ab81a fixed the deletion of empty files, but broke
deletion of non-empty files. The approach it took was to
factor out the "deleted" line from the patch header into its
own hunk, the same way we do for mode changes. However,
unlike mode changes, we only showed the special "delete this
file" hunk if there were no other hunks. Otherwise, the user
would annoyingly be presented with _two_ hunks: one for
deleting the file and one for deleting the content.

This meant that in the non-empty case, we forgot about the
deleted line entirely, and we submitted a bogus patch to
git-apply (with "/dev/null" as the destination file, but not
marked as a deletion).

Instead, this patch combines the file deletion hunk and the
content deletion hunk (if there is one) into a single
deletion hunk which is either staged or not.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-07 23:52:46 -08:00
Junio C Hamano
aa031314bf Git 1.6.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05 11:08:35 -08:00
Linus Torvalds
77cd6ab621 Fix diff -B/--dirstat miscounting of newly added contents
What used to happen is that diffcore_count_changes() simply ignored any
hashes in the destination that didn't match hashes in the source. EXCEPT
if the source hash didn't exist at all, in which case it would count _one_
destination hash that happened to have the "next" hash value.  As a
consequence, newly added material was often undercounted, making output
from --dirstat and "complete rewrite" detection used by -B unrelialble.

This changes it so that:

 - whenever it bypasses a destination hash (because it doesn't match a
   source), it counts the bytes associated with that as "literal added"

 - at the end (once we have used up all the source hashes), we do the same
   thing with the remaining destination hashes.

 - when hashes do match, and we use the difference in counts as a value,
   we also use up that destination hash entry (the 'd++').

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05 10:54:17 -08:00
Jeff King
952dfc6944 reset: improve worktree safety valves
The existing code checked to make sure we were not in a bare
repository when doing a hard reset. However, we should take
this one step further, and make sure we are in a worktree.
Otherwise, we can end up munging files inside of '.git'.

Furthermore, we should do the same check for --merge resets,
which have the same properties. Actually, a merge reset of
HEAD^ would already complain, since further down in the code
we want a worktree. However, it is nicer to check up-front;
then we are sure we cover all cases ("git reset --merge"
would run, even though it wasn't doing anything) and we can
give a more specific message.

Add tests to t7103 to cover these cases and some missing ones.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05 10:28:20 -08:00
Todd Zullinger
50d9bbba92 Documentation: Avoid use of xmlto --stringparam
The --stringparam option is not available on older xmlto versions.
Instead, set man.base.url.for.relative.links via a .xsl file.  Older
docbook versions will ignore this without causing grief to users of
older xmlto versions.

Signed-off-by: Todd Zullinger <tmz@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-05 10:03:49 -08:00
René Scharfe
165ca62108 archive: clarify description of path parameter
Mention that path parameters are based on the current working directory.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
--
 Documentation/git-archive.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04 15:16:40 -08:00
Jeff King
e5f591720c rerere: don't segfault on failure to open rr-cache
The rr-cache directory should always exist if we are doing
garbage collection (earlier code paths check this
explicitly), but we may not necessarily succeed in opening
it (for example, due to permissions problems). In that case,
we should print an error message rather than simply
segfaulting.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-04 09:11:58 -08:00
Junio C Hamano
adf9628ea4 Prepare for 1.6.5.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 14:07:32 -08:00
Junio C Hamano
dda8f4bf2b Merge branch 'uk/maint-shortlog-encoding' into maint
* uk/maint-shortlog-encoding:
  t4201: use ISO8859-1 rather than ISO-8859-1
  shortlog: respect commit encoding
2009-12-03 13:56:50 -08:00
Junio C Hamano
c8b1d761f6 Merge branch 'fc/maint-format-patch-pathspec-dashes' into maint
* fc/maint-format-patch-pathspec-dashes:
  format-patch: add test for parsing of "--"
  format-patch: fix parsing of "--" on the command line
2009-12-03 13:54:25 -08:00
Junio C Hamano
99292c638a Merge branch 'ap/maint-merge-strategy-list-fix' into maint
* ap/maint-merge-strategy-list-fix:
  builtin-merge.c: call exclude_cmds() correctly.
2009-12-03 13:54:11 -08:00
Junio C Hamano
78b77c491f Merge branch 'jc/maint-am-keep' into maint
* jc/maint-am-keep:
  Remove dead code from "git am"
2009-12-03 13:54:03 -08:00
Junio C Hamano
957f5db74f Merge branch 'rs/work-around-grep-opt-insanity' into maint
* rs/work-around-grep-opt-insanity:
  Protect scripted Porcelains from GREP_OPTIONS insanity
  mergetool--lib: simplify guess_merge_tool()
2009-12-03 13:53:58 -08:00
Junio C Hamano
af742b9b27 Merge branch 'rj/maint-cygwin-count-objects' into maint
* rj/maint-cygwin-count-objects:
  git-count-objects: Fix a disk-space under-estimate on Cygwin
2009-12-03 13:53:54 -08:00
Junio C Hamano
24807f9d5b Merge branch 'mm/maint-hint-failed-merge' into maint
* mm/maint-hint-failed-merge:
  user-manual: Document that "git merge" doesn't like uncommited changes.
  merge-recursive: point the user to commit when file would be overwritten.
2009-12-03 13:52:54 -08:00
Junio C Hamano
d718c19bc6 Merge branch 'th/maint-remote-update-help-string' into maint
* th/maint-remote-update-help-string:
  Update 'git remote update' usage string to match man page.
2009-12-03 13:52:31 -08:00
Junio C Hamano
3920917861 Merge branch 'rj/maint-t9700' into maint
* rj/maint-t9700:
  t9700-perl-git.sh: Fix a test failure on Cygwin
2009-12-03 13:52:22 -08:00
Junio C Hamano
2936824af2 Merge branch 'ls/maint-mailinfo-no-inbody' into maint
* ls/maint-mailinfo-no-inbody:
  git am/mailinfo: Don't look at in-body headers when rebasing
2009-12-03 13:52:16 -08:00
Junio C Hamano
3c362d4baa Merge branch 'mo/maint-crlf-doc' into maint
* mo/maint-crlf-doc:
  core.autocrlf documentation: mention the crlf attribute
2009-12-03 13:52:11 -08:00
Junio C Hamano
e24bd95879 Merge branch 'th/remote-usage' into maint
* th/remote-usage:
  git remote: Separate usage strings for subcommands
2009-12-03 13:51:53 -08:00
Junio C Hamano
9c1506af6a Merge branch 'pb/maint-use-custom-perl' into maint
* pb/maint-use-custom-perl:
  Make sure $PERL_PATH is defined when the test suite is run.
2009-12-03 13:51:41 -08:00
Junio C Hamano
d1dfc016d8 Merge branch 'mm/config-pathname-tilde-expand' into maint
* mm/config-pathname-tilde-expand:
  Documentation: avoid xmlto input error
  expand_user_path: expand ~ to $HOME, not to the actual homedir.
  Expand ~ and ~user in core.excludesfile, commit.template
2009-12-03 13:51:36 -08:00
Junio C Hamano
f2c0ca4fae Merge branch 'bc/grep-i-F' into maint
* bc/grep-i-F:
  grep: Allow case insensitive search of fixed-strings
2009-12-03 13:51:26 -08:00
Junio C Hamano
9a6b9cdd72 Merge branch 'jk/maint-break-rename-reduce-memory' into maint
* jk/maint-break-rename-reduce-memory:
  diffcore-rename: reduce memory footprint by freeing blob data early
  diffcore-break: save cnt_data for other phases
  diffcore-break: free filespec data as we go
2009-12-03 13:51:21 -08:00
Junio C Hamano
c206224b2b Merge branch 'rj/maint-simplify-cygwin-makefile' into maint
* rj/maint-simplify-cygwin-makefile:
  Makefile: merge two Cygwin configuration sections into one
2009-12-03 13:51:16 -08:00
Junio C Hamano
dc733ef419 Merge branch 'rg/doc-workflow' into maint
* rg/doc-workflow:
  Add branch management for releases to gitworkflows
2009-12-03 13:50:41 -08:00
Junio C Hamano
ef3a4fd670 Merge branch 'np/maint-sideband-favor-status' into maint
* np/maint-sideband-favor-status:
  give priority to progress messages
2009-12-03 13:50:24 -08:00
Junio C Hamano
59a0a0bd57 Documentation: xmlto 0.0.18 does not know --stringparam
Newer DocBook stylesheets want man.base.url.for.relative.links
parameter set when formatting manpages with external references
to turn them into full URLs, and leave a helpful "you should
set this parameter" message in the output.  Earlier we added
the MAN_BASE_URL make variable to specify the value for it.

When MAN_BASE_URL is not given, it ought to be safe to set the
parameter to empty; it would result in an empty leading path for
older stylesheets that ignore the parameter, and newer ones
would produce the same "relative URL" without the message.

Unfortunately, older xmlto (at least version 0.0.18 released in
early 2004 that comes with RHEL/CentOS 5) does not understand
the --stringparam command line option, so we cannot add the
parameter definition unconditionally to the command line.  Work
it around by passing the parameter only when set.

If you do not have a suitable URL prefix, you can pass a quoted empty
string to it, like so:

    $ make MAN_BASE_URL='""'

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 11:23:03 -08:00
Brandon Casey
3994e8a98d t4201: use ISO8859-1 rather than ISO-8859-1
Some ancient platforms do not have an extensive list of alternate names for
character encodings.  For example, Solaris 7 and IRIX 6.5 do not know that
ISO-8859-1 is the same as ISO8859-1.  Modern platforms do know this, so use
the older name.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 10:06:13 -08:00
Jan Krüger
995fc2f7e1 pull: clarify advice for the unconfigured error case
When pull --rebase fails because it cannot find what branch to
merge against, the error message implies we are trying to merge.
Say "rebase against" instead of "merge with" to avoid confusion.

The configuration suggested to remedy the situation uses a
confusing syntax, with variables specified in the dotted form
accepted by 'git config' but separated from their values by the
'=' delimiter used by config files.  Since the user will have to
edit this output anyway, it is more helpful to provide a config
file snippet to paste into an editor and modify.

Signed-off-by: Jan Krüger <jk@jk.gs>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 10:04:27 -08:00
Junio C Hamano
eefe19fbfc Git 1.6.5.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 00:08:16 -08:00
Junio C Hamano
8dd35c7121 Unconditionally set man.base.url.for.relative.links
Even setting it to empty is better than leaving it unset as it
prevents the warning cruft from appearing in the output.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-03 00:06:52 -08:00
Junio C Hamano
a479a564dc Documentation/Makefile: allow man.base.url.for.relative.link to be set from Make
Signed-off-by: Junio C Hamano <junio@kernel.org>
2009-12-03 02:45:09 +00: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
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
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
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
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