Re: Call Me Gitless

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

Re: Call Me Gitless

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:11

Daniel Barkalow [off-list ref] writes:
quoted hunk
if you'd get:
--- (index)/foo/bar
+++ ./foo/bar
people would at least be clear on what information they were getting, even 
if they didn't know why they were getting that as opposed to a different 
combination.
[Removed somebody who decided not use git from CC.]

I know you mentioned this as an example of differenciating the output
between the modes, and not as a serious suggestion.  The above may apply
cleanly because "(index)" and "." are both one level deep, but they look
ugly and the filenames do not align.

It does look an interesting approach, though.

I often make a quick patch all inside the work tree, never committing, and
then send it out by including "git diff --stat -p" output in the mail as a
suggested patch.  If we did what you suggest, people could tell such a
patch and a format-patch output.  I actually do like the fact that we
consistently say "a/" vs "b/", but some people actually may prefer to see
the difference.

Re: Call Me Gitless

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:45:11

On Mon, 18 Aug 2008, Junio C Hamano wrote:
Daniel Barkalow [off-list ref] writes:
quoted
if you'd get:
--- (index)/foo/bar
+++ ./foo/bar
people would at least be clear on what information they were getting, even 
if they didn't know why they were getting that as opposed to a different 
combination.
[Removed somebody who decided not use git from CC.]

I know you mentioned this as an example of differenciating the output
between the modes, and not as a serious suggestion.  The above may apply
cleanly because "(index)" and "." are both one level deep, but they look
ugly and the filenames do not align.
I actually think it would be fine; the filenames don't align, but it 
doesn't matter much because we practically never have patches where they 
aren't the same anyway (unless there are also rename headers), so there's 
no need for it to be easy to compare them visually.
I often make a quick patch all inside the work tree, never committing, and
then send it out by including "git diff --stat -p" output in the mail as a
suggested patch.  If we did what you suggest, people could tell such a
patch and a format-patch output.  I actually do like the fact that we
consistently say "a/" vs "b/", but some people actually may prefer to see
the difference.
You could use --src-prefix and --dest-prefix to put it back to a/ and b/ 
(or whatever else you wanted to make it look like). The opposite isn't 
really true though; while I can use --src-prefix='(index)/' 
--dest-prefix='./', I'd need to figure out per-command-line what I'm going 
to be getting, which sort of defeats the purpose.

Actually, this weekend I was trying to cherry-pick the aggregated changes 
to certain files from one branch onto another, and was repeatedly confused 
by the fact that the only available diffs are backwards and there're no 
clues in the output. (That is, you can't get the difference between (---) 
the {index,working tree} and (+++) some commit, and when you've done "git 
diff messy", the resulting diff doesn't give any clues that you're 
deciding whether to add the - lines and remove the + lines.)

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help