File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # List files with conflicts
4+ #
5+ # Copyright 2022, Joe Block <jpb@unixorn.net>
6+
7+ set -o pipefail
8+ if [[ -n " $DEBUG " ]]; then
9+ set -x
10+ fi
11+
12+ BASENAME=$( basename " ${0} " )
13+
14+ function debug() {
15+ if [[ -n " $DEBUG " ]]; then
16+ echo " $@ "
17+ fi
18+ }
19+
20+ function fail() {
21+ printf ' %s\n' " $1 " >&2 # # Send message to stderr. Exclude >&2 if you don't want it that way.
22+ exit " ${2-1} " # # Return a code specified by $2 or 1 by default.
23+ }
24+
25+ function usage() {
26+ echo " Usage:"
27+ echo
28+ echo " ${BASENAME} "
29+ echo
30+ echo " List files with merge conflicts"
31+ }
32+
33+ if [[ $# -eq 1 ]]; then
34+ if [ " $1 " == ' -h' ] || [ " $1 " == ' --help' ] ; then
35+ usage
36+ exit 0
37+ fi
38+ fi
39+
40+ if [[ $# -ne 0 ]]; then
41+ usage
42+ exit 0
43+ fi
44+
45+ exec git diff --name-only --diff-filter=U
You can’t perform that action at this time.
0 commit comments