Skip to content

Commit

Permalink
awk/ref_prefixes.awk: bring comments up to date
Browse files Browse the repository at this point in the history
When the code was changed to add support for the nodef parameter,
the explanatory comments got accidentally left behind.

Update the comments to match the current behavior.

Signed-off-by: Kyle J. McKay <[email protected]>
  • Loading branch information
mackyle committed Aug 19, 2021
1 parent 6594759 commit 777705b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions awk/ref_prefixes.awk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/awk -f

# ref_prefixes - TopGit awk utility script used by tg--awksome
# Copyright (C) 2017,2019 Kyle J. McKay <[email protected]>
# Copyright (C) 2017,2019,2021 Kyle J. McKay <[email protected]>
# All rights reserved.
# License GPLv2

Expand All @@ -18,6 +18,7 @@
# second field of the line will be used otherwise the first
#
# prefix1 may not be a prefix of prefix2 or vice versa
# if prefix1, prefix2 and/or prefixh are invalid exit status will be 2
#
# if prefixh is non-empty then matches for prefix1 or prefix2 must also match
# another line from the input after replacing the prefix1/prefix2 part with
Expand All @@ -30,16 +31,17 @@
#
# ontput according to this table:
#
# any refs match any refs match noerr exit output
# prefix1 prefix prefix2 prefix value status value
# -------------- -------------- ----- ------ -------
# no no any 0 prefix1
# yes no any 0 prefix1
# no yes any 0 prefix2
# yes yes false 1
# yes yes true 0 prefix1
# any refs match any refs match noerr nodef exit output
# prefix1 prefix prefix2 prefix value value status value
# -------------- -------------- ----- ------ ------ -------
# no no any false 0 prefix1
# no no any true 66
# yes no any any 0 prefix1
# no yes any any 0 prefix2
# yes yes false any 65
# yes yes true any 0 prefix1
#
# there is no output when exit status is 1
# there is no output when exit status is not 0
# the output value, if any, will have any trailing slash(es) removed from it
#

Expand Down

0 comments on commit 777705b

Please sign in to comment.