Re: git-gui: textconv not used on unstaged files

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git-gui: textconv not used on unstaged files

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:25

Peter Oberndorfer [off-list ref] writes:
Does anybody have a idea which git command would output the diff
of a untracked file against /dev/null?
The "--no-index" option is meant as a bolt-on to let you use various
features of "git diff" that is missing from other people's "diff" in
a context where git does not know anything about that file.  It
should be usable even outside a git repository.

    $ git diff --no-index /dev/null new-file.txt

I do not know offhand (and didn't bother to check) if textconv
applies, though.  It does need access to a git repository as it
reads from the $GIT_DIR/config to learn what to do.

Re: git-gui: textconv not used on unstaged files

From: Peter Oberndorfer <hidden>
Date: 2016-06-15 22:55:26

On 2012-11-26 21:54, Junio C Hamano wrote:
Peter Oberndorfer [off-list ref] writes:
quoted
Does anybody have a idea which git command would output the diff
of a untracked file against /dev/null?
The "--no-index" option is meant as a bolt-on to let you use various
features of "git diff" that is missing from other people's "diff" in
a context where git does not know anything about that file.  It
should be usable even outside a git repository.

    $ git diff --no-index /dev/null new-file.txt

I do not know offhand (and didn't bother to check) if textconv
applies, though.  It does need access to a git repository as it
reads from the $GIT_DIR/config to learn what to do.
Hi,

this seems to work when adding the --textconv option.
I will try to see if I can modify git gui to use this command
when clicking a unstaged file.

Thanks,
Greetings Peter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help