git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/86] replace prefixcmp() with has_prefix()
@ 2013-11-09  7:05 Christian Couder
  2013-11-09  7:05 ` [PATCH 01/86] strbuf: add has_prefix() to be used instead of prefixcmp() Christian Couder
                   ` (87 more replies)
  0 siblings, 88 replies; 100+ messages in thread
From: Christian Couder @ 2013-11-09  7:05 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Avery Pennarun, Johannes Schindelin, Jonathan Nieder,
	Jeff King, Max Horn

Here is a big patch series to replace prefixcmp() with a new
has_prefix() function.

So the first patch of this series introduces has_prefix()
and the last patch removes prefixcmp().

Except in a few cases, I used a script that does basically
the following to generate the commits in between:

===
#!/bin/bash

perl -pi -e 's/!prefixcmp\(/has_prefix\(/g' "$1"
perl -pi -e 's/prefixcmp\(/!has_prefix\(/g' "$1"

git commit -m "$1: replace prefixcmd() with has_prefix()" "$1"
===

The few special cases are the following ones:

        - remote*: replace prefixcmd() with has_prefix()
        - transport*: replace prefixcmd() with has_prefix()
        - environment: replace prefixcmd() with has_prefix()

In first 2 cases above, I processed a few files at the same
time instead of just one.

In the case of "environment", I removed " != 0" after
"!has_prefix(...)" as it is not necessary and makes it
more difficult to understand the logic.

Of course it's possible to squash many of the commits
together if it is prefered.

Christian Couder (86):
  strbuf: add has_prefix() to be used instead of prefixcmp()
  diff: replace prefixcmd() with has_prefix()
  fast-import: replace prefixcmd() with has_prefix()
  remote*: replace prefixcmd() with has_prefix()
  daemon: replace prefixcmd() with has_prefix()
  pretty: replace prefixcmd() with has_prefix()
  revision: replace prefixcmd() with has_prefix()
  transport*: replace prefixcmd() with has_prefix()
  config: replace prefixcmd() with has_prefix()
  sha1_name: replace prefixcmd() with has_prefix()
  wt-status: replace prefixcmd() with has_prefix()
  upload-pack: replace prefixcmd() with has_prefix()
  test-line-buffer: replace prefixcmd() with has_prefix()
  parse-options: replace prefixcmd() with has_prefix()
  fetch-pack: replace prefixcmd() with has_prefix()
  git: replace prefixcmd() with has_prefix()
  tag: replace prefixcmd() with has_prefix()
  sequencer: replace prefixcmd() with has_prefix()
  commit: replace prefixcmd() with has_prefix()
  http: replace prefixcmd() with has_prefix()
  imap-send: replace prefixcmd() with has_prefix()
  help: replace prefixcmd() with has_prefix()
  log-tree: replace prefixcmd() with has_prefix()
  merge-recursive: replace prefixcmd() with has_prefix()
  notes: replace prefixcmd() with has_prefix()
  refs: replace prefixcmd() with has_prefix()
  setup: replace prefixcmd() with has_prefix()
  bisect: replace prefixcmd() with has_prefix()
  branch: replace prefixcmd() with has_prefix()
  http-push: replace prefixcmd() with has_prefix()
  send-pack: replace prefixcmd() with has_prefix()
  http-backend: replace prefixcmd() with has_prefix()
  notes-utils: replace prefixcmd() with has_prefix()
  pkt-line: replace prefixcmd() with has_prefix()
  alias: replace prefixcmd() with has_prefix()
  attr: replace prefixcmd() with has_prefix()
  connect: replace prefixcmd() with has_prefix()
  pager: replace prefixcmd() with has_prefix()
  convert: replace prefixcmd() with has_prefix()
  environment: replace prefixcmd() with has_prefix()
  shell: replace prefixcmd() with has_prefix()
  pathspec: replace prefixcmd() with has_prefix()
  submodule: replace prefixcmd() with has_prefix()
  test-string-list: replace prefixcmd() with has_prefix()
  builtin/apply: replace prefixcmd() with has_prefix()
  builtin/archive: replace prefixcmd() with has_prefix()
  builtin/branch: replace prefixcmd() with has_prefix()
  builtin/checkout: replace prefixcmd() with has_prefix()
  builtin/clean: replace prefixcmd() with has_prefix()
  builtin/clone: replace prefixcmd() with has_prefix()
  builtin/column: replace prefixcmd() with has_prefix()
  builtin/commit: replace prefixcmd() with has_prefix()
  builtin/describe: replace prefixcmd() with has_prefix()
  builtin/fast-export: replace prefixcmd() with has_prefix()
  builtin/fetch-pack: replace prefixcmd() with has_prefix()
  builtin/fetch: replace prefixcmd() with has_prefix()
  builtin/fmt-merge-msg: replace prefixcmd() with has_prefix()
  builtin/for-each-ref: replace prefixcmd() with has_prefix()
  builtin/fsck: replace prefixcmd() with has_prefix()
  builtin/help: replace prefixcmd() with has_prefix()
  builtin/index-pack: replace prefixcmd() with has_prefix()
  builtin/init-db: replace prefixcmd() with has_prefix()
  builtin/log: replace prefixcmd() with has_prefix()
  builtin/ls-remote: replace prefixcmd() with has_prefix()
  builtin/mailinfo: replace prefixcmd() with has_prefix()
  builtin/merge-recursive: replace prefixcmd() with has_prefix()
  builtin/merge: replace prefixcmd() with has_prefix()
  builtin/name-rev: replace prefixcmd() with has_prefix()
  builtin/notes: replace prefixcmd() with has_prefix()
  builtin/pack-objects: replace prefixcmd() with has_prefix()
  builtin/prune: replace prefixcmd() with has_prefix()
  builtin/receive-pack: replace prefixcmd() with has_prefix()
  builtin/reflog: replace prefixcmd() with has_prefix()
  builtin/remote: replace prefixcmd() with has_prefix()
  builtin/rev-parse: replace prefixcmd() with has_prefix()
  builtin/send-pack: replace prefixcmd() with has_prefix()
  builtin/shortlog: replace prefixcmd() with has_prefix()
  builtin/show-branch: replace prefixcmd() with has_prefix()
  builtin/show-ref: replace prefixcmd() with has_prefix()
  builtin/symbolic-ref: replace prefixcmd() with has_prefix()
  builtin/tag: replace prefixcmd() with has_prefix()
  builtin/tar-tree: replace prefixcmd() with has_prefix()
  builtin/unpack-objects: replace prefixcmd() with has_prefix()
  builtin/update-ref: replace prefixcmd() with has_prefix()
  builtin/upload-archive: replace prefixcmd() with has_prefix()
  strbuf: remove prefixcmp() as it has been replaced with has_prefix()

 alias.c                   |  2 +-
 attr.c                    |  2 +-
 bisect.c                  |  4 +--
 branch.c                  |  4 +--
 builtin/apply.c           | 12 +++----
 builtin/archive.c         |  4 +--
 builtin/branch.c          |  6 ++--
 builtin/checkout.c        |  8 ++---
 builtin/clean.c           |  4 +--
 builtin/clone.c           |  6 ++--
 builtin/column.c          |  2 +-
 builtin/commit.c          | 10 +++---
 builtin/describe.c        |  2 +-
 builtin/fast-export.c     |  2 +-
 builtin/fetch-pack.c      |  6 ++--
 builtin/fetch.c           | 16 +++++-----
 builtin/fmt-merge-msg.c   | 10 +++---
 builtin/for-each-ref.c    | 14 ++++-----
 builtin/fsck.c            |  6 ++--
 builtin/help.c            |  8 ++---
 builtin/index-pack.c      |  8 ++---
 builtin/init-db.c         |  2 +-
 builtin/log.c             |  8 ++---
 builtin/ls-remote.c       |  4 +--
 builtin/mailinfo.c        | 16 +++++-----
 builtin/merge-recursive.c |  2 +-
 builtin/merge.c           | 12 +++----
 builtin/name-rev.c        |  6 ++--
 builtin/notes.c           |  2 +-
 builtin/pack-objects.c    |  2 +-
 builtin/prune.c           |  4 +--
 builtin/receive-pack.c    |  6 ++--
 builtin/reflog.c          |  4 +--
 builtin/remote.c          |  8 ++---
 builtin/rev-parse.c       | 24 +++++++-------
 builtin/send-pack.c       |  8 ++---
 builtin/shortlog.c        |  6 ++--
 builtin/show-branch.c     | 20 ++++++------
 builtin/show-ref.c        |  6 ++--
 builtin/symbolic-ref.c    |  2 +-
 builtin/tag.c             |  2 +-
 builtin/tar-tree.c        |  2 +-
 builtin/unpack-objects.c  |  2 +-
 builtin/update-ref.c      | 10 +++---
 builtin/upload-archive.c  |  2 +-
 commit.c                  |  6 ++--
 config.c                  | 16 +++++-----
 connect.c                 |  2 +-
 convert.c                 |  2 +-
 daemon.c                  | 40 ++++++++++++------------
 diff.c                    | 56 ++++++++++++++++-----------------
 environment.c             |  2 +-
 fast-import.c             | 80 +++++++++++++++++++++++------------------------
 fetch-pack.c              | 12 +++----
 git-compat-util.h         |  2 +-
 git.c                     | 12 +++----
 help.c                    |  8 ++---
 http-backend.c            |  4 +--
 http-push.c               |  4 +--
 http.c                    |  8 ++---
 imap-send.c               | 10 +++---
 log-tree.c                |  8 ++---
 merge-recursive.c         |  6 ++--
 notes-utils.c             |  4 +--
 notes.c                   |  8 ++---
 pager.c                   |  2 +-
 parse-options.c           | 12 +++----
 pathspec.c                |  2 +-
 pkt-line.c                |  4 +--
 pretty.c                  | 36 ++++++++++-----------
 refs.c                    | 30 +++++++++---------
 remote-curl.c             | 14 ++++-----
 remote-testsvn.c          | 10 +++---
 remote.c                  | 46 +++++++++++++--------------
 revision.c                | 38 +++++++++++-----------
 send-pack.c               |  4 +--
 sequencer.c               |  8 ++---
 setup.c                   |  4 +--
 sha1_name.c               | 16 +++++-----
 shell.c                   |  2 +-
 strbuf.c                  |  6 ++--
 submodule.c               |  2 +-
 tag.c                     | 10 +++---
 test-line-buffer.c        |  6 ++--
 test-string-list.c        |  2 +-
 transport-helper.c        | 16 +++++-----
 transport.c               | 28 ++++++++---------
 upload-pack.c             | 10 +++---
 wt-status.c               | 16 +++++-----
 89 files changed, 455 insertions(+), 455 deletions(-)

-- 
1.8.4.1.566.geca833c

^ permalink raw reply	[flat|nested] 100+ messages in thread

end of thread, other threads:[~2013-11-19 21:42 UTC | newest]

Thread overview: 100+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-09  7:05 [PATCH 00/86] replace prefixcmp() with has_prefix() Christian Couder
2013-11-09  7:05 ` [PATCH 01/86] strbuf: add has_prefix() to be used instead of prefixcmp() Christian Couder
2013-11-09  7:05 ` [PATCH 02/86] diff: replace prefixcmd() with has_prefix() Christian Couder
2013-11-09  7:05 ` [PATCH 03/86] fast-import: " Christian Couder
2013-11-09  7:05 ` [PATCH 04/86] remote*: " Christian Couder
2013-11-09  7:05 ` [PATCH 05/86] daemon: " Christian Couder
2013-11-09  7:05 ` [PATCH 06/86] pretty: " Christian Couder
2013-11-09  7:06 ` [PATCH 07/86] revision: " Christian Couder
2013-11-09  7:06 ` [PATCH 08/86] transport*: " Christian Couder
2013-11-09  7:06 ` [PATCH 09/86] config: " Christian Couder
2013-11-09  7:06 ` [PATCH 10/86] sha1_name: " Christian Couder
2013-11-09  7:06 ` [PATCH 11/86] wt-status: " Christian Couder
2013-11-09  7:06 ` [PATCH 12/86] upload-pack: " Christian Couder
2013-11-09  7:06 ` [PATCH 13/86] test-line-buffer: " Christian Couder
2013-11-09  7:06 ` [PATCH 14/86] parse-options: " Christian Couder
2013-11-09  7:06 ` [PATCH 15/86] fetch-pack: " Christian Couder
2013-11-09  7:06 ` [PATCH 16/86] git: " Christian Couder
2013-11-09  7:06 ` [PATCH 17/86] tag: " Christian Couder
2013-11-09  7:06 ` [PATCH 18/86] sequencer: " Christian Couder
2013-11-09  7:06 ` [PATCH 19/86] commit: " Christian Couder
2013-11-09  7:06 ` [PATCH 20/86] http: " Christian Couder
2013-11-09  7:06 ` [PATCH 21/86] imap-send: " Christian Couder
2013-11-09  7:06 ` [PATCH 22/86] help: " Christian Couder
2013-11-09  7:06 ` [PATCH 23/86] log-tree: " Christian Couder
2013-11-09  7:06 ` [PATCH 24/86] merge-recursive: " Christian Couder
2013-11-09  7:06 ` [PATCH 25/86] notes: " Christian Couder
2013-11-09  7:06 ` [PATCH 26/86] refs: " Christian Couder
2013-11-09  7:06 ` [PATCH 27/86] setup: " Christian Couder
2013-11-09  7:06 ` [PATCH 28/86] bisect: " Christian Couder
2013-11-09  7:06 ` [PATCH 29/86] branch: " Christian Couder
2013-11-09  7:06 ` [PATCH 30/86] http-push: " Christian Couder
2013-11-09  7:06 ` [PATCH 31/86] send-pack: " Christian Couder
2013-11-09  7:06 ` [PATCH 32/86] http-backend: " Christian Couder
2013-11-09  7:06 ` [PATCH 33/86] notes-utils: " Christian Couder
2013-11-09  7:06 ` [PATCH 34/86] pkt-line: " Christian Couder
2013-11-09  7:06 ` [PATCH 35/86] alias: " Christian Couder
2013-11-09  7:06 ` [PATCH 36/86] attr: " Christian Couder
2013-11-09  7:06 ` [PATCH 37/86] connect: " Christian Couder
2013-11-09  7:06 ` [PATCH 38/86] pager: " Christian Couder
2013-11-09  7:06 ` [PATCH 39/86] convert: " Christian Couder
2013-11-09  7:06 ` [PATCH 40/86] environment: " Christian Couder
2013-11-09  7:06 ` [PATCH 41/86] shell: " Christian Couder
2013-11-09  7:06 ` [PATCH 42/86] pathspec: " Christian Couder
2013-11-09  7:06 ` [PATCH 43/86] submodule: " Christian Couder
2013-11-09  7:06 ` [PATCH 44/86] test-string-list: " Christian Couder
2013-11-09  7:06 ` [PATCH 45/86] builtin/apply: " Christian Couder
2013-11-09  7:06 ` [PATCH 46/86] builtin/archive: " Christian Couder
2013-11-09  7:06 ` [PATCH 47/86] builtin/branch: " Christian Couder
2013-11-09  7:06 ` [PATCH 48/86] builtin/checkout: " Christian Couder
2013-11-09  7:06 ` [PATCH 49/86] builtin/clean: " Christian Couder
2013-11-09  7:06 ` [PATCH 50/86] builtin/clone: " Christian Couder
2013-11-09  7:06 ` [PATCH 51/86] builtin/column: " Christian Couder
2013-11-09  7:06 ` [PATCH 52/86] builtin/commit: " Christian Couder
2013-11-09  7:06 ` [PATCH 53/86] builtin/describe: " Christian Couder
2013-11-09  7:06 ` [PATCH 54/86] builtin/fast-export: " Christian Couder
2013-11-09  7:06 ` [PATCH 55/86] builtin/fetch-pack: " Christian Couder
2013-11-09  7:06 ` [PATCH 56/86] builtin/fetch: " Christian Couder
2013-11-09  7:06 ` [PATCH 57/86] builtin/fmt-merge-msg: " Christian Couder
2013-11-09  7:06 ` [PATCH 58/86] builtin/for-each-ref: " Christian Couder
2013-11-09  7:06 ` [PATCH 59/86] builtin/fsck: " Christian Couder
2013-11-09  7:06 ` [PATCH 60/86] builtin/help: " Christian Couder
2013-11-09  7:06 ` [PATCH 61/86] builtin/index-pack: " Christian Couder
2013-11-09  7:06 ` [PATCH 62/86] builtin/init-db: " Christian Couder
2013-11-09  7:06 ` [PATCH 63/86] builtin/log: " Christian Couder
2013-11-09  7:06 ` [PATCH 64/86] builtin/ls-remote: " Christian Couder
2013-11-09  7:06 ` [PATCH 65/86] builtin/mailinfo: " Christian Couder
2013-11-09  7:06 ` [PATCH 66/86] builtin/merge-recursive: " Christian Couder
2013-11-09  7:07 ` [PATCH 67/86] builtin/merge: " Christian Couder
2013-11-09  7:07 ` [PATCH 68/86] builtin/name-rev: " Christian Couder
2013-11-09  7:07 ` [PATCH 69/86] builtin/notes: " Christian Couder
2013-11-09  7:07 ` [PATCH 70/86] builtin/pack-objects: " Christian Couder
2013-11-09  7:07 ` [PATCH 71/86] builtin/prune: " Christian Couder
2013-11-09  7:07 ` [PATCH 72/86] builtin/receive-pack: " Christian Couder
2013-11-09  7:07 ` [PATCH 73/86] builtin/reflog: " Christian Couder
2013-11-09  7:07 ` [PATCH 74/86] builtin/remote: " Christian Couder
2013-11-09  7:07 ` [PATCH 75/86] builtin/rev-parse: " Christian Couder
2013-11-09  7:07 ` [PATCH 76/86] builtin/send-pack: " Christian Couder
2013-11-09  7:07 ` [PATCH 77/86] builtin/shortlog: " Christian Couder
2013-11-09  7:07 ` [PATCH 78/86] builtin/show-branch: " Christian Couder
2013-11-09  7:07 ` [PATCH 79/86] builtin/show-ref: " Christian Couder
2013-11-09  7:07 ` [PATCH 80/86] builtin/symbolic-ref: " Christian Couder
2013-11-09  7:07 ` [PATCH 81/86] builtin/tag: " Christian Couder
2013-11-09  7:07 ` [PATCH 82/86] builtin/tar-tree: " Christian Couder
2013-11-09  7:07 ` [PATCH 83/86] builtin/unpack-objects: " Christian Couder
2013-11-09  7:07 ` [PATCH 84/86] builtin/update-ref: " Christian Couder
2013-11-09  7:07 ` [PATCH 85/86] builtin/upload-archive: " Christian Couder
2013-11-09  7:07 ` [PATCH 86/86] strbuf: remove prefixcmp() as it has been replaced " Christian Couder
2013-11-09 14:24 ` [PATCH 00/86] replace prefixcmp() " Thomas Rast
2013-11-12  6:16   ` Christian Couder
2013-11-11 16:09 ` Andreas Ericsson
2013-11-12  8:32   ` Jeff King
2013-11-12 16:53     ` Junio C Hamano
2013-11-12 20:14       ` Jeff King
2013-11-12 20:43       ` Christian Couder
2013-11-12 21:26         ` Junio C Hamano
2013-11-13  6:47           ` Christian Couder
2013-11-13  7:17             ` Jeff King
2013-11-17  8:52               ` Christian Couder
2013-11-18 10:42                 ` Christian Couder
2013-11-19 21:42                   ` Junio C Hamano

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 NNTP newsgroup(s).