-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(git): add --dry-run option for rm command #2056
fix(git): add --dry-run option for rm command #2056
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Overviewsrc/git.ts:Info:Script: function (out) {
const output = filterMessages(out);
if (output.startsWith("fatal:")) {
return [];
}
return output.split("\n").map((line) => {
return {
name: line.substring(0, 7),
icon: "fig://icon?type=node",
description: line.substring(7),
};
});
} Script: function (out) {
const output = filterMessages(out);
if (output.startsWith("fatal:")) {
return [];
}
return output.split("\n").map((line) => {
return {
name: line.substring(0, 7),
icon: "fig://icon?type=node",
description: line.substring(7),
};
});
} Script: function (out) {
const output = filterMessages(out);
if (output.startsWith("fatal:")) {
return [];
}
return output.split("\n").map((file) => {
return {
// account for conventional commit messages
name: file.split(":").slice(2).join(":"),
insertValue: file.split(":")[0],
icon: `fig://icon?type=node`,
};
});
} Script: function (out, tokens) {
const output = filterMessages(out);
if (output.startsWith("fatal:")) {
return [];
}
return output.split("\n").map((file) => {
return {
name: file,
insertValue: (!tokens.includes("--") ? "-- " : "") + file,
icon: `fig://icon?type=file`,
description: "Staged file",
};
});
} Script: function (out) {
const remoteURLs = out.split("\n").reduce((dict, line) => {
const pair = line.split("\t");
const remote = pair[0];
console.log(remote, pair);
const url = pair[1].split(" ")[0];
dict[remote] = url;
return dict;
}, {});
return Object.keys(remoteURLs).map((remote) => {
const url = remoteURLs[remote];
let icon = "box";
if (url.includes("github.com")) {
icon = "github";
}
if (url.includes("gitlab.com")) {
icon = "gitlab";
}
if (url.includes("heroku.com")) {
icon = "heroku";
}
return {
name: remote,
icon: `fig://icon?type=${icon}`,
description: "Remote",
};
});
} Script: function (output) {
return output.split("\n").map((tag) => ({
name: tag,
icon: "🏷️",
}));
} Script: function (context) {
if (context.includes("--staged") || context.includes("--cached")) {
return `git --no-optional-locks status --short | sed -ne '/^M /p' -e '/A /p'`;
} else {
return `git --no-optional-locks status --short | sed -ne '/M /p' -e '/A /p'`;
}
} Single Scripts:
URLs:
|
Hello @remnantkevin,
Please add a 👍 as a reaction to this comment to show that you read this. |
I have read the CLA Document and I hereby sign the CLA |
LGMT, thanks! |
No description provided.