git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] Add a function skip_prefix_if_present()

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Feb 5, 2014, 06:25 UTC
Message-ID
<1391581517-8586-1-git-send-email-mhagger@alum.mit.edu>
These patches apply on top of gitster/nd/more-skip-prefix.

I noticed that Duy's new function skip_prefix_defval() was mostly being called with its first and third arguments the same. So introduce a function skip_prefix_if_present() that implements this pattern.

Michael Haggerty (3):
  Add and use a function skip_prefix_if_present()
  diff_scoreopt_parse(): use skip_prefix_if_present()
  rev_is_head(): use skip_prefix()
 builtin/checkout.c    |  4 ++--
 builtin/fast-export.c |  2 +-
 builtin/merge.c       |  2 +-
 builtin/show-branch.c | 15 ++++++++-------
 diff.c                |  6 +++---
 git-compat-util.h     |  5 +++++
 git.c                 |  2 +-
 notes.c               |  4 ++--
 refs.c                |  2 +-
 wt-status.c           |  4 ++--
 10 files changed, 26 insertions(+), 20 deletions(-)
-- 
1.8.5.3
Next: Michael Haggerty
Message 1 of 7 in “Add a function skip_prefix_if_present()”
  1. 0/3 Add a function skip_prefix_if_present()Michael Haggerty, Feb 5, 2014
  2. 1/3 Add and use a function skip_prefix_if_present()Michael Haggerty, Feb 5, 2014
  3. 2/3 diff_scoreopt_parse(): use skip_prefix_if_present()Michael Haggerty, Feb 5, 2014
  4. 3/3 rev_is_head(): use skip_prefix()Michael Haggerty, Feb 5, 2014
  5. Michael HaggertyFeb 5, 2014
  6. Jeff KingFeb 5, 2014
  7. Duy NguyenFeb 6, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.