Repository navigation
Adds function to remove a stash entry - #7123
iAmWillShepherd wants to merge 7 commits into
Conversation
Having this variable defined makes testing/debugging easier
| await FSE.appendFile(readme, '2') | ||
| await stash(repository, 'master', null) | ||
|
|
||
| await dropDesktopStashEntry(repository, stashToDelete) |
There was a problem hiding this comment.
This test fails with the following error:

What's interesting about this is the stash entry actually is being deleted (inspecting stdout show's the message Dropped stash@{<object Id>} ...). I also did the same command on the CLI and received the following output:
/var/folders/jw/y2nmfz214vn4dvfv_qtxrhd00000gn/T/desktop-empty-repo-119219-33670-cmzh5g.x2vdj(master*) » git stash drop stash@{2a894b9e7a1689ffc741025e098bf8900d775700}
warning: Log for 'stash' only goes back to Tue, 19 Mar 2019 16:38:48 -0500.
warning: Log for 'stash' only goes back to Tue, 19 Mar 2019 16:38:48 -0500.
Dropped stash@{2a894b9e7a1689ffc741025e098bf8900d775700} (2a894b9e7a1689ffc741025e098bf8900d775700)There was a problem hiding this comment.
It looks like you're tripping this code in Git (inside sha1_name.c): https://github.com/git/git/blob/0e94f7aa730b108f7907cfab1b2a7fba965de442/sha1-name.c#L864-L869
if (!(flags & GET_OID_QUIETLY)) {
warning("Log for '%.*s' only goes "
"back to %s.", len, str,
show_date(co_time, co_tz, DATE_MODE(RFC2822)));
}But how did it get there? I ran the test on the command line but with the GIT_TRACE=1 environment variable set to see more details about what happened:
$ GIT_TRACE=1 git stash drop stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}
10:37:01.182543 git.c:670 trace: exec: git-stash drop 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}'
10:37:01.182871 run-command.c:643 trace: run_command: git-stash drop 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}'
10:37:01.215751 git.c:670 trace: exec: git-sh-i18n--envsubst --variables 'usage: $dashless $USAGE'
10:37:01.216302 run-command.c:643 trace: run_command: git-sh-i18n--envsubst --variables 'usage: $dashless $USAGE'
10:37:01.228580 git.c:670 trace: exec: git-sh-i18n--envsubst 'usage: $dashless $USAGE'
10:37:01.229155 run-command.c:643 trace: run_command: git-sh-i18n--envsubst 'usage: $dashless $USAGE'
10:37:01.247404 git.c:419 trace: built-in: git rev-parse --git-dir
10:37:01.256372 git.c:419 trace: built-in: git rev-parse --git-path objects
10:37:01.271582 git.c:419 trace: built-in: git rev-parse --show-prefix
10:37:01.278427 git.c:419 trace: built-in: git rev-parse --show-toplevel
10:37:01.285749 git.c:419 trace: built-in: git rev-parse --git-path index
10:37:01.292660 git.c:419 trace: built-in: git config --get-colorbool color.interactive
10:37:01.299498 git.c:419 trace: built-in: git config --get-color color.interactive.help 'red bold'
10:37:01.306107 git.c:419 trace: built-in: git config --get-color reset
10:37:01.314456 git.c:419 trace: built-in: git rev-parse --symbolic --verify --quiet 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}'
10:37:01.320790 git.c:419 trace: built-in: git rev-parse --verify --quiet 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}^2'
warning: Log for 'stash' only goes back to Wed, 20 Mar 2019 10:34:45 -0300.
10:37:01.337681 git.c:419 trace: built-in: git rev-parse --symbolic-full-name stash
10:37:01.344255 git.c:419 trace: built-in: git rev-parse --verify --quiet 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}^3'
warning: Log for 'stash' only goes back to Wed, 20 Mar 2019 10:34:45 -0300.
10:37:01.351753 git.c:419 trace: built-in: git reflog delete --updateref --rewrite 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}'
10:37:01.360711 git.c:670 trace: exec: git-sh-i18n--envsubst --variables 'Dropped ${REV} ($s)'
10:37:01.361153 run-command.c:643 trace: run_command: git-sh-i18n--envsubst --variables 'Dropped ${REV} ($s)'
10:37:01.372648 git.c:670 trace: exec: git-sh-i18n--envsubst 'Dropped ${REV} ($s)'
10:37:01.373152 run-command.c:643 trace: run_command: git-sh-i18n--envsubst 'Dropped ${REV} ($s)'
Dropped stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7} (d0504000f692e03c6fc84b96c92bc6b9708c0ab7)
10:37:01.384580 git.c:419 trace: built-in: git rev-parse --verify --quiet 'refs/stash@{0}'
This helps show the two places responsible for this message (both are git rev-parse --verify --quiet [oid]):
10:37:01.320790 git.c:419 trace: built-in: git rev-parse --verify --quiet 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}^2'
warning: Log for 'stash' only goes back to Wed, 20 Mar 2019 10:34:45 -0300
...
10:37:01.344255 git.c:419 trace: built-in: git rev-parse --verify --quiet 'stash@{d0504000f692e03c6fc84b96c92bc6b9708c0ab7}^3'
warning: Log for 'stash' only goes back to Wed, 20 Mar 2019 10:34:45 -0300.
I need to context switch on to other things, but I suspect proper error handling in here at some point should help it omit warning: messages like these...
cc0428d to
66c49f5
Compare
|
Closing in favor of #7182. |
Adds a function that returns a list of stash entries.
See tracking issue: #6987