mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
git_command: Return None from GetEventTargetPath() if set to empty string
If trace2.eventTarget was set to the empty string, match git behavior and don't write a trace. Bug: 319673783 Change-Id: I02b3884ad97551f8a9d7363c2cbe6b0adee6f73e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/410518 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Commit-Queue: Josip Sokcevic <sokcevic@google.com> Tested-by: Peter Collingbourne <pcc@google.com>
This commit is contained in:
parent
8896b68926
commit
97ca50f5f9
@ -135,6 +135,8 @@ def GetEventTargetPath():
|
|||||||
if retval == 0:
|
if retval == 0:
|
||||||
# Strip trailing carriage-return in path.
|
# Strip trailing carriage-return in path.
|
||||||
path = p.stdout.rstrip("\n")
|
path = p.stdout.rstrip("\n")
|
||||||
|
if path == "":
|
||||||
|
return None
|
||||||
elif retval != 1:
|
elif retval != 1:
|
||||||
# `git config --get` is documented to produce an exit status of `1`
|
# `git config --get` is documented to produce an exit status of `1`
|
||||||
# if the requested variable is not present in the configuration.
|
# if the requested variable is not present in the configuration.
|
||||||
|
Loading…
Reference in New Issue
Block a user