Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: git/git
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 33a22c1a88
Choose a base ref
...
head repository: git/git
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: afda36dbf3
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 18, 2020

  1. wt-status: show sparse checkout status as well

    Some of the early feedback of folks trying out sparse-checkouts at
    $dayjob is that sparse checkouts can sometimes be disorienting; users
    can forget that they had a sparse-checkout and then wonder where files
    went.  Add some output to 'git status' in the form of a simple line that
    states:
    
        You are in a sparse checkout with 35% of files present.
    
    where, obviously, the exact figure changes depending on what percentage
    of files from the index do not have the SKIP_WORKTREE bit set.
    
    Signed-off-by: Elijah Newren <newren@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    newren authored and gitster committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    051df3c View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2020

  1. git-prompt: document how in-progress operations affect the prompt

    Signed-off-by: Elijah Newren <newren@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    newren authored and gitster committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    30b00f0 View commit details
    Browse the repository at this point in the history
  2. git-prompt: include sparsity state as well

    git-prompt includes the current branch, a bunch of single character
    mini-state displayers, and some much longer in-progress state
    notifications.  The current branch is always shown.  The single
    character mini-state displayers are all off by default (they are not
    self explanatory) but each has an environment variable for turning it
    on.  The in-progress state notifications provide no configuration
    options for turning them off, and can be up to 15 characters long (e.g.
    "|REBASE (12/18)" or "|CHERRY-PICKING").
    
    The single character mini-state tends to be used for things like "Do you
    have any stashes in refs/stash?" or "Are you ahead or behind of
    upstream?".  These are things which users can take advantage of but do
    not affect most normal git operations.  The in-progress states, by
    contrast, suggest the user needs to interact differently and may also
    prevent some normal operations from succeeding (e.g. git switch may show
    an error instead of switching branches).
    
    Sparsity is like the in-progress states in that it suggests a
    fundamental different interaction with the repository (many of the files
    from the repository are not present in your working copy!).  A few
    commits ago added sparsity information to wt_longstatus_print_state(),
    grouping it with other in-progress state displays.  We do similarly here
    with the prompt and show the extra state, by default, with an extra
        |SPARSE
    This state can be present simultaneously with the in-progress states, in
    which case it will appear before the other states; for example,
        (branchname|SPARSE|REBASE 6/10)
    
    The reason for showing the "|SPARSE" substring before other states is to
    emphasize those other states.  Sparsity is probably not going to change
    much within a repository, while temporary operations will.  So we want
    the state changes related to temporary operations to be listed last, to
    make them appear closer to where the user types and make them more
    likely to be noticed.
    
    The fact that sparsity isn't just cached metadata or additional
    information is what leads us to show it more similarly to the
    in-progress states, but the fact that sparsity is not transient like the
    in-progress states might cause some users to want an abbreviated
    notification of sparsity state or perhaps even be able to turn it off.
    Allow GIT_PS1_COMPRESSSPARSESTATE to be set to request that it be
    shortened to a single character ('?'), and GIT_PS1_OMITSPARSESTATE to be
    set to request that sparsity state be omitted from the prompt entirely.
    
    Signed-off-by: Elijah Newren <newren@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
    newren authored and gitster committed Jun 22, 2020
    Configuration menu
    Copy the full SHA
    afda36d View commit details
    Browse the repository at this point in the history
Loading