Commit abd0cd3
refs: new public ref function: safe_create_reflog
The safe_create_reflog function creates a reflog, if it does not
already exist.
The log_ref_setup function becomes private and gains a force_create
parameter to force the creation of a reflog even if log_all_ref_updates
is false or the refname is not one of the special refnames.
The new parameter also reduces the need to store, modify, and restore
the log_all_ref_updates global before reflog creation.
In a moment, we will use this to add reflog creation commands to
git-reflog.
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 4e2bef5 commit abd0cd3
3 files changed
+26
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
623 | | - | |
624 | 622 | | |
625 | | - | |
| 623 | + | |
626 | 624 | | |
627 | 625 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
634 | 629 | | |
635 | 630 | | |
636 | 631 | | |
637 | 632 | | |
638 | 633 | | |
639 | 634 | | |
| 635 | + | |
640 | 636 | | |
641 | 637 | | |
642 | 638 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3063 | 3063 | | |
3064 | 3064 | | |
3065 | 3065 | | |
3066 | | - | |
3067 | | - | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
3068 | 3073 | | |
3069 | 3074 | | |
3070 | 3075 | | |
| |||
3073 | 3078 | | |
3074 | 3079 | | |
3075 | 3080 | | |
3076 | | - | |
| 3081 | + | |
3077 | 3082 | | |
3078 | 3083 | | |
3079 | 3084 | | |
| |||
3108 | 3113 | | |
3109 | 3114 | | |
3110 | 3115 | | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
3111 | 3127 | | |
3112 | 3128 | | |
3113 | 3129 | | |
| |||
3144 | 3160 | | |
3145 | 3161 | | |
3146 | 3162 | | |
3147 | | - | |
| 3163 | + | |
3148 | 3164 | | |
3149 | 3165 | | |
3150 | 3166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments