File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,22 @@ For shell scripts specifically (not exhaustive):
35
35
36
36
- Case arms are indented at the same depth as case and esac lines.
37
37
38
+ - Redirection operators should be written with space before, but no
39
+ space after them. In other words, write 'echo test >"$file"'
40
+ instead of 'echo test> $file' or 'echo test > $file'. Note that
41
+ even though it is not required by POSIX to double-quote the
42
+ redirection target in a variable (as shown above), our code does so
43
+ because some versions of bash issue a warning without the quotes.
44
+
38
45
- We prefer $( ... ) for command substitution; unlike ``, it
39
46
properly nests. It should have been the way Bourne spelled
40
47
it from day one, but unfortunately isn't.
41
48
49
+ - If you want to find out if a command is available on the user's
50
+ $PATH, you should use 'type <command>', instead of 'which <command>'.
51
+ The output of 'which' is not machine parseable and its exit code
52
+ is not reliable across platforms.
53
+
42
54
- We use POSIX compliant parameter substitutions and avoid bashisms;
43
55
namely:
44
56
Original file line number Diff line number Diff line change @@ -14,4 +14,11 @@ Fixes since v1.7.9.2
14
14
* "git add --refresh <pathspec>" used to warn about unmerged paths
15
15
outside the given pathspec.
16
16
17
+ * The commit log template given with "git merge --edit" did not have
18
+ a short instructive text like what "git commit" gives.
19
+
20
+ * "gitweb" used to drop warnings in the log file when "heads" view is
21
+ accessed in a repository whose HEAD does not point at a valid
22
+ branch.
23
+
17
24
Also contains minor fixes and documentation updates.
Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ prep_for_email()
85
85
oldrev=$( git rev-parse $1 )
86
86
newrev=$( git rev-parse $2 )
87
87
refname=" $3 "
88
- maxlines=$4
89
88
90
89
# --- Interpret
91
90
# 0000->1234 (create)
@@ -461,7 +460,7 @@ generate_delete_branch_email()
461
460
{
462
461
echo " was $oldrev "
463
462
echo " "
464
- echo $LOGEND
463
+ echo $LOGBEGIN
465
464
git show -s --pretty=oneline $oldrev
466
465
echo $LOGEND
467
466
}
@@ -561,7 +560,7 @@ generate_delete_atag_email()
561
560
{
562
561
echo " was $oldrev "
563
562
echo " "
564
- echo $LOGEND
563
+ echo $LOGBEGIN
565
564
git show -s --pretty=oneline $oldrev
566
565
echo $LOGEND
567
566
}
@@ -626,7 +625,7 @@ generate_delete_general_email()
626
625
{
627
626
echo " was $oldrev "
628
627
echo " "
629
- echo $LOGEND
628
+ echo $LOGBEGIN
630
629
git show -s --pretty=oneline $oldrev
631
630
echo $LOGEND
632
631
}
You can’t perform that action at this time.
0 commit comments