unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: John Wiegley <jwiegley@gmail.com>,
	Lars Magne Ingebrigtsen <larsi@gnus.org>,
	13949@debbugs.gnu.org
Subject: bug#13949: 24.4.1; `fill-paragraph' should not always put the buffer as modified
Date: Mon, 28 Mar 2016 00:20:08 +0300	[thread overview]
Message-ID: <343192e9-ea13-21fa-45be-b2d1737bedb7@yandex.ru> (raw)
In-Reply-To: <87shzb8wd5.fsf@wanadoo.es>

On 03/28/2016 12:05 AM, Óscar Fuentes wrote:

> I guess that the extra bits of entropy (160 vs 128) was a "fuzzy-warm"
> factor too on using SHA-1 instead of MD5. Git must avoid collisions
> among potentially hundreds of millions of objects (repos with that size
> already exists or will exist on the near future.)

Are there fewer different texts we'd have to be able to discern?

> Each and every hash
> must be different from all the others and hence avoid the Birthday
> Problem. Anyway, 128 bit hashes still would be good enough for those
> huge repos. fill-paragraph needs to discriminate only between 2 chunks
> of data.

I think you mean "2 chunks of data that must only be different in 
positioning and presence of newlines". Then yes, the odds of a collision 
must be slim. Still, I haven't seen (or performed) a sufficient analysis 
to evaluate them.

>> b) Git has a global object index. It _can_ detect collisions, or at
>> least that detection can be implemented.
>
> And what to do when a collision is detected?

Abort the current operation? Wait 50ms and retry creating the commit? 
Not 100% how the file contents are indexed: e.g. whether mtime factors 
into its hash value, too.

> Back to the topic, your suggetion about comparing the pre- and post-
> contents of the paragraph (and avoiding huge copies of the pre- contents
> by restricting the copied area to the paragraph itself) does not work
> when the file contains just one paragraph. Try visiting a big CSV dump
> or log and press M-q. You can abort the operation with C-g, but if Emacs
> starts to swap like crazy or exceeds the process memory limit and it is
> killed...

You can choose to skip the "did it changed" check if the region to check 
is too long. If the dump was one huge line, we can be confident that it 
will be changed upon filling.





  reply	other threads:[~2016-03-27 21:20 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 22:09 bug#13949: 24.3.50; `fill-paragraph' should not always put the buffer as modified Dani Moncayo
2013-03-14  3:43 ` Eli Zaretskii
2013-03-14  7:57   ` Dani Moncayo
2013-03-14 10:27     ` Andreas Röhler
2013-03-14 17:50       ` Eli Zaretskii
2013-03-14 13:38     ` Stefan Monnier
2013-03-14 17:53       ` Eli Zaretskii
2013-03-14 18:34         ` Andreas Röhler
2013-03-14 18:49           ` Eli Zaretskii
2013-03-14 19:01             ` Andreas Röhler
2013-03-14 19:19               ` Eli Zaretskii
2013-03-14 19:32                 ` Andreas Röhler
2013-03-15  4:02         ` Stefan Monnier
2013-03-15  7:27           ` Dani Moncayo
2013-03-14 17:46     ` Eli Zaretskii
2013-03-14 18:34       ` Dani Moncayo
2016-03-22 10:50 ` bug#13949: 24.4.1; " Jaakov
2016-03-22 11:39   ` Andreas Röhler
2016-03-22 16:15   ` Eli Zaretskii
2016-03-22 17:40     ` Jaakov
2016-03-22 17:56       ` Michael Heerdegen
2016-03-22 18:07         ` Drew Adams
2016-03-22 18:23           ` Michael Heerdegen
2016-03-22 18:31       ` Eli Zaretskii
2016-03-22 18:42         ` Jaakov
2016-03-26 23:46           ` John Wiegley
2016-03-27  3:31             ` Óscar Fuentes
2016-03-27  7:44               ` Andreas Röhler
2016-03-27 15:09                 ` Óscar Fuentes
2016-03-28  8:01                   ` Andreas Röhler
2016-03-27  8:42               ` Andreas Schwab
2016-03-27 14:59                 ` Óscar Fuentes
2016-03-27 15:15                   ` Drew Adams
2016-03-27 15:21                     ` Óscar Fuentes
2016-03-27 18:53                     ` Drew Adams
2016-03-27 15:13                 ` Drew Adams
2016-03-27 14:56               ` Eli Zaretskii
2016-03-27 15:28                 ` Óscar Fuentes
2016-03-27 15:42                   ` Dmitry Gutov
2016-03-27 15:52                     ` Óscar Fuentes
2016-03-27 15:57                       ` Lars Magne Ingebrigtsen
2016-03-27 16:21                         ` Óscar Fuentes
2016-03-27 16:33                           ` Lars Magne Ingebrigtsen
2016-03-27 16:46                             ` Óscar Fuentes
2016-03-27 16:58                               ` Lars Magne Ingebrigtsen
2016-03-27 18:22                                 ` Drew Adams
2016-03-27 15:29                 ` Óscar Fuentes
2016-03-27 15:58                   ` Eli Zaretskii
2016-03-27 16:05                     ` Óscar Fuentes
2016-03-27 16:12                       ` Eli Zaretskii
2016-03-27 16:37                         ` Óscar Fuentes
2016-03-27 16:50                           ` Eli Zaretskii
2016-03-27 17:30                             ` Óscar Fuentes
2016-03-27 17:51                               ` Eli Zaretskii
2016-03-27 16:38                         ` Óscar Fuentes
2016-03-27 17:00                           ` Lars Magne Ingebrigtsen
2016-03-27 16:14                       ` Lars Magne Ingebrigtsen
2016-03-27 15:46                 ` Lars Magne Ingebrigtsen
2016-03-27 16:04                   ` Eli Zaretskii
2016-03-27 16:11                     ` Lars Magne Ingebrigtsen
2016-03-27 16:18                       ` Eli Zaretskii
2016-03-27 16:28                         ` Lars Magne Ingebrigtsen
2016-03-28 10:39                           ` Lars Magne Ingebrigtsen
2016-03-28 11:27                             ` Lars Magne Ingebrigtsen
2016-03-28 11:32                               ` Lars Magne Ingebrigtsen
2016-03-28 11:39                                 ` Lars Magne Ingebrigtsen
2016-03-28 13:46                               ` Lars Magne Ingebrigtsen
2016-03-28 15:29                               ` Eli Zaretskii
2016-03-28 15:39                                 ` Lars Magne Ingebrigtsen
2016-03-28 15:15                             ` Eli Zaretskii
2016-03-28 15:39                               ` Lars Magne Ingebrigtsen
2016-03-28 15:52                                 ` Óscar Fuentes
2016-03-28 16:29                                   ` Lars Magne Ingebrigtsen
2016-03-28 17:04                                     ` Eli Zaretskii
2016-03-28 17:07                                       ` Lars Magne Ingebrigtsen
2016-03-28 17:37                                         ` Eli Zaretskii
2016-03-28 17:45                                           ` Lars Magne Ingebrigtsen
2016-03-28 18:17                                             ` Eli Zaretskii
2016-03-28  8:09                 ` Andreas Röhler
2016-03-27 15:28               ` Dmitry Gutov
2016-03-27 15:35                 ` Óscar Fuentes
2016-03-27 15:46                   ` Dmitry Gutov
2016-03-27 15:53                     ` Lars Magne Ingebrigtsen
2016-03-27 20:24                       ` Dmitry Gutov
2016-03-27 21:05                         ` Óscar Fuentes
2016-03-27 21:20                           ` Dmitry Gutov [this message]
2016-03-27 22:03                             ` Óscar Fuentes
2016-03-27 15:35                 ` Lars Magne Ingebrigtsen
2016-03-27 15:42                   ` Dmitry Gutov
2016-03-27 15:50                     ` Lars Magne Ingebrigtsen
2016-03-27 20:27                       ` Dmitry Gutov
2016-03-27 21:36                         ` Jaakov
2016-03-27 16:08                   ` Jaakov
2016-03-22 17:52     ` Jaakov
2016-03-22 18:40 ` bug#13949: (no subject) Jaakov
2016-03-22 18:56   ` Eli Zaretskii
2016-03-22 19:07     ` Jaakov
2016-03-22 19:10       ` Eli Zaretskii
2016-03-22 19:53         ` Jaakov
2016-03-22 20:07           ` Eli Zaretskii
2016-03-22 21:58             ` Jaakov
2016-03-22 22:38               ` Glenn Morris
2016-03-23 15:57                 ` Eli Zaretskii
2016-03-23 17:45                   ` Jaakov
2016-03-26 23:33                 ` John Wiegley
2016-03-23 15:57               ` Eli Zaretskii
2016-03-22 23:44 ` bug#13949: `fill-paragraph' should not always put the buffer as modified Petros Travioli
2016-03-28  4:55 ` bug#13949: fill-paragraph is buggy, but using MD5 is even more buggy Petros Travioli
2016-03-28 10:32   ` Andreas Schwab
2016-03-28 13:29     ` bug#13949: Aw: " Petros Travioli
2016-03-28 14:31       ` Andreas Schwab
2016-03-28 17:05       ` Eli Zaretskii
2016-03-28 15:16 ` Petros Travioli
2016-03-28 17:05   ` Lars Magne Ingebrigtsen
2016-03-28 17:06   ` Eli Zaretskii
2016-03-28 19:03     ` Petros Travioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=343192e9-ea13-21fa-45be-b2d1737bedb7@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=13949@debbugs.gnu.org \
    --cc=jwiegley@gmail.com \
    --cc=larsi@gnus.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).