Add space to git-prompt between branch & remote diff
This commit is contained in:
@@ -123,7 +123,8 @@ int main() {
|
||||
remote, "/", branch, "...HEAD --count"));
|
||||
char count[32] = {};
|
||||
fread(count, 1, sizeof(count), process.out);
|
||||
if (process_close(process) == 0 && strcmp("0", trim(count))) {
|
||||
int ahead = process_close(process) == 0 && strcmp("0", trim(count));
|
||||
if (ahead) {
|
||||
append(prompt, 2, " ↑", trim(count));
|
||||
}
|
||||
|
||||
@@ -135,7 +136,7 @@ int main() {
|
||||
memset(count, 0, sizeof(count));
|
||||
fread(count, 1, sizeof(count), process.out);
|
||||
if (process_close(process) == 0 && strcmp("0", trim(count))) {
|
||||
append(prompt, 2, "↓", trim(count));
|
||||
append(prompt, 2, ahead ? "↓" : " ↓", trim(count));
|
||||
}
|
||||
}
|
||||
append(prompt, 1, " ");
|
||||
|
||||
Reference in New Issue
Block a user