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

Re: [PATCH] git-filter-branch: document --original option

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2007, 23:13 UTC
Message-ID
<7v3ay07h0h.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vodgo7jbn.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 6 quoted lines
> I agree we do not give the "portable to version 7" prize
> anymore.  But you made me realize another thing.
>
> I think it should make sure orig_namespace has one and only one
> trailing slash, because otherwise "--original refs/heads//"
> would lead you to the same disaster.
Perhaps,
	orig_namespace=$(expr "$OPTARG/" : '\(.*[^/]\)/*$')/

Well, I know people hate colon-expr, but we earlier ruled out (and we still do) ${parameter//pattern/string} as bashism beyond the portability line, and I do not see an alternative easier to read than this...

Previous: Junio C HamanoNext: David Kastrup
Message 9 of 12 in “git-filter-branch: more detailed USAGE”
  1. git-filter-branch: more detailed USAGEGiuseppe Bilotta, Aug 30, 2007
  2. Johannes SixtAug 30, 2007
  3. Giuseppe BilottaAug 30, 2007
  4. git-filter-branch: more detailed USAGEGiuseppe Bilotta, Aug 30, 2007
  5. git-filter-branch: document --original optionGiuseppe Bilotta, Aug 30, 2007
  6. Junio C HamanoAug 30, 2007
  7. David KastrupAug 30, 2007
  8. Junio C HamanoAug 30, 2007
  9. Junio C HamanoAug 30, 2007
  10. David KastrupAug 31, 2007
  11. David KastrupAug 31, 2007
  12. Johannes SchindelinAug 30, 2007

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.