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

Re: [PATCH] git-jump: ignore (custom) prefix in diff mode

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Sep 18, 2012, 09:00 UTC
Message-ID
<CAKPyHN2_RShv8Emr+OfZF_m1oP7Ann5tNuio4+yuSjfHXc043Q@mail.gmail.com>
In-Reply-To
<20120918025229.GB19986@pearl.mediadesign.nl>
On Tue, Sep 18, 2012 at 4:52 AM, Mischa POSLAWSKY <git@shiar.nl> wrote:
Show 38 quoted lines
> Junio C Hamano skribis 2012-9-16 22:22 (-0700):
>
>> Mischa POSLAWSKY <git@shiar.nl> writes:
>>
>> > Subject: [PATCH/RFC] format-patch: force default file prefixes in diff
>> >
>> > Override user configuration (eg. diff.noprefix) in patches intended for
>> > external consumption to match the default prefixes expected by git-am.
>> >
>> > Signed-off-by: Mischa POSLAWSKY <git@shiar.nl>
>> > ---
>>
>> Not all projects expect to see a/ & b/ prefix and these are
>> configurable for a reason.  Robbing the choice that has been
>> supported for quite a long time from them is an unacceptable
>> regression.
>
> My bad, I was assuming format-patch would mostly interact with git am.
>
>> Why did you think this may be a good idea in the first place?
>>
>> Perhaps you had configured your diff.noprefix in a wrong
>> configuration file?  This is primarily per-project choice, and your
>> clone of git.git should not have diff.noprefix set, neither your
>> $HOME/.gitconfig unless you always work on projects that want
>> diff.noprefix.
>
> Then I'm not using it as intended.  For me it's just a personal
> preference of how I'd like to review commits (diff/show) so I can easily
> copy-paste file names (less essential since my discovery of git jump,
> but still).  It's not something I'd like to be communicated with any
> upstream project (format-patch).
>
> So it seems I'm asking for a new feature: to be able to configure local
> and inter-project diff options differently.  In this case I'd be helped
> by either format.noprefix=0 or a to be bikeshedded localdiff.noprefix=1.
> I don't know about other options though.  Does anybody actually want
> mnemonicprefix to be sent out as well?
I once had the same idea and posted a patch for it:
http://article.gmane.org/gmane.comp.version-control.git/146215

The implementation differs though, the pure path without any mnemonicprefix is in its own line 'path <path>'. But my current patch also differs to this old one, in the current one, the path is at the end 'index' line. But I do not need this feature anymore.

Bert
Show 7 quoted lines
>
> Another solution could be a single option defining behaviour exceptions:
> format.diff = normal | textconv | noconfig
> Expanding on the existing --(no-)textconv difference in format-patch.
>
> --
> Mischa
Previous: Junio C HamanoNext: perryh@pluto.rain.com
Message 6 of 10 in “git-jump: ignore (custom) prefix in diff mode”
  1. git-jump: ignore (custom) prefix in diff modeMischa POSLAWSKY, Sep 17, 2012
  2. Mischa POSLAWSKYSep 17, 2012
  3. Junio C HamanoSep 17, 2012
  4. Mischa POSLAWSKYSep 18, 2012
  5. Junio C HamanoSep 18, 2012
  6. Bert WesargSep 18, 2012
  7. perryh@pluto.rain.comSep 17, 2012
  8. Junio C HamanoSep 17, 2012
  9. Jeff KingSep 17, 2012
  10. Junio C HamanoSep 17, 2012

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.