haussli / rancid

RANCiD
Other
114 stars 42 forks source link

control_rancid: Add '--porcelain' flag to 'git status' #8

Closed jude closed 4 years ago

jude commented 4 years ago

The 'git status' command needs the '--short' or '--porcelain' flags for the untracked files to start with a '?' character.

From the 'man git-status' output,'--porcelain' is identical to '--short' but is guaranteed not to change in the future, making it safe for scripts.

Below is an example of 'git status' without and with the --porcelain flag:

jude@pwan:~/projects/rancid (master % u=)$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        blah

nothing added to commit but untracked files present (use "git add" to track)
jude@pwan:~/projects/rancid (master % u=)$ git status --porcelain
?? blah
haussli commented 4 years ago

Thanks! Merged.