Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 0/3] vcs_info: handle nested repositories of different types
- X-seq: zsh-workers 44918
- From: Aleksandr Mezin <mezin.alexander@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 0/3] vcs_info: handle nested repositories of different types
- Date: Sun, 24 Nov 2019 04:14:40 +0600
- Cc: Aleksandr Mezin <mezin.alexander@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yEkaFjKR6G2RDcl8IfU5j/+m/OqtTBfxHTGUoKcyLCg=; b=YE2z978sxCeWhkJxtDUEaQmE07nzdhrlcnJ6eVBmwRf5A0Le9hTpc54CDQSDuyGkFz wdvgKO90v1ZWF838Lapf8qQM8CqzuaWktmwLDmMJkSjEY/X8fAhsymXK/+7FkcPDrbuS Fb8Dg6gdVXaEexqLN925fZ3O5Nn6OdPhTzymcyTL6wTrmng2k2e1CbfBV9dgP1kkX3l1 aZDLXr0URTyBAjDxfHUTqhdEM/HFxzxuvQ8EmqDOwTLUF83Ak8WR0EPaGofp7T5GVfcV XI7mzZKLGlFPuTCYg4zLM+37aZU+09notqA5UVySifDermaYbpCHnB6VtvWMITfuKmvh QXwQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I've noticed that vcs_info doesn't correctly handle the case when a repository
of one type is nested inside of a repository of another type.
Example:
- git repository in ~/git-repo
- hg repository in ~/git-repo/hg-repo (it's not a submodule)
- vcs_info called in ~/git-repo/hg-repo will output information about git-repo
To fix this, I've made following changes:
- Modified VCS_INFO_detect_{git,cvs} to set vcs_comm[basedir] (other backends
do it)
- Modified vcs_info to choose the repository with the longest vcs_comm[basedir]
(as an absolute path)
However, this logic may not work correctly for symlinked repositories, if
VCS_INFO_detect_* functions will continue to use :P modifier for the basedir.
Is there a reason why :P is used for basedir instead of :a?
Aleksandr Mezin (3):
vcs_info/git: set vcs_comm[basedir] in VCS_INFO_detect_git
vcs_info/cvs: set vcs_comm[basedir] in VCS_INFO_detect_cvs
vcs_info: choose the nearest repository
.../VCS_Info/Backends/VCS_INFO_detect_cvs | 11 ++++++++--
.../VCS_Info/Backends/VCS_INFO_detect_git | 1 +
.../VCS_Info/Backends/VCS_INFO_get_data_cvs | 6 +-----
.../VCS_Info/Backends/VCS_INFO_get_data_git | 2 +-
Functions/VCS_Info/vcs_info | 21 +++++++++++++------
5 files changed, 27 insertions(+), 14 deletions(-)
--
2.24.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author