Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Jesus Reyes A. via lazarus


On 29-jul-23 8:42 a. m., Martin Frb via lazarus wrote:


On 29/07/2023 12:55, Juha Manninen via lazarus wrote:

An IDE plugin that runs "git blame" for an active editor source file
and shows a HashID for each line. The associated commit is shown in
another window when the HashID is clicked. All that using a local Git
repo history, no network access is needed.
That kind of IDE integration would make sense. I never understood the
traditional revision control plugins that allow commits from the IDE.
What is the benefit? I have anyways saved and tested all my changes
when I want to commit. I can as well start a proper commit tool from
outside the IDE. There is no true integration, the IDE plugin is only
started from a different place.

Well, log for the current file would be useful too, and easier.


yeah, file history is currently available in LazGitGit


But what I really fancy is an integrated "git diff" => where the
SourceEditor/SynEdit shows chages inline.
Could be different detail levels
- just line markers /like the current changed/save marker (yellow/green)
- diff show at bottom (like winmerge)
- maybe side by side split editor (though external tools to that well)
- inline markup, like MS-word capturing changes: red/strikethrough for
stuff deleted by current diff, green for stuff added.
This could work, as you type.
It would work without gif, against the saved file, or a backup.
With git, against HEAD or index (or both / 3 color)


By itself, it could be a great tool.

For the moment I could use a full source diff tool, like the one that comes
with TortoiseGit, winmerge, meld, etc. :)

Jesus Reyes A.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Jesus Reyes A. via lazarus

On 29-jul-23 4:55 a. m., Juha Manninen via lazarus wrote:


Same with logcache. I am in Git Lazarus source directory but it asks for a 
parameter.
[juha@juha-fp30 lazarus]$ ../lazgitgui/logcache
a file or directory of a git repository is needed
[juha@juha-fp30 lazarus]$


Indeed, logcache is supposed to work like LazGitGui, but it need only to locate 
the .git directory,
while LazGitGui could implement using the specified dir or file to limit 
working on that path and
not in the whole repository.

But logcache program is only a way to test the structure of the log cache, not 
really needed for LazGitGui


These are standalone applications.
An idea for future development :
An IDE plugin that runs "git blame" for an active editor source file and shows 
a HashID for each line.


Blaming is something I would like to add, but more the way it works in 
TortoiseGit and less
than 'git gui'/gitk where it is a mess (IMO) in the mean time, this 
functionality is somewhat
supplied by the File History feature found in the yet to document log window 
where you can view
the commit changes as a diff, or look how was the work tree at that particular 
moment, clicking
any file in those views will enable the [FH] button that shows the selected 
file history. In gitk
you have to invoke it from the command line and the same in TortoiseGit 
although it's done in
a through the file browser interface


I never understood the traditional revision control plugins that allow commits 
from the IDE. What is the benefit? I have anyways saved and tested all my 
changes when I want to commit. I can as well start a proper commit tool from 
outside the IDE. There is no true integration, the IDE plugin is only started 
from a different place.


I think it promotes a workflow where you commit often and short commits, but it 
is true that almost
always you have to someway find the window where you pick your changes and 
actually do it which is
not too different to invoke an external tool.


Juha


Jesus Reyes A.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Jesus Reyes A. via lazarus

On 29-jul-23 3:28 a. m., Juha Manninen via lazarus wrote:


I tested it. Quite nice!


I'm glad you liked.


One issue: lazgitgui requires a filename as a cmd line parameter but does not use it. You 
should be able to run it without parameters just like "git gui".
Juha


This can be worked out, if no file or dir is passed on it could use the 
current working directory. I will added to the list. Jesus Reyes A.
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Martin Frb via lazarus



On 29/07/2023 12:55, Juha Manninen via lazarus wrote:
An IDE plugin that runs "git blame" for an active editor source file 
and shows a HashID for each line. The associated commit is shown in 
another window when the HashID is clicked. All that using a local Git 
repo history, no network access is needed.


That kind of IDE integration would make sense. I never understood the 
traditional revision control plugins that allow commits from the IDE. 
What is the benefit? I have anyways saved and tested all my changes 
when I want to commit. I can as well start a proper commit tool from 
outside the IDE. There is no true integration, the IDE plugin is only 
started from a different place.




Well, log for the current file would be useful too, and easier.


But what I really fancy is an integrated "git diff" => where the 
SourceEditor/SynEdit shows chages inline.


Could be different detail levels

- just line markers /like the current changed/save marker (yellow/green)

- diff show at bottom (like winmerge)

- maybe side by side split editor (though external tools to that well)

- inline markup, like MS-word capturing changes: red/strikethrough for 
stuff deleted by current diff, green for stuff added.


This could work, as you type.


It would work without gif, against the saved file, or a backup.

With git, against HEAD or index (or both / 3 color)


--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Maxim Ganetsky via lazarus

29.07.2023 10:13, Jesus Reyes A. via lazarus пишет:

Hi all,

Probably by now everyone already has their favorite git tool, I had it 
too, but anyway looking for a way to have basic repository information 
and show it through some add-on or plugin in Lazarus (and that it will 
work everywhere) I started this tool.


I think, an interesting idea would be to make TortoiseGit-like plugin 
for Double Commander. IMHO such tool in combination with powerful file 
manager will be one of the best cross-patform GUIs for Git.


The more functions I added, the more I got away form the original goal 
(or closer I don't know).


Meanwhile I thought it could be useful for someone else and so if 
someone wants to try it, it is available in a gitlab repository at 
https://gitlab.com/jramx/lazgitgui


Git has so many great features and it is both tempting and challenging 
to continue adding them to this tool, anyway, this is what is 
available at the moment (what I think is the most basic 
functionality). I know I suck at writing documentation, but there is 
some in the docs directory to get you started.


Please try it and let me know how it works for you.


--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Juha Manninen via lazarus
Same with logcache. I am in Git Lazarus source directory but it asks for a
parameter.

[juha@juha-fp30 lazarus]$ ../lazgitgui/logcache
a file or directory of a git repository is needed
[juha@juha-fp30 lazarus]$

These are standalone applications.
An idea for future development :
An IDE plugin that runs "git blame" for an active editor source file and
shows a HashID for each line. The associated commit is shown in another
window when the HashID is clicked. All that using a local Git repo history,
no network access is needed.

That kind of IDE integration would make sense. I never understood the
traditional revision control plugins that allow commits from the IDE. What
is the benefit? I have anyways saved and tested all my changes when I want
to commit. I can as well start a proper commit tool from outside the IDE.
There is no true integration, the IDE plugin is only started from a
different place.

Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LazGitGui a git tool.

2023-07-29 Thread Juha Manninen via lazarus
I tested it. Quite nice!

One issue: lazgitgui requires a filename as a cmd line parameter but does
not use it. You should be able to run it without parameters just like "git
gui".

Juha
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LazGitGui a git tool.

2023-07-29 Thread Jesus Reyes A. via lazarus

Hi all,

Probably by now everyone already has their favorite git tool, I had it 
too, but anyway looking for a way to have basic repository information 
and show it through some add-on or plugin in Lazarus (and that it will 
work everywhere) I started this tool.


The more functions I added, the more I got away form the original goal 
(or closer I don't know).


Meanwhile I thought it could be useful for someone else and so if 
someone wants to try it, it is available in a gitlab repository at 
https://gitlab.com/jramx/lazgitgui


Git has so many great features and it is both tempting and challenging 
to continue adding them to this tool, anyway, this is what is available 
at the moment (what I think is the most basic functionality). I know I 
suck at writing documentation, but there is some in the docs directory 
to get you started.


Please try it and let me know how it works for you.

Regards.

Jesus Reyes A.

--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus