summaryrefslogtreecommitdiff
path: root/Functions/VCS_Info
AgeCommit message (Collapse)AuthorFilesLines
2020-02-17github #48/0002: vcs_info git: properly detect bare repositoriesbrian m. carlson1-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.
2020-02-17github #48/0001: vcs_info git: avoid warnings in bare repositoriesbrian m. carlson1-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.
2019-12-2245114: vcs_info quilt: Improve support for svn-style patch headers.Daniel Shahaf1-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.
2019-12-0344960: vcs_info cvs: Fix infinite loop when /CVS exists.Daniel Shahaf1-3/+9
2019-12-0344961: vcs_info svn: Fix infinite loop when /.svn exists.Daniel Shahaf1-5/+7
2019-12-0344962: vcs_info: Document internal function and variableDaniel Shahaf2-0/+18
2019-11-2944958: vcs_info quilt: Avoid forksDaniel Shahaf1-5/+5
2019-11-2944945: vcs_info git: Optimize detection by running fewer external commands.Daniel Shahaf1-2/+1
2019-01-2744020: VCS_INFO_detect_p4: Fix infinite recursiondana1-1/+0
2018-12-1343879: vcs_info git: Fix fatal error in VCS_INFO_git_getbranch in corner caseDaniel Shahaf1-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.
2018-10-0843620 (tweaked): vcs_info git: Reverse the order patches are passed to ↵Daniel Shahaf2-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).
2018-10-0843617: vcs_info git: During a non-interactive rebase of a detached head, ↵Daniel Shahaf1-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.
2018-10-0843619: vcs_info git: In non-interactive rebases, always set ↵Daniel Shahaf1-10/+3
$hook_com[git_patches_applied] to a string of the form 'foo bar', never just 'foo'.
2018-10-0843618: vcs_info: Don't redefine helper functions on every execution of the ↵Daniel Shahaf4-2/+13
autoloadable outer function. This allows enabling tracing of the helper functions without fned'ing the outer function.
2018-10-0743587: vcs_info git: In 'git rebase -i', when computing subjects of ↵Daniel Shahaf1-0/+19
applied-patches, handle an edge case where the subject is not available.
2018-10-0743588: vcs_info git: Make sure applied-patches is of the form "$hash ↵Daniel Shahaf1-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]+=" ?"
2018-10-0743586: vcs_info git: Reformat to minimise next diff. No functional change.Daniel Shahaf1-2/+13
2018-10-0743585: vcs_info svn: Recognize working copies in need of an upgrade.Daniel Shahaf1-1/+10
2018-10-02unposted: Indicate which use-case each branch handles.Daniel Shahaf1-1/+3
2018-08-2443313 (log message tweaked): vcs_info git: For the branch name, try to find ↵Daniel Shahaf1-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".
2018-08-2443314: vcs_info git: Flatten a nested if.Daniel Shahaf1-9/+4
No functional change.
2018-06-1643030: Replace VCS_INFO_realpath() by :Pdana7-20/+11
2017-12-30unposted: vcs_info: Add docstrings to the internal functions ↵Daniel Shahaf2-1/+8
VCS_INFO_formats and VCS_INFO_set.
2017-10-2541952: Use HGPLAIN instead of HGRCPATH in VCS_INFO_get_data_hgAlexey Sokolov1-2/+2
Fixes prompt indicator in case if the repository requires a non-default feature. With HGRCPATH, it results in: abort: repository requires features unknown to this Mercurial: ... (see https://mercurial-scm.org/wiki/MissingRequirement for more information) Which, in turn, results in "default" getting reported regardless of what is the current state of the repo.
2017-08-2241565: vcs_info patch2subject: Support `svn log -r N --diff` output.Daniel Shahaf1-2/+9
2017-02-21Julien Nicoulaud: 40586: discard stderrBarton E. Schaefer1-1/+1
2017-02-0940492: vcs_info: Escape '%' signs in payloads.Daniel Shahaf2-0/+15
Test case: a patch whose subject is '%Sfoo%sbar'. ('S' and 's' are expandos both in prompts and in the 'formats' style.)
2017-02-04unposted: vcs_info git: Fix typo in manual.Daniel Shahaf1-0/+1
2017-02-0340480: vcs_info set-patch-format: Eliminate the remaining code duplication.Daniel Shahaf4-30/+19
2017-02-0340479: vcs_info set-patch-format: Prepare for more code sharing between the ↵Daniel Shahaf4-6/+12
callers. This changes hook invocation order in the hg backend.
2017-02-0340481: vcs_info hg: Pass arguments to the set-patch-format hook.Daniel Shahaf1-1/+1
2017-02-0340478: vcs_info set-patch-format: Guard against empty variable elision.Daniel Shahaf1-2/+2
2017-02-0340476: vcs_info $backend_misc: Document at the right point, provide in quilt ↵Daniel Shahaf1-0/+1
'standalone' mode.
2017-01-2540403/0004: vcs_info set-patch-format helper: Part #4.Daniel Shahaf4-20/+20
This also fixes the %a (${hook_com[all-n]}) expando in the hg backend: before this change, it counted only unapplied changes.
2017-01-2540403/0003: vcs_info set-patch-format helper: Part #3.Daniel Shahaf4-21/+15
2017-01-2540403/0002: vcs_info set-patch-format helper: Part #2.Daniel Shahaf4-21/+16
Not all callers reset ${hook_com}, but those that don't, immediately overwrite it a few lines later.
2017-01-2540403/0001: vcs_info set-patch-format helper: Part #1.Daniel Shahaf5-28/+24
2017-01-2540401: vcs_info git: Fix the %c patch-format expando.Daniel Shahaf1-3/+3
Before this change, ${git_unapplied_s} was unused and the %c (${hook_com[unapplied]}) expando evaluated to the number of digits in the string returned by the gen-unapplied-string hook (or to the number of digits in the number of unapplied patches, when there was no such hook).
2017-01-2540392: vcs_info patch2subject: Support `git show` output.Daniel Shahaf1-0/+17
2016-12-1640149: vcs_info git: Avoid a fork.Daniel Shahaf1-1/+1
2016-12-04unposted: vcs_info git: Handle rebase-apply sequences with >=10000 patches.Daniel Shahaf1-3/+6
Review-by: Frank Terbeck
2016-12-0440074: vcs_info git: rfc822-unfold rebase-apply patch subjects when ↵Daniel Shahaf1-8/+7
msg-clean is unavailable. Example (in this repository): git -c merge.merge-changelog.driver=/bin/false rebase --onto=1955cce^^ 1955cce^ 1955cce
2016-12-03Get subject of current patch in rebase-apply modeDaniel Hahler1-0/+9
2016-12-01unposted: vcs_info: Break out VCS_INFO_quilt-patch2subject into ↵Daniel Shahaf3-48/+52
VCS_INFO_patch2subject ... so other places can use it; compare 40030 in the 39990 thread.
2016-10-3139786: vcs_info (hg): Use native hexdump implementation instead of external ↵Daniel Shahaf3-3/+21
command. Fixes issue whereby the external command would print "*" for repeated octets. Includes comment change, cf 39790.
2016-09-2439423: vcs_info git: Produce nicer applied-string messages for 'exec' actions.Daniel Shahaf1-2/+6
This changes the behaviour on "unknown" git-rebase actions (those other than pick/reword/edit/fixup/squash/execute).
2016-08-2239046 + 39061: New :P history modifier.Daniel Shahaf1-1/+1
2016-06-0638610: vcs_info quilt: Extract a patch subject, 2.0.Daniel Shahaf1-4/+38
2016-06-0638609: vcs_info quilt: Factor out a helper function. No functional change.Daniel Shahaf1-13/+22
2016-01-15unposted: Fix typo in comment.Daniel Shahaf1-2/+2