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

Re: [PATCH] Add --src/dst-prefix to git-formt-patch in git-rebase.sh

From
Oods15@ods15.dyndns.org <ods15@ods15.dyndns.org>
Date
Sep 9, 2010, 18:49 UTC
Message-ID
<20100909184920.GG4610@crate15.ODS15-HOME>
In-Reply-To
<7vbp86n4t4.fsf@alter.siamese.dyndns.org>
On Thu, Sep 09, 2010 at 11:35:19AM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> Oded Shimon <ods15@ods15.dyndns.org> writes:
> 
> > For the case of "diff.noprefix" in git-config, git-format-patch should
> > still output diff with standard prefixes for git-am
> >
> > Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org>
> 
> Hmm.
Anything wrong?
Show 15 quoted lines
> > diff --git a/git-rebase.sh b/git-rebase.sh
> > index 7508463..e83a0cf 100755
> > --- a/git-rebase.sh
> > +++ b/git-rebase.sh
> > @@ -565,7 +565,7 @@ fi
> >  
> >  if test -z "$do_merge"
> >  then
> > -	git format-patch -k --stdout --full-index --ignore-if-in-upstream \
> > +	git format-patch -k --stdout --full-index --ignore-if-in-upstream --src-prefix=a/ --dst-prefix=b/ \
> >  		--no-renames $root_flag "$revisions" |
> >  	git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
> 
> As the format-patch invocation is already multi-line, you probably would
> want to use a continuation line with "\" to keep the line length shorter.
Will do.
> We need to protect ourselves from crazy people, so regrettably something
> like this patch is unavoidable, albeit unsightly.

I am one of those crazy people (hence noticing the bug). I constantly copy paste the filenames from diffs in order to write them in command line, with mouse double-click which grabs the entire path/filename...

- ods15
Previous: Junio C HamanoNext: Oded Shimon
Message 10 of 11 in “Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of "diff.noprefix" in git-config”
  1. Add explicit --src/dst-prefix to git-formt-patch in git-rebase.sh for the case of "diff.noprefix" in git-configOded Shimon, Sep 8, 2010
  2. ods15@ods15.dyndns.orgSep 8, 2010
  3. Jan KrügerSep 8, 2010
  4. Add --src/dst-prefix to git-formt-patch in git-rebase.shOded Shimon, Sep 9, 2010
  5. format-patch: do not use diff UI configThomas Rast, Sep 9, 2010
  6. Sverre RabbelierSep 9, 2010
  7. Jeff KingSep 9, 2010
  8. Junio C HamanoSep 10, 2010
  9. Junio C HamanoSep 9, 2010
  10. ods15@ods15.dyndns.orgSep 9, 2010
  11. Add --src/dst-prefix to git-formt-patch in git-rebase.shOded Shimon, Sep 9, 2010

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.