Граф коммитов

7633 Коммитов

Автор SHA1 Сообщение Дата
Junio C Hamano 90360c710c Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maint
"git apply" parsed patches that add new files, generated by programs
other than Git, incorrectly.  This is an old breakage in v1.7.11.

* tr/maint-apply-non-git-patch-parsefix:
  apply: carefully strdup a possibly-NULL name
2013-07-15 10:36:14 -07:00
Junio C Hamano d2db8f78c4 Merge branch 'jk/pull-into-dirty-unborn' into maint
"git pull" into nothing trashed "local changes" that were in the
index.

* jk/pull-into-dirty-unborn:
  pull: merge into unborn by fast-forwarding from empty tree
  pull: update unborn branch tip after index
2013-07-15 10:35:43 -07:00
Junio C Hamano 1f101bf650 Merge branch 'fg/submodule-non-ascii-path' into maint
Many "git submodule" operations did not work on a submodule at a
path whose name is not in ASCII.

* fg/submodule-non-ascii-path:
  t7400: test of UTF-8 submodule names pass under Mac OS
  handle multibyte characters in name
2013-07-15 10:35:17 -07:00
Junio C Hamano 8ca36db013 Merge branch 'mt/send-email-cc-match-fix' into maint
Logic used by git-send-email to suppress cc mishandled names like "A
U. Thor" <author@example.xz>, where the human readable part needs to
be quoted (the user input may not have the double quotes around the
name, and comparison was done between quoted and unquoted strings).
It also mishandled names that need RFC2047 quoting.

* mt/send-email-cc-match-fix:
  send-email: sanitize author when writing From line
  send-email: add test for duplicate utf8 name
  test-send-email: test for pre-sanitized self name
  t/send-email: test suppress-cc=self with non-ascii
  t/send-email: add test with quoted sender
  send-email: make --suppress-cc=self sanitize input
  t/send-email: test suppress-cc=self on cccmd
  send-email: fix suppress-cc=self on cccmd
  t/send-email.sh: add test for suppress-cc=self
2013-07-15 10:34:36 -07:00
Junio C Hamano 0bdae5ff7d Merge branch 'jc/t5551-posix-sed-bre' into maint
* jc/t5551-posix-sed-bre:
  t5551: do not use unportable sed '\+'
2013-07-03 15:37:58 -07:00
Junio C Hamano 250ee16c14 Merge branch 'rs/empty-archive' into maint
* rs/empty-archive:
  t5004: resurrect original empty tar archive test
  t5004: avoid using tar for checking emptiness of archive

Conflicts:
	t/t5004-archive-corner-cases.sh
2013-07-03 15:36:54 -07:00
Junio C Hamano 4b0d73f33d Merge branch 'ar/wildmatch-foldcase' into maint
The wildmatch engine did not honor WM_CASEFOLD option correctly.

* ar/wildmatch-foldcase:
  wildmatch: properly fold case everywhere
2013-07-03 15:31:27 -07:00
Junio C Hamano 318e758f32 Merge branch 'cb/log-follow-with-combined' into maint
"git log -c --follow $path" segfaulted upon hitting the commit that
renamed the $path being followed.

* cb/log-follow-with-combined:
  fix segfault with git log -c --follow
2013-07-03 15:30:59 -07:00
Junio C Hamano b3bf469bf8 Merge branch 'rr/die-on-missing-upstream' into maint
When a reflog notation is used for implicit "current branch", we did
not say which branch, and worse said "branch ''".

* rr/die-on-missing-upstream:
  sha1_name: fix error message for @{<N>}, @{<date>}
  sha1_name: fix error message for @{u}
2013-07-03 15:30:24 -07:00
Andrew Pimlott f66d000b0d t7500: fix flipped actual/expect
Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-01 09:53:00 -07:00
Andrew Pimlott 296fa99334 lib-rebase: document exec_ in FAKE_LINES
Signed-off-by: Andrew Pimlott <andrew@pimlott.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-01 09:52:25 -07:00
SZEDER Gábor 5155c7f37a test: spell 'ls-files --delete' option correctly in test descriptions
The option is spelled '--deleted'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-30 12:31:26 -07:00
Junio C Hamano 6653aa9ecd Merge branch 'nd/clone-connectivity-shortcut' (early part) into maint
Cloning with "git clone --depth N" while fetch.fsckobjects (or
transfer.fsckobjects) is set to true did not tell the cut-off points
of the shallow history to the process that validates the objects and
the history received, causing the validation to fail.

* 'nd/clone-connectivity-shortcut' (early part):
  fetch-pack: prepare updated shallow file before fetching the pack
  clone: let the user know when check_everything_connected is run
2013-06-28 10:00:00 -07:00
Junio C Hamano 88f90f8286 Merge branch 'ks/difftool-dir-diff-copy-fix' into maint
* ks/difftool-dir-diff-copy-fix:
  difftool --dir-diff: allow changing any clean working tree file
2013-06-27 14:38:23 -07:00
Junio C Hamano c9cae1e28a Merge branch 'fc/show-branch-in-rebase-am' into maint
* fc/show-branch-in-rebase-am:
  prompt: fix for simple rebase
2013-06-27 14:38:16 -07:00
Junio C Hamano ee1a1ddf38 Merge branch 'rs/commit-m-no-edit' into maint
* rs/commit-m-no-edit:
  commit: don't start editor if empty message is given with -m
2013-06-27 14:38:07 -07:00
Junio C Hamano 872f5bfb08 Merge branch 'jc/strbuf-branchname-fix' into maint
* jc/strbuf-branchname-fix:
  strbuf_branchname(): do not double-expand @{-1}~22
2013-06-27 14:38:02 -07:00
Junio C Hamano a0bf40ddc9 Merge branch 'mk/combine-diff-context-horizon-fix' into maint
* mk/combine-diff-context-horizon-fix:
  combine-diff.c: Fix output when changes are exactly 3 lines apart
2013-06-27 14:37:56 -07:00
Junio C Hamano 81de16a5d5 Merge branch 'kb/ancestry-path-threedots' into maint
* kb/ancestry-path-threedots:
  revision.c: treat A...B merge bases as if manually specified
  t6019: demonstrate --ancestry-path A...B breakage
2013-06-27 14:37:52 -07:00
Junio C Hamano 0fb2c97c20 Merge branch 'mh/fetch-into-shallow' into maint
* mh/fetch-into-shallow:
  t5500: add test for fetching with an unknown 'shallow'
  upload-pack: ignore 'shallow' lines with unknown obj-ids
2013-06-27 14:37:41 -07:00
Junio C Hamano 11fbc0b1e1 Merge branch 'jh/checkout-auto-tracking' into maint
* jh/checkout-auto-tracking:
  glossary: Update and rephrase the definition of a remote-tracking branch
  branch.c: Validate tracking branches with refspecs instead of refs/remotes/*
  t9114.2: Don't use --track option against "svn-remote"-tracking branches
  t7201.24: Add refspec to keep --track working
  t3200.39: tracking setup should fail if there is no matching refspec.
  checkout: Use remote refspecs when DWIMming tracking branches
  t2024: Show failure to use refspec when DWIMming remote branch names
  t2024: Add tests verifying current DWIM behavior of 'git checkout <branch>'
2013-06-27 14:37:21 -07:00
Thomas Rast 212eb96a96 apply: carefully strdup a possibly-NULL name
2901bbe (apply: free patch->{def,old,new}_name fields, 2012-03-21)
cleaned up the memory management of filenames in the patches, but
forgot that find_name_traditional() can return NULL as a way of saying
"I couldn't find a name".

That NULL unfortunately gets passed into xstrdup() next, resulting in
a segfault.  Use null_strdup() so as to safely propagate the null,
which will let us emit the correct error message.

Reported-by: DevHC on #git
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-21 08:36:07 -07:00
Thomas Rast b4dc085a8d pull: merge into unborn by fast-forwarding from empty tree
The logic for pulling into an unborn branch was originally
designed to be used on a newly-initialized repository
(d09e79c, git-pull: allow pulling into an empty repository,
2006-11-16).  It thus did not initially deal with
uncommitted changes in the unborn branch.  The case of an
_unstaged_ untracked file was fixed by 4b3ffe5 (pull: do not
clobber untracked files on initial pull, 2011-03-25).
However, it still clobbered existing staged files, both when
the file exists in the merged commit (it will be
overwritten), and when it does not (it will be deleted).

We fix this by doing a two-way merge, where the "current"
side of the merge is an empty tree, and the "target" side is
HEAD (already updated to FETCH_HEAD at this point).  This
amounts to claiming that all work in the index was done vs.
an empty tree, and thus all content of the index is
precious.

Note that this use of read-tree just gives us protection
against overwriting index and working tree changes. It will
not actually result in a 3-way merge conflict in the index.
This is fine, as this is a rare situation, and the conflict
would not be interesting anyway (it must, by definition, be
an add/add conflict with the whole content conflicting). And
it makes it simpler for the user to recover, as they have no
HEAD to "git reset" back to.

Reported-by: Stefan Schüßler <mail@stefanschuessler.de>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-20 15:51:35 -07:00
Torsten Bögershausen bed9470489 t7400: test of UTF-8 submodule names pass under Mac OS
submodules with names using UTF-8 need core.precomposeunicode true
under Mac OS X, set it in the test case.

Improve the portability:

  - Not all shells on all OS may understand literal UTF-8 strings.
  - Use a help variable filled by printf, as we do it in e.g. t0050.

"strange names" can be called UTF-8, rephrase the heading.

While at it, unbreak &&-chain in the test, and use test_config.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-20 12:00:57 -07:00
Michael S. Tsirkin 4cb46bddeb send-email: sanitize author when writing From line
sender is now sanitized, but we didn't sanitize author when checking
whether From: line is needed in the message body.

As a result git started writing duplicate From: lines when author
matched sender and has utf8 characters.

Reported-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-20 11:27:03 -07:00
Michael S. Tsirkin f07075c297 send-email: add test for duplicate utf8 name
Verify that author name is not duplicated if it matches sender, even
if it is in utf8 (the test expects a failure that will be fixed in
the next patch).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-20 11:25:46 -07:00
Fredrik Gustafsson 74671241fd handle multibyte characters in name
Many "git submodule" operations do not work on a submodule at a path whose
name is not in ASCII.

This is because "git ls-files" is used to find which paths are bound to
submodules to the current working tree, and the output is C-quoted by default
for non ASCII pathnames.

Tell "git ls-files" to not C-quote its output, which is easier than unwrapping
C-quote ourselves.

Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-14 08:04:32 -07:00
Junio C Hamano f2b4626d9e Merge branch 'maint-1.8.2' into maint
* maint-1.8.2:
  t0070 "mktemp to unwritable directory" needs SANITY
  pre-push.sample: Make the script executable
2013-06-11 14:24:56 -07:00
Torsten Bögershausen b3b8ceb48b t0070 "mktemp to unwritable directory" needs SANITY
Use the SANITY prerequisite when testing if a temp file can
be created in a read only directory.
Skip the test under CYGWIN, or skip it under Unix/Linux when
it is run as root.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11 14:23:31 -07:00
Junio C Hamano fd50030209 Merge branch 'kb/status-ignored-optim-2' into maint
Fix recent regression of .gitignore files that list !directory to
mark it not-ignored.

* kb/status-ignored-optim-2:
  dir.c: fix ignore processing within not-ignored directories
2013-06-09 17:05:15 -07:00
Michael S. Tsirkin 14952666d1 test-send-email: test for pre-sanitized self name
Users can sanitize from address manually.
Verify that these are suppressed properly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05 12:27:01 -07:00
Michael S. Tsirkin 4b45bcf7b1 t/send-email: test suppress-cc=self with non-ascii
test suppress-cc=self when sender is non-acsii

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05 12:27:00 -07:00
Michael S. Tsirkin dd29f0b4dc t/send-email: add test with quoted sender
add test where sender address needs to be quoted.
Make sure --suppress-cc=self works well in this case.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05 12:26:59 -07:00
Michael S. Tsirkin d6ee44568c t/send-email: test suppress-cc=self on cccmd
Check that suppress-cc=self works when applied
to output of cccmd.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-05 12:26:56 -07:00
Junio C Hamano f445500e4d t/README: test_must_fail is for testing Git
When a test wants to make sure there is no <string> in an output
file, we should just say "! grep string output".

"test_must_fail" is there only to test Git command and catch unusual
deaths we know about (e.g. segv) as an error, not as an expected
failure.  "test_must_fail grep string output" is unnecessary, as
we are not making sure the system binaries do not dump core or
anything like that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-04 13:36:54 -07:00
Michael S. Tsirkin 5adcf2c699 t/send-email.sh: add test for suppress-cc=self
This adds a basic test for --suppress-cc=self
option of git send-email.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-03 09:21:24 -07:00
Karsten Blees c3c327deea dir.c: fix ignore processing within not-ignored directories
As of 95c6f271 "dir.c: unify is_excluded and is_path_excluded APIs", the
is_excluded API no longer recurses into directories that match an ignore
pattern, and returns the directory's ignored state for all contained paths.

This is OK for normal ignore patterns, i.e. ignoring a directory affects
the entire contents recursively.

Unfortunately, this also "works" for negated ignore patterns ('!dir'), i.e.
the entire contents is "not-ignored" recursively, regardless of ignore
patterns that match the contents directly.

In prep_exclude, skip recursing into a directory only if it is really
ignored (i.e. the ignore pattern is not negated).

Signed-off-by: Karsten Blees <blees@dcon.de>
Tested-by: Øystein Walle <oystwa@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-02 14:54:38 -07:00
Anthony Ramine b79c0c3755 wildmatch: properly fold case everywhere
Case folding is not done correctly when matching against the [:upper:]
character class and uppercased character ranges (e.g. A-Z).
Specifically, an uppercase letter fails to match against any of them
when case folding is requested because plain characters in the pattern
and the whole string are preemptively lowercased to handle the base case
fast.

That optimization is kept and ISLOWER() is used in the [:upper:] case
when case folding is requested, while matching against a character range
is retried with toupper() if the character was lowercase, as the bounds
of the range itself cannot be modified (in a case-insensitive context,
[A-_] is not equivalent to [a-_]).

Signed-off-by: Anthony Ramine <n.oxyde@gmail.com>
Reviewed-by: Duy Nguyen <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-02 14:13:05 -07:00
Kenichi Saita 32eaf1de7f difftool --dir-diff: allow changing any clean working tree file
The temporary directory prepared by "difftool --dir-diff" to
show the result of a change can be modified by the user via
the tree diff program, and we try hard not to lose changes
to them after tree diff program returns to us.

However, the set of files to be copied back is computed
differently between --symlinks and --no-symlinks modes.  The
former checks all paths that start out as identical to the
working tree file, while the latter checks paths that
already had a local modification in the working tree,
allowing changes made in the tree diff program to paths that
did not have any local change to be lost.

Signed-off-by: Kenichi Saita <nitoyon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-29 12:50:08 -07:00
Felipe Contreras 1306321ebe prompt: fix for simple rebase
When we are rebasing without options ('am' mode), the head rebased lives
in '$g/rebase-apply/head-name', so lets use that information so it's
reported the same way as if we were doing other rebases (-i or -m).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-29 11:27:56 -07:00
René Scharfe 25206778aa commit: don't start editor if empty message is given with -m
If an empty message is specified with the option -m of git commit then
the editor is started.  That's unexpected and unnecessary.  Instead of
using the length of the message string for checking if the user
specified one, directly remember if the option -m was given.

Reported-by: Mislav Marohnić <mislav.marohnic@gmail.com>
Signed-off-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 14:33:01 -07:00
Clemens Buchacher 46ec510ac0 fix segfault with git log -c --follow
In diff_tree_combined we make a copy of diffopts. In
try_to_follow_renames, called via diff_tree_sha1, we free and
re-initialize diffopts->pathspec->items. Since we did not make a deep
copy of diffopts in diff_tree_combined, the original diffopts does not
get the update. By the time we return from diff_tree_combined,
rev->diffopt->pathspec->items points to an invalid memory address. We
get a segfault next time we try to access that pathspec.

Instead, along with the copy of diffopts, make a copy pathspec->items as
well.

We would also have to make a copy of pathspec->raw to keep it consistent
with pathspec->items, but nobody seems to rely on that.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 11:26:24 -07:00
Nguyễn Thái Ngọc Duy 6035d6aad8 fetch-pack: prepare updated shallow file before fetching the pack
index-pack --strict looks up and follows parent commits. If shallow
information is not ready by the time index-pack is run, index-pack may
be led to non-existent objects. Make fetch-pack save shallow file to
disk before invoking index-pack.

git learns new global option --shallow-file to pass on the alternate
shallow file path. Undocumented (and not even support --shallow-file=
syntax) because it's unlikely to be used again elsewhere.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 08:06:08 -07:00
Ramkumar Ramachandra 17bf4ff3cd sha1_name: fix error message for @{u}
Currently, when no (valid) upstream is configured for a branch, you get
an error like:

  $ git show @{u}
  error: No upstream configured for branch 'upstream-error'
  error: No upstream configured for branch 'upstream-error'
  fatal: ambiguous argument '@{u}': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

The "error: " line actually appears twice, and the rest of the error
message is useless.  In sha1_name.c:interpret_branch_name(), there is
really no point in processing further if @{u} couldn't be resolved, and
we might as well die() instead of returning an error().  After making
this change, you get:

  $ git show @{u}
  fatal: No upstream configured for branch 'upstream-error'

Also tweak a few tests in t1507 to expect this output.

This only turns error() that may be called after we know we are
dealing with an @{upstream} marker into die(), without touching
silent error returns "return -1" from the function.  Any caller that
wants to handle an error condition itself will not be hurt by this
change, unless they want to see the message from error() and then
exit silently without giving its own message, which needs to be
fixed anyway.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-22 12:46:02 -07:00
Tobias Schulte f4f4c7fc00 git-svn: introduce --parents parameter for commands branch and tag
This parameter is equivalent to the parameter --parents on svn cp commands
and is useful for non-standard repository layouts.

Signed-off-by: Tobias Schulte <tobias.schulte@gliderpilot.de>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-20 22:05:54 +00:00
John Keeping 1f197a1de4 difftool: fix dir-diff when file does not exist in working tree
Commit 02c5631 (difftool --dir-diff: symlink all files matching the
working tree, 2013-03-14) does not handle the case where a file that is
being compared does not exist in the working tree.  Fix this by checking
for existence explicitly before running git-hash-object.

Reported-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17 11:46:53 -07:00
Junio C Hamano 84cf246670 strbuf_branchname(): do not double-expand @{-1}~22
If you were on 'frotz' branch before you checked out your current
branch, "git merge @{-1}~22" means the same as "git merge frotz~22".

The strbuf_branchname() function, when interpret_branch_name() gives
up resolving "@{-1}~22" fully, returns "frotz" and tells the caller
that it only resolved "@{-1}" part of the input, mistakes this as a
total failure, and appends the whole thing to the result, yielding
"frotz@{-1}~22", which does not make any sense.

Inspect the return value from interpret_branch_name() a bit more
carefully.  When it errored out without consuming anything, we will
get -1 and we should return the whole thing.  Otherwise, we should
append the remainder (i.e. "~22" in the earlier example) to the
partially resolved name (i.e. "frotz").

The test suite adds enough number of checkout to make @{-12} in the
last test in t0100 that tried to check "we haven't flipped branches
that many times" error case succeed; raise the number to a hundred.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16 12:53:59 -07:00
Kevin Bracey a765499a08 revision.c: treat A...B merge bases as if manually specified
The documentation assures users that "A...B" is defined as "A B --not
$(git merge-base --all A B)". This wasn't in fact quite true, because
the calculated merge bases were not sent to add_rev_cmdline().

The main effect of this was that although

  git rev-list --ancestry-path A B --not $(git merge-base --all A B)

worked, the simpler form

  git rev-list --ancestry-path A...B

failed with a "no bottom commits" error.

Other potential users of bottom commits could also be affected by this
problem, if they examine revs->cmdline_info; I came across the issue in
my proposed history traversal refinements series.

So ensure that the calculated merge bases are sent to add_rev_cmdline(),
flagged with new 'whence' enum value REV_CMD_MERGE_BASE.

Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16 11:45:34 -07:00
Matthijs Kooijman aac385717a combine-diff.c: Fix output when changes are exactly 3 lines apart
When a deletion is followed by exactly 3 (or whatever the number of
context lines) unchanged lines, followed by another change, the combined
diff output would hide the first deletion, resulting in a malformed
diff.

This happened because the 3 lines before each change are painted
interesting, but also marked as no_pre_delete to prevent showing deletes
that were previously marked as uninteresting. This behaviour was
introduced in c86fbe53 (diff -c/--cc: do not include uninteresting
deletion before leading context). However, as a side effect, this could
also mark deletes that were already interesting as no_pre_delete. This
would happen only if the delete was exactly 3 lines away from the next
change, since lines farther away would not be touched by the "paint
three lines before the change" code and lines closer would be painted
by the "merge two adjacent hunks" code instead, which does not set the
no_pre_delete flag.

This commit fixes this problem by only setting the no_pre_delete flag
for changes that were previously uninteresting.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:02:04 -07:00
Kevin Bracey f659031c1c t6019: demonstrate --ancestry-path A...B breakage
Signed-off-by: Kevin Bracey <kevin@bracey.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-13 09:00:41 -07:00