post question
This commit is contained in:
parent
2951793905
commit
04acb0308a
1 changed files with 30 additions and 0 deletions
30
doc/forum/Checking_that_everything_is_committed.mdwn
Normal file
30
doc/forum/Checking_that_everything_is_committed.mdwn
Normal file
|
@ -0,0 +1,30 @@
|
|||
I use this to check that git repos have nothing untracked:
|
||||
|
||||
# 1st command: check index against HEAD
|
||||
# 2nd command: check working tree against index
|
||||
# 3rd command: check for untracked files
|
||||
# 4th command: check for stashes
|
||||
git diff-index --quiet --cached HEAD \
|
||||
&& git diff-files --quiet \
|
||||
&& test -z "$(git status --porcelain)" \
|
||||
&& test -z "$(git stash list)"
|
||||
|
||||
The call to git-diff-files(1) fails in a v7 repo with output like this (if I drop the `--quiet`):
|
||||
|
||||
spwhitton@iris:~/lib/athena-apt>git diff-files
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/buster-backports/main/binary-amd64/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/buster-backports/main/binary-i386/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/buster/main/binary-amd64/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/buster/main/binary-i386/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/rc-buggy/main/binary-amd64/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/rc-buggy/main/binary-i386/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/sid/main/binary-amd64/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/sid/main/binary-i386/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/stretch/main/binary-amd64/Packages
|
||||
:100644 100644 f8e47b9532ea17ac825c39bddc35dbd68f120a46 0000000000000000000000000000000000000000 M dists/stretch/main/binary-i386/Packages
|
||||
|
||||
Is there a git-annex command that I can run to normalise my repo so that git-diff-files(1) produces no output? Or does it not make sense to run git-diff-files(1) in a v7 repo?
|
||||
|
||||
Thanks.
|
||||
|
||||
--spwhitton
|
Loading…
Reference in a new issue