Commit Graph

23717 Commits

Author SHA1 Message Date
Junio C Hamano
046c5e572b Merge branch 'cb/maint-orphan-merge-noclobber' into next
* cb/maint-orphan-merge-noclobber:
  do not overwrite untracked during merge from unborn branch

Conflicts:
	t/t7607-merge-overwrite.sh
2010-11-15 11:02:14 -08:00
Junio C Hamano
257c77ac03 Merge branch 'ao/send-email-irt' into next
* ao/send-email-irt:
  git-send-email.perl: make initial In-Reply-To apply only to first email
2010-11-15 11:02:14 -08:00
Junio C Hamano
e9714011d1 Merge branch 'jk/add-e-doc' into next
* jk/add-e-doc:
  docs: give more hints about how "add -e" works
2010-11-15 11:02:13 -08:00
Junio C Hamano
774ae9a5ae Merge branch 'master' into next
* master:
  tests: use test_cmp instead of piping to diff(1)
  t7004-tag.sh: re-arrange git tag comment for clarity
  rebase -X: do not clobber strategy
  Documentation: document show -s
  dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
2010-11-15 11:01:58 -08:00
Junio C Hamano
d6b634fafd Merge branch 'maint'
* maint:
  rebase -X: do not clobber strategy
2010-11-15 11:00:24 -08:00
Clemens Buchacher
172b6428d0 do not overwrite untracked during merge from unborn branch
In case HEAD does not point to a valid commit yet, merge is
implemented as a hard reset. This will cause untracked files to be
overwritten.

Instead, assume the empty tree for HEAD and do a regular merge. An
untracked file will cause the merge to abort and do nothing. If no
conflicting files are present, the merge will have the same effect
as a hard reset.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-15 09:27:33 -08:00
Ævar Arnfjörð Bjarmason
f8d186bba7 tests: use test_cmp instead of piping to diff(1)
Change submodule tests that piped to diff(1) to use test_cmp. The
resulting unified diff is easier to read.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-14 10:57:19 -08:00
Ævar Arnfjörð Bjarmason
5649bd9a51 t7004-tag.sh: re-arrange git tag comment for clarity
Split the "message in editor has initial comment" test into three
tests. The motivation is to be able to only skip the middle part under
NO_GETTEXT_POISON.

In addition the return value of 'git tag' was being returned. We now
check that it's non-zero. I used ! instead of test_must_fail so that
the GIT_EDITOR variable was only used in this command invocation, and
because the surrounding tests use this style.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-14 10:43:57 -08:00
Antonio Ospite
db54c8e710 git-send-email.perl: make initial In-Reply-To apply only to first email
When an initial --in-reply-to is supplied, make it apply only to the
first message; --[no-]chain-reply-to setting are honored by second and
subsequent messages; this is also how the git-format-patch option with
the same name behaves.

Moreover, when $initial_reply_to is asked to the user interactively it
is asked as the "Message-ID to be used as In-Reply-To for the _first_
email", this makes the user think that the second and subsequent
patches are not using it but are considered as replies to the first
message or chained according to the --[no-]chain-reply setting.

Look at the v2 series in the illustration to see what the new behavior
ensures:

       (before the patch)          |      (after the patch)
 [PATCH 0/2] Here is what I did... | [PATCH 0/2] Here is what I did...
   [PATCH 1/2] Clean up and tests  |   [PATCH 1/2] Clean up and tests
   [PATCH 2/2] Implementation      |   [PATCH 2/2] Implementation
   [PATCH v2 0/3] Here is a reroll |   [PATCH v2 0/3] Here is a reroll
   [PATCH v2 1/3] Clean up         |     [PATCH v2 1/3] Clean up
   [PATCH v2 2/3] New tests        |     [PATCH v2 2/3] New tests
   [PATCH v2 3/3] Implementation   |     [PATCH v2 3/3] Implementation

This is the typical behaviour we want when we send a series with cover
letter in reply to some discussion, the new patch series should appear
as a separate subtree in the discussion.

Also update the documentation on --in-reply-to to describe the new
behavior.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-12 13:44:26 -08:00
Martin von Zweigbergk
f772c34ce0 rebase -X: do not clobber strategy
If any strategy options are passed to -X, the strategy will always be
set to 'recursive'. According to the documentation, it should default to
'recursive' if it is not set, but it should be possible to set it to
other values.

This fixes a regression introduced in v1.7.3-rc0~67^2 (2010-07-29).

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-10 09:38:36 -08:00
Jeff King
0fe802d480 docs: give more hints about how "add -e" works
The previous text was not exactly accurate; it is OK to
change space and minus lines, but only in certain ways.

This patch takes a whole new approach, which is to describe
the sorts of conceptual operations you might want to
perform. It also includes a healthy dose of warnings about
how things can go wrong.

Since the size of the text is getting quite long, it also
splits this out into an "editing patches" section. This
makes more sense with the current structure, anyway, which
already splits out the interactive mode description.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09 16:37:40 -08:00
Junio C Hamano
6f10c4103d Merge branch 'maint'
* maint:
  Documentation: document show -s
  dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
2010-11-09 09:45:16 -08:00
Jonathan Nieder
60aa9cf8f3 Documentation: document show -s
Git's diff machinery has supported a -s (silence diff output) option
as far back as v0.99~900 (Silent flag for show-diff, 2005-04-13), but
the option is only advertised in an odd corner of the git diff-tree
manual.

The main use is to retrieve basic metadata about a commit:

	git show -s rev

Explain this in the 'git log' manual and provide an example in the
'git show' examples section.  This is kind of a cop-out, since it
would be more useful to explain it in the 'git show' manual proper,
which says:

	The command takes options applicable to the git
	diff-tree command to control how the changes the
	commit introduces are shown.

	This manual page describes only the most frequently
	used options.

Fixing that is a larger task for another day.

Reported-by: Will Hall <will@gnatter.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09 09:42:57 -08:00
Nguyễn Thái Ngọc Duy
ae3cdfe112 dir.c: fix EXC_FLAG_MUSTBEDIR match in sparse checkout
Commit c84de70 (excluded_1(): support exclude files in index -
2009-08-20) tries to work around the fact that there is no
directory/file information in index entries, therefore
EXC_FLAG_MUSTBEDIR match would fail.

Unfortunately the workaround is flawed. This fixes it.

Reported-by: Thomas Rinderknecht <thomasr@sailguy.org>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-08 11:39:23 -08:00
Junio C Hamano
d103166d7e Merge branch 'ao/send-email-irt' into next
* ao/send-email-irt:
  t9001: send-email interation with --in-reply-to and --chain-reply-to
2010-11-08 10:58:47 -08:00
Junio C Hamano
54aae5e1a0 t9001: send-email interation with --in-reply-to and --chain-reply-to
1. When --in-reply-to gives $reply_to, the first one becomes a reply to
    that message, with or without --chain-reply-to.

 2. When --chain-reply-to is in effect, all the messages are strung
    together to form a single chain.  The first message may be in reply to
    the $reply_to given by --in-reply-to command line option (see
    previous), or the root of the discussion thread.  The second one is a
    response to the first one, and the third one is a response to the
    second one, etc.

 3. When --chain-reply-to is not in effect:

    a. When --in-reply-to is used, too, the second and the subsequent ones
       become replies to $reply_to.  Together with the first rule, all
       messages become replies to $reply_to given by --in-reply-to.

    b. When --in-reply-to is not used, presumably the second and
       subsequent ones become replies to the first one, which would be the
       root.

The documentation is reasonably clear about the 1., 2. and 3a. above, I
think, even though I do not think 3b. is clearly specified.

The two tests added by this patch at least documents what happens between
these two options.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-05 14:21:05 -07:00
Junio C Hamano
ec4f8062e4 Merge branch 'mg/make-prove' into next
* mg/make-prove:
  test: allow running the tests under "prove"
2010-11-05 11:52:51 -07:00
Junio C Hamano
90b3adf9e3 Merge branch 'jn/gitweb-test' into next
* jn/gitweb-test:
  gitweb/Makefile: Include gitweb/config.mak
  gitweb/Makefile: Add 'test' and 'test-installed' targets
  t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
  gitweb: Move call to evaluate_git_version after evaluate_gitweb_config
2010-11-05 11:39:08 -07:00
Junio C Hamano
7413413d0a Merge branch 'il/remote-fd-ext' into next
* il/remote-fd-ext:
  git-remote-ext
  git-remote-fd
  Add bidirectional_transfer_loop()
2010-11-05 11:39:08 -07:00
Junio C Hamano
16902eb8c0 Merge branch 'en/merge-recursive' into next
* en/merge-recursive: (40 commits)
  merge-recursive:make_room_for_directories - work around dumb compilers
  merge-recursive: Remove redundant path clearing for D/F conflicts
  merge-recursive: Make room for directories in D/F conflicts
  handle_delete_modify(): Check whether D/F conflicts are still present
  merge_content(): Check whether D/F conflicts are still present
  conflict_rename_rename_1to2(): Fix checks for presence of D/F conflicts
  conflict_rename_delete(): Check whether D/F conflicts are still present
  merge-recursive: Delay modify/delete conflicts if D/F conflict present
  merge-recursive: Delay content merging for renames
  merge-recursive: Delay handling of rename/delete conflicts
  merge-recursive: Move handling of double rename of one file to other file
  merge-recursive: Move handling of double rename of one file to two
  merge-recursive: Avoid doubly merging rename/add conflict contents
  merge-recursive: Update merge_content() call signature
  merge-recursive: Update conflict_rename_rename_1to2() call signature
  merge-recursive: Structure process_df_entry() to handle more cases
  merge-recursive: Have process_entry() skip D/F or rename entries
  merge-recursive: New function to assist resolving renames in-core only
  merge-recursive: New data structures for deferring of D/F conflicts
  merge-recursive: Move process_entry's content merging into a function
  ...
2010-11-05 11:39:08 -07:00
Junio C Hamano
b3b09f3fb7 Merge branch 'cb/diff-fname-optim' into next
* cb/diff-fname-optim:
  diff: avoid repeated scanning while looking for funcname
  do not search functions for patch ID
  add rebase patch id tests
2010-11-05 11:39:08 -07:00
Junio C Hamano
5a2f940bfa Merge branch 'ak/submodule-sync' into next
* ak/submodule-sync:
  submodule sync: Update "submodule.<name>.url" for empty directories
2010-11-05 11:39:08 -07:00
Junio C Hamano
55ea322617 Merge branch 'cb/leading-path-removal' into next
* cb/leading-path-removal:
  do not overwrite files in leading path
  lstat_cache: optionally return match_len
  add function check_ok_to_remove()
  t7607: add leading-path tests
  t7607: use test-lib functions and check MERGE_HEAD
2010-11-05 11:39:08 -07:00
Junio C Hamano
9207c6d6da Merge branch 'jk/push-progress' into next
* jk/push-progress:
  push: pass --progress down to git-pack-objects
  t5523-push-upstream: test progress messages
  t5523-push-upstream: add function to ensure fresh upstream repo
  test_terminal: ensure redirections work reliably
  test_terminal: catch use without TTY prerequisite
  test-lib: allow test code to check the list of declared prerequisites
  tests: test terminal output to both stdout and stderr
  tests: factor out terminal handling from t7006
2010-11-05 11:39:07 -07:00
Junio C Hamano
ef559d4741 Merge branch 'jn/send-pack-error' into next
* jn/send-pack-error:
  send-pack: avoid redundant "pack-objects died with strange error"
2010-11-05 11:39:07 -07:00
Junio C Hamano
32f0580337 Merge branch 'ks/no-textconv-symlink' into next
* ks/no-textconv-symlink:
  blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664''
  blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks
  blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
2010-11-05 11:39:07 -07:00
Junio C Hamano
0a99e7584b Merge branch 'jk/no-textconv-symlink' into next
* jk/no-textconv-symlink:
  diff: don't use pathname-based diff drivers for symlinks
2010-11-05 11:39:07 -07:00
Junio C Hamano
6836d70a56 Merge branch 'kb/completion-checkout' into next
* kb/completion-checkout:
  completion: Support the DWIM mode for git checkout
2010-11-05 11:39:07 -07:00
Junio C Hamano
4967932f77 Merge branch 'sg/completion' into next
* sg/completion:
  bash: support pretty format aliases
  bash: support more 'git notes' subcommands and their options
  bash: not all 'git bisect' subcommands make sense when not bisecting
  bash: offer refs for 'git bisect start'
2010-11-05 11:39:07 -07:00
Junio C Hamano
4a8b88dc90 Merge branch 'sg/bisect' into next
* sg/bisect:
  bisect: check for mandatory argument of 'bisect replay'
  bisect: improve error msg of 'bisect reset' when original HEAD is deleted
  bisect: improve error message of 'bisect log' while not bisecting
2010-11-05 11:39:07 -07:00
Junio C Hamano
ef1e754695 Merge branch 'jm/mailmap' into next
* jm/mailmap:
  t4203: do not let "git shortlog" DWIM based on tty
  t4203 (mailmap): stop hardcoding commit ids and dates
  mailmap: fix use of freed memory
2010-11-05 11:39:07 -07:00
Junio C Hamano
31fda6993f Merge branch 'jk/missing-config' into next
* jk/missing-config:
  config: treat non-existent config files as empty
2010-11-05 11:39:06 -07:00
Junio C Hamano
9d1ec144ab Merge branch 'jk/diff-CBM' into next
* jk/diff-CBM:
  diff: report bogus input to -C/-M/-B
2010-11-05 11:39:06 -07:00
Junio C Hamano
389fee78b6 Merge branch 'jk/add-e-doc' into next
* jk/add-e-doc:
  docs: give more hints about how "add -e" works
2010-11-05 11:39:06 -07:00
Junio C Hamano
861d16a3c3 Merge branch 'jl/maint-pull-tags-doc' into next
* jl/maint-pull-tags-doc:
  pull: Remove --tags option from manpage
2010-11-05 11:39:06 -07:00
Junio C Hamano
10e1aebe42 Merge branch 'kb/maint-submodule-savearg' into next
* kb/maint-submodule-savearg:
  submodule: only preserve flags across recursive status/update invocations
  submodule: preserve all arguments exactly when recursing
2010-11-05 11:39:06 -07:00
Junio C Hamano
861b5ac0ec Merge branch 'kb/maint-diff-ws-check' into next
* kb/maint-diff-ws-check:
  diff: handle lines containing only whitespace and tabs better
  test-lib: extend test_decode_color to handle more color codes
2010-11-05 11:39:06 -07:00
Junio C Hamano
0ead869fcb Merge branch 'bg/maint-gitweb-test-lib' into next
* bg/maint-gitweb-test-lib:
  t/gitweb-lib: Don't pass constant to decode_utf8

Conflicts:
	t/gitweb-lib.sh
2010-11-05 11:39:06 -07:00
Junio C Hamano
a2873a4455 Merge branch 'tr/maint-merge-file-subdir' into next
* tr/maint-merge-file-subdir:
  merge-file: correctly find files when called in subdir
  prefix_filename(): safely handle the case where pfx_len=0
2010-11-05 11:39:06 -07:00
Junio C Hamano
80ad03a3b9 Merge branch 'tr/maint-git-repack-tmpfile' into next
* tr/maint-git-repack-tmpfile:
  repack: place temporary packs under .git/objects/pack/
2010-11-05 11:39:06 -07:00
Junio C Hamano
406cba15db Merge branch 'jk/maint-rev-list-nul' into next
* jk/maint-rev-list-nul:
  rev-list: handle %x00 NUL in user format
2010-11-05 11:39:06 -07:00
Junio C Hamano
8456c664a1 Merge branch 'dk/maint-blame-el' into next
* dk/maint-blame-el:
  git-blame.el: Add (require 'format-spec)
2010-11-05 11:39:05 -07:00
Junio C Hamano
8b7543a6a5 Merge branch 'jk/maint-apply-no-binary' into next
* jk/maint-apply-no-binary:
  apply: don't segfault on binary files with missing data
2010-11-05 11:39:05 -07:00
Junio C Hamano
bc8f2fb5be Merge branch 'master' into next
* master:
  t0003: properly quote $HOME
  contrib/ciabot: git-describe commit instead of HEAD
  Fix a formatting error in git-merge.txt
  git-gui: apply color information from git diff output
  git-gui: use wordprocessor tab style to ensure tabs work as expected
  git-gui: correct assignment of work-tree
  git-gui: use full dialog width for old name when renaming branch
  git-gui: generic version trimming
  git-gui: enable the Tk console when tracing/debugging on Windows
  git-gui: show command-line errors in a messagebox on Windows
  On Windows, avoid git-gui to call Cygwin's nice utility
2010-11-05 10:42:56 -07:00
Junio C Hamano
3089c2b97a Merge branch 'aw/git-p4-deletion'
* aw/git-p4-deletion:
  Fix handling of git-p4 on deleted files
2010-11-05 10:42:46 -07:00
Junio C Hamano
06cfa8a858 Merge branch 'master' of git://repo.or.cz/git-gui
* 'master' of git://repo.or.cz/git-gui:
  git-gui: apply color information from git diff output
  git-gui: use wordprocessor tab style to ensure tabs work as expected
  git-gui: correct assignment of work-tree
  git-gui: use full dialog width for old name when renaming branch
  git-gui: generic version trimming
  git-gui: enable the Tk console when tracing/debugging on Windows
  git-gui: show command-line errors in a messagebox on Windows
  On Windows, avoid git-gui to call Cygwin's nice utility
2010-11-05 10:41:09 -07:00
Junio C Hamano
31731b0ea4 Merge branch 'maint'
* maint:
  Fix a formatting error in git-merge.txt
2010-11-05 10:36:49 -07:00
Jens Lehmann
2e5955f328 pull: Remove --tags option from manpage
"Fetch all tags and merge them" does not make any sense as a request at
the logical level, even though it might be more convenient to type.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03 15:20:33 -07:00
Kevin Ballard
98dbe63dbc submodule: only preserve flags across recursive status/update invocations
Recursive invocations of submodule update/status preserve all arguments,
so executing

        git submodule update --recursive -- foo

attempts to recursively update a submodule named "foo".

Naturally, this fails as one cannot have an infinitely-deep stack of
submodules each containing a submodule named "foo". The desired behavior
is instead to update foo and then recursively update all submodules
inside of foo.

This commit accomplishes that by only saving the flags for use in the
recursive invocation.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03 12:51:28 -07:00
Kevin Ballard
a7eff1a87a submodule: preserve all arguments exactly when recursing
Shell variables only hold strings, not lists of parameters,
so $orig_args after

        orig_args="$@"

fails to remember where each parameter starts and ends, if
some include whitespace.  So

        git submodule update \
                --reference='/var/lib/common objects.git' \
                --recursive --init

becomes

        git submodule update --reference=/var/lib/common \
                objects.git --recursive --init

in the inner repositories.  Use "git rev-parse --sq-quote" to
save parameters in quoted form ready for evaluation by the
shell, avoiding this problem.

Helped-By: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-03 12:51:26 -07:00