Commit graph

6 commits

Author SHA1 Message Date
Nybkox
a5bee81d7a
chore: replace all dracula occurrences with kanagawa 2024-05-08 22:42:27 +02:00
Nuno Sá
eedd33771f git: add remote info support
With this new option, we get information about which remote branch we're
tracking. On top of this, we'll get information about ahead/behind
commits when we diverged from remote. The output format will be in the
form:

'local...remote +ahead -behind',

where ahead and behind are the number of commits ahead and behind.

This functionality is controlled by a new option called
'@dracula-git-show-remote-status'.

Note that for this to be properly displayed, we need to increase the
size of the right status bar when the git plugin is enabled.

In order to be easier to introduce the change, getMessage() was also a
bit changed in order to be easier to append the remote info.

Signed-off-by: Nuno Sá <noname.nuno@gmail.com>
2022-10-26 11:04:30 +02:00
Nuno Sá
e9f46f76ca scripts: git: add '--no-optional-locks' option
As stated in 'git status --help':

"By default, git status will automatically refresh the index, updating
the cached stat information from the working tree and writing out the
result. Writing out the updated index is an optimization that isn’t
strictly necessary (status computes the values for itself, but writing
them out is just to save subsequent programs from repeating our
computation). When status is run in the background, the lock held during
the write may conflict with other simultaneous processes, causing them to
fail. Scripts running status in the background should consider using git
--no-optional-locks status (see git(1) for details)."

This was actually happen during rebasing whith the following error:

"error: Unable to create '/home/nsa/work/linux/.git/index.lock': File
exists.

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue."

This change fixes the above...

Signed-off-by: Nuno Sá <noname.nuno@gmail.com>
2022-09-06 14:36:47 +02:00
Nuno Sá
135637745d scripts: git: add option for untracked files
By default 'git status' will look for untracked files and the script will
always detect that the local tree has changes if untracked files are
present. That is not always optimal since sometimes we might have, for
example, some custom build scripts (for some project) that is always
present and we don't want the status bar to always indicate changes.

Hence, add an option to disable this behavior by adding the '-uno' flag
to 'git status'. The default behavior is still maintained.

Signed-off-by: Nuno Sá <noname.nuno@gmail.com>
2022-09-05 16:07:43 +02:00
joeperri95
e0203af1ed Update to new plugin scheme 2021-07-26 22:57:16 -04:00
Joe Perri
6cac0951d4 Add git functionality 2021-06-05 12:21:05 -04:00