Skip to content

Commit 91c080d

Browse files
calvin-wan-googlegitster
authored andcommittedJul 5, 2023
git-compat-util: move alloc macros to git-compat-util.h
alloc_nr, ALLOC_GROW, and ALLOC_GROW_BY are commonly used macros for dynamic array allocation. Moving these macros to git-compat-util.h with the other alloc macros focuses alloc.[ch] to allocation for Git objects and additionally allows us to remove inclusions to alloc.h from files that solely used the above macros. Signed-off-by: Calvin Wan <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da9502f commit 91c080d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+75
-161
lines changed
 

‎add-patch.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "git-compat-util.h"
22
#include "add-interactive.h"
33
#include "advice.h"
4-
#include "alloc.h"
54
#include "editor.h"
65
#include "environment.h"
76
#include "gettext.h"

‎alias.c

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "git-compat-util.h"
22
#include "alias.h"
3-
#include "alloc.h"
43
#include "config.h"
54
#include "gettext.h"
65
#include "strbuf.h"

0 commit comments

Comments
 (0)
Please sign in to comment.