Subject: [PATCH 00/11] CodeQL-inspired fixes

From: "Johannes Schindelin via GitGitGadget" <[email-masked]>
Date: Thu, 15 May 2025 13:11:38 +0000

CodeQL [https://codeql.github.com/] pointed out a couple of issues, which
are addressed in this patch series.

Johannes Schindelin (11):
  commit: simplify code
  fetch: carefully clear local variable's address after use
  commit-graph: avoid malloc'ing a local variable
  upload-pack: rename `enum` to reflect the operation
  has_dir_name(): make code more obvious
  fetch: avoid unnecessary work when there is no current branch
  Avoid redundant conditions
  trace2: avoid "futile conditional"
  commit-graph: avoid using stale stack addresses
  bundle-uri: avoid using undefined output of `sscanf()`
  sequencer: stop pretending that an assignment is a condition

 builtin/commit.c   |   2 +-
 builtin/fetch.c    |   3 +-
 bundle-uri.c       |  12 ++--
 commit-graph.c     | 148 +++++++++++++++++++++++----------------------
 help.c             |   2 +-
 read-cache.c       |  55 ++++-------------
 sequencer.c        |   9 ++-
 trace2/tr2_tmr.c   |  24 ++------
 transport-helper.c |   2 +-
 upload-pack.c      |  34 +++++------
 10 files changed, 130 insertions(+), 161 deletions(-)

base-commit: 38af977b81bbf8ce8c0004d3f4046a823ecb30a1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1891%2Fdscho%2Fcodeql-fixes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1891/dscho/codeql-fixes-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1891
-- 
gitgitgadget