This file is indexed.

/usr/bin/stg-k is in stgit-contrib 0.17.1-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
set -e

# stg-k - execute given StGIT command while preserving local changes

# Uses a temporary patch to save local changes, then execute the given
# command, and restore local changes from the saved patch.  In
# essence, "stg-k pop" is a "stg pop -k" that works better, hence its
# name.

# CAVEATS:
# - this script relies on the operation to run ignoring hidden
# patches, so in 0.12 (where "stg push" can push an hidden patch)
# "stg-k push" will fail midway, albeit with no information loss -
# you'll just have to finish manually.  This is fixed in 0.13
# - running this script to pop all patches in the stack fails, since
# stg-unnew does not support this case.

# Copyright (c) 2007 Yann Dirson <ydirson@altern.org>
# Subject to the GNU GPL, version 2.

stg new __local -m " - local changes (internal patch)"
stg refresh
stg pop

# avoid bad interactions like "stg-k push" not behaving as expected
stg hide __local

stg "$@"

stg unhide __local

stg push __local
stg-unnew