about summary refs log tree commit diff
path: root/Functions/VCS_Info
Commit message (Collapse)AuthorAgeFilesLines
* 49728: vcs_info hg mq: Don't include applied patches in the unapplied patchesDaniel Shahaf2022-02-201-0/+3
| | | | | | For instance, with 4 applied patches, 5 unapplied patches, and no guards involved, the patch-format style would indicate 9 (= 4+5) unapplied patches and 4 applied patches.
* 49727 (+ comment): vcs_info quilt: Pass the patches dir path to the ↵Daniel Shahaf2022-02-204-4/+15
| | | | | | gen-applied-string, gen-unapplied-string, and set-patch-format hooks I use that in my gen-applied-string hook.
* unposted: vcs_info hg mg (with get-unapplied set): Stop leaking a variable ↵Daniel Shahaf2022-02-201-1/+1
| | | | to global scope
* security/82: VCS_Info: Fix typo in hook_com[base-name_orig] assignmentMarc Cornellà2022-02-121-1/+1
| | | | | | Tweaked per discussion in security/90, security/91 (cherry picked from commit b34d33e3b3c5ae30e8315111f07634c1e7507531)
* unposted: vcs_info git: Teach the rebase-apply test case generator to also ↵Daniel Shahaf2022-01-292-1/+12
| | | | generate rebase-merge test cases
* unposted: vcs_info git: Add a missing guard against redefining a function.Daniel Shahaf2022-01-291-0/+1
|
* unposted: vcs_info git: Deconfuse $EDITORDaniel Shahaf2022-01-291-2/+2
| | | | Work around <https://github.com/chrisbra/vim-zsh/issues/39>.
* unposted: vcs_info: Add Vim modelinesDaniel Shahaf2022-01-293-0/+6
| | | | ... for consistency with all other vcs_info function files.
* 49723: vcs_info quilt: Use quilt-patch-dir and ${QUILT_PATCHES} even when ↵Daniel Shahaf2022-01-291-21/+24
| | | | | | | | | | | | get-unapplied hasn't been set This affects the post-quilt hook. Before this patch, if no patches have been applied and get-unapplied hasn't been set, the second argument to that hook would undergo null elision. The generation of patch subjects for the gen-applied-string, gen-unapplied-string, and set-patch-format hooks was unaffected since it was guarded by [[ -n $patches ]].
* 49722: vcs_info quilt: Refactor for readability. No functional change.Daniel Shahaf2022-01-291-6/+7
|
* unposted: vcs_info quilt: Remove a no-op variable assignmentDaniel Shahaf2022-01-271-1/+0
|
* 49709: vcs_info hg: Keep $HGPLAIN set for hooks if it had been set outside ↵Daniel Shahaf2022-01-251-1/+0
| | | | | | | vcs_info If someone does 'HGPLAIN=1 vcs_info', any vcs_info hooks should be called with HGPLAIN set. Declaring it 'local' broke that.
* users/26635 (tweaked): vcs_info hg: Compute the branch name correctly when ↵Daniel Shahaf2021-04-211-3/+3
| | | | | | | | get-revision is set and check-for-changes is not Tweak: Simplify an always-true condition. Review-by: Manuel Jacob
* 47561 (the git and cvs parts) (compare 44919 + 44920): vcs_info internals: ↵Aleksandr Mezin2021-03-294-13/+18
| | | | | | | cvs, git: Set ${vcs_comm[basedir]} like all other backends do. That doesn't affect anything, not even other vcs_info internals; it's just for consistency across backends.
* 47303: vcs_info hg: Fix changing the expansion of %g (hook_com[guards]) in ↵Daniel Shahaf2020-08-092-4/+10
| | | | | | | | | | | | | | | | | | the set-patch-format hook (regression from workers/40480). To reproduce, go to a hg repository with active mq guards and configure vcs_info as follows: zstyle '*' get-unapplied true zstyle ':vcs_info:*set-patch-format*' hooks f zstyle '*' patch-format '[%g : %G]' zstyle '*' nopatch-format '[%g : %G]' zstyle '*' formats '%m' +vi-f () { hook_com[guards]+=XXX } The regression was first released in 5.3.1-test-2, over three years ago.
* 46091: Add code to Mercurial VCS backend to show topic if there is any.Manuel Jacob2020-06-221-1/+10
| | | | | | | | "Topics" is an experimental concept in Mercurial that augments the current branching concept (called "named branches"). For more information, see the not always up-to-date Mercurial Wiki page https://www.mercurial-scm.org/wiki/TopicPlan.
* 45644: vcs_info git: Fix current patch's name in several cases.Daniel Shahaf2020-03-281-0/+15
|
* 45627: vcs_info git: Under git-am(1) conflicts, pass to the ↵Daniel Shahaf2020-03-271-3/+11
| | | | | | | | | | | | | | | | | | gen-applied-string hook information on already-applied patches. The hook already receives information about the current (topmost applied) patch and, if the get-unapplied style is set, about future (unapplied) patches. Tested in the Functions/VCS_Info/test-repo-git-rebase-apply scenario, after manually converting the rebase to a «git am». (Specifically, I ran: mkdir d git rebase --abort git format-patch rebase_from_this..HEAD -o d git checkout rebase_onto_this git am d/* .)
* 45625: vcs_info svn: Detect the "working copy format is too new" error.Daniel Shahaf2020-03-271-1/+9
|
* 45626: vcs_info: Deduplicate calling the set-branch-format hook.Daniel Shahaf2020-03-276-33/+31
|
* 45624: vcs_info: Set $rrn in all backends.Daniel Shahaf2020-03-273-0/+4
|
* 45541: internal: vcs_info git: Add a test case repository for rebase-apply ↵Daniel Shahaf2020-03-151-0/+49
| | | | situations
* 45539: vcs_info git: In non-interactive rebases, obtain applied patches' names.Daniel Shahaf2020-03-151-5/+17
|
* 45540: vcs_info git: In non-interactive rebases, compute patch names for ↵Daniel Shahaf2020-03-151-6/+25
| | | | unapplied patches.
* 45543: vcs_info quilt: Allow quiltcommand to be a function.Daniel Shahaf2020-03-151-2/+3
| | | | Before this commit, it could only be an external command.
* 45547: vcs_info git: In interactive rebases, process gen-unapplied-string ↵Daniel Shahaf2020-03-151-7/+16
| | | | | | | arguments like gen-applied-string arguments are processed. I consider this a bugfix, since it's unexpected for -applied and -unapplied to differ about this.
* 45546: vcs_info git: In interactive rebases, properly support the full form ↵Daniel Shahaf2020-03-151-2/+2
| | | | | | | | | | of the "exec" verb. The code before this commit happened to have done the right thing: "exec" lines were handled by the catchall forward compatibility case, which happened to have had virtually the same effect as the correct case. However, that was merely an accidental result. This patch makes the code do the right thing deliberately, rather than by accident.
* 45545: vcs_info git: In interactive rebases, ignore comment lines.Daniel Shahaf2020-03-151-0/+4
|
* github #48/0002: vcs_info git: properly detect bare repositoriesbrian m. carlson2020-02-171-0/+4
| | | | | | | | | | | We currently detect Git repositories by finding the top level of the working tree, and if we fail to detect it, assume that we're not in a repository. However, there's a case we don't consider: a bare repository. Let's detect if the user is in a bare repository by checking if gitdir is set, and if so, using that if there is no working tree. We now detect bare Git repositories with vcs_info, as expected.
* github #48/0001: vcs_info git: avoid warnings in bare repositoriesbrian m. carlson2020-02-171-1/+1
| | | | | | | | | | | | Git 2.25 introduced a change to how git rev-parse --show-toplevel behaves. Traditionally, it succeeded with no output if the user was in a bare repository. Now it dies, printing an error to standard error. Consequently, when the user is in a bare repository with a newer Git, vcs_info prints noisily to standard error. While this is functionally harmless, it is annoying for the shell to print messages from Git every time the prompt is printed, so let's silence the error message.
* 45114: vcs_info quilt: Improve support for svn-style patch headers.Daniel Shahaf2019-12-221-7/+13
| | | | | | | | | | Additional lines between the |-separated header line and the actual log message, as generated by 'svn log -v' and 'svn log -g', are now supported. This change affects you if you have quilt patches with 'svn log'-style information in their headers, regardless of whether you use quilt standalone, quilt over svn, or quilt over some other VCS.
* 44960: vcs_info cvs: Fix infinite loop when /CVS exists.Daniel Shahaf2019-12-031-3/+9
|
* 44961: vcs_info svn: Fix infinite loop when /.svn exists.Daniel Shahaf2019-12-031-5/+7
|
* 44962: vcs_info: Document internal function and variableDaniel Shahaf2019-12-032-0/+18
|
* 44958: vcs_info quilt: Avoid forksDaniel Shahaf2019-11-291-5/+5
|
* 44945: vcs_info git: Optimize detection by running fewer external commands.Daniel Shahaf2019-11-291-2/+1
|
* 44020: VCS_INFO_detect_p4: Fix infinite recursiondana2019-01-271-1/+0
|
* 43879: vcs_info git: Fix fatal error in VCS_INFO_git_getbranch in corner caseDaniel Shahaf2018-12-131-4/+6
| | | | | | | | | | | | | Before this commit, the following use-case: git checkout foo^ git show foo | git am would result in a fatal error, with vcs_info_msg_N_ not set: VCS_INFO_git_getbranch:18: no such file or directory: .git/rebase-apply/onto Now they are set correctly, and HEAD's commit hash is used.
* 43620 (tweaked): vcs_info git: Reverse the order patches are passed to ↵Daniel Shahaf2018-10-082-1/+4
| | | | | | | | gen-unapplied-string in. This is an incompatible change; see README for details. Tweaks (relative to posted version): tweaked README, removed scalpel (debug print).
* 43617: vcs_info git: During a non-interactive rebase of a detached head, ↵Daniel Shahaf2018-10-081-1/+1
| | | | | | | | | | | | | computer the %b expando correctly. Before this commit, the value of %b was the hash of the commit from the "source" side of the rebase, from .git/rebase-apply/orig-head and .git/rebase-apply/original-commit. This broke the invariant that %b expands to a git-rev-parse(1) expression resolving to what %r expands to. Use .git/rebase-apply/onto instead as, empirically, it contains the correct value.
* 43619: vcs_info git: In non-interactive rebases, always set ↵Daniel Shahaf2018-10-081-10/+3
| | | | $hook_com[git_patches_applied] to a string of the form 'foo bar', never just 'foo'.
* 43618: vcs_info: Don't redefine helper functions on every execution of the ↵Daniel Shahaf2018-10-084-2/+13
| | | | | | | autoloadable outer function. This allows enabling tracing of the helper functions without fned'ing the outer function.
* 43587: vcs_info git: In 'git rebase -i', when computing subjects of ↵Daniel Shahaf2018-10-071-0/+19
| | | | applied-patches, handle an edge case where the subject is not available.
* 43588: vcs_info git: Make sure applied-patches is of the form "$hash ↵Daniel Shahaf2018-10-071-0/+5
| | | | | | | | | | | | $subject" --- that is, has a space and a non-empty second argument --- even with future 'git rebase -i' verbs. Use of '?' is consistent with these precedents: Backends/VCS_INFO_get_data_git:220: printf -v "git_patches_applied[$p]" "%04d ?" "$p" Backends/VCS_INFO_get_data_git:242: git_patches_applied+=("? $subject") Backends/VCS_INFO_get_data_git:244: git_patches_applied+=("?") VCS_INFO_quilt:160: applied[$i]+=" ?" VCS_INFO_quilt:168: unapplied[$i]+=" ?"
* 43586: vcs_info git: Reformat to minimise next diff. No functional change.Daniel Shahaf2018-10-071-2/+13
|
* 43585: vcs_info svn: Recognize working copies in need of an upgrade.Daniel Shahaf2018-10-071-1/+10
|
* unposted: Indicate which use-case each branch handles.Daniel Shahaf2018-10-021-1/+3
|
* 43313 (log message tweaked): vcs_info git: For the branch name, try to find ↵Daniel Shahaf2018-08-241-0/+4
| | | | | | | | | | | | a symbolic name before falling back to a raw commit hash. Ask git-describe(1) and git-name-rev(1) to compute a gitrevisions(7) name in terms of a branch or tag that contains (= is a descendant of, is younger than) HEAD. In this repository, the output changes from "9567bfe..." to "master~1" or "remotes/origin/HEAD~1". This would also happen during bisects, e.g., "bisect/bad~22".
* 43314: vcs_info git: Flatten a nested if.Daniel Shahaf2018-08-241-9/+4
| | | | No functional change.
* 43030: Replace VCS_INFO_realpath() by :Pdana2018-06-167-20/+11
|