Re: Version Control -> Compare with Older Revision... Question

2018-05-10 Thread Joel Kulesza
On Thu, May 10, 2018 at 8:36 AM, Pavel Sanda  wrote:

> Joel Kulesza wrote:
> > Is there a way to bring these consistent so a user can clearly see which
> > commits are going to be compared?  I understand the ease associated with
> > the HEAD~N approach; however, can that information be put into the
> Version
> > Control Log?  Alternatively, could a Version Control Log-like text box be
> > added to the diff dialog and populated with "git log -N" according to the
> > "N" selected by the user?  This latter approach is likely (a) easier and
> > (b) more descriptive.
>
> What sounds relatively easy is to add one-line text field next to
> "Revision back: N" counter which contains the ouput of:
> git show --quiet --abbrev-commit --pretty=oneline HEAD~N
> which would be triggered for any value entered in the counter.


Even better!  I'll file that as a request.  Thanks!

- Joel


Re: Version Control -> Compare with Older Revision... Question

2018-05-10 Thread Pavel Sanda
Joel Kulesza wrote:
> Is there a way to bring these consistent so a user can clearly see which
> commits are going to be compared?  I understand the ease associated with
> the HEAD~N approach; however, can that information be put into the Version
> Control Log?  Alternatively, could a Version Control Log-like text box be
> added to the diff dialog and populated with "git log -N" according to the
> "N" selected by the user?  This latter approach is likely (a) easier and
> (b) more descriptive.

What sounds relatively easy is to add one-line text field next to 
"Revision back: N" counter which contains the ouput of:
git show --quiet --abbrev-commit --pretty=oneline HEAD~N
which would be triggered for any value entered in the counter.

Pavel


Re: Version Control -> Compare with Older Revision... Question

2018-05-10 Thread Joel Kulesza
On Thu, May 10, 2018 at 5:35 AM, Pavel Sanda  wrote:

> Joel Kulesza wrote:
> > Colleagues:
> >
> > I have a LyX document in a larger git repository that I wish to compare
> > with a previous commit.  Other than "counting back" commits, is there a
> way
> > to see precisely which two commits the LyX documents correspond to that
> are
> > being compared?
>
> If you mean sha of the commit then no, you would need to check log
> for the exact strings. In fact LyX internally does not deal with them,
> it just goes by HEAD~N pointers when reaching back to N-th commit in
> history...


Indeed, I meant the sha1sum hash.  A thought:

There is perhaps an inconsistency here: the LyX-internal Version Control
Log gives the standard `git log` output which is based only on the hashes.
The LyX-internal Compare with Older Revision is based only on HEAD~N
pointers.

Is there a way to bring these consistent so a user can clearly see which
commits are going to be compared?  I understand the ease associated with
the HEAD~N approach; however, can that information be put into the Version
Control Log?  Alternatively, could a Version Control Log-like text box be
added to the diff dialog and populated with "git log -N" according to the
"N" selected by the user?  This latter approach is likely (a) easier and
(b) more descriptive.

If any of these approaches (or another) sounds reasonable, I'll submit an
enhancement request.

Thank you,
Joel


Re: Version Control -> Compare with Older Revision... Question

2018-05-10 Thread Pavel Sanda
Joel Kulesza wrote:
> Colleagues:
> 
> I have a LyX document in a larger git repository that I wish to compare
> with a previous commit.  Other than "counting back" commits, is there a way
> to see precisely which two commits the LyX documents correspond to that are
> being compared?

If you mean sha of the commit then no, you would need to check log
for the exact strings. In fact LyX internally does not deal with them,
it just goes by HEAD~N pointers when reaching back to N-th commit in
history...

Pavel