Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCHv2 2/2] commit/status: show the index-worktree diff with -v -v

From: Michael J Gruber <hidden>
Date: 2016-06-15 23:03:58

Junio C Hamano venit, vidit, dixit 03.03.2015 22:26:
Michael J Gruber [off-list ref] writes:
quoted
+diff --git INDEX=staged-for-commit/dir1/modified WORKTREE=not-staged-for-commit/dir1/modified
+index e69de29..d00491f 100644
+--- INDEX=staged-for-commit/dir1/modified
++++ WORKTREE=not-staged-for-commit/dir1/modified
This might be OK for a project like Git itself, but I suspect people
with long pathnames (like, eh, those in Java land) would not
appreciate it.

Wouldn't mnemonic prefix, which the users are already familiar with,
be the most suitable tool for this disambiguation?  After all that
was what it was invented for 8 years ago.
Well...:
or it may want to even be like this:

	diff --git a/A b/A
        ...
        diff --git to-be-committed/A left-out-of-the-commit/A
        ...
        diff --git a/B b/B
        ...

by using a custom, unusual and easy-to-notice prefixes.
Your idea was to use these verbous prefixes so that one recognizes the
different types of diffs, and so that we don't need to sort them by file.

I'm happy with c/,i/ and i/,w/ and without sorting. Maybe we would need
headings between the two diffs then?

HEAD/,INDEX/ resp. INDEX/,WORKTREE/ would be a shorter alternativ that
is inline with the short acronyms execept for c/, because COMMIT/
(withiut "base") would be misleading during commit -v, I'm afraid.

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