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, 22:23 UTC
Message-ID
<7vodgo7jbn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<85d4x4d6oi.fsf@lola.goethe.zz>
David Kastrup <dak@gnu.org> writes:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> ...
>>  	--original)
>> +		case "$OPTARG" in */) ;; *) OPTARG="$OPTARG/" ;; esac
>>  		orig_namespace="$OPTARG"
>>  		;;
>>  	*)
>
> orig_namespace="${OPTARG%/}/"
>
> Sure, it does not win the "portable to Version 7" price, but our
> scripts don't do that, anyway.

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.

Previous: David KastrupNext: Junio C Hamano
Message 8 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.