@matheusbsbs / matheus-bagliano / commits / facca7f06e
Fork 0

sequencer: rename stash_sha1 to stash_oid

The preferred terminology is to refer to object identifiers as "OIDs". Rename the `stash_sha1` variable to `stash_oid` in order to conform to this. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Apr 7, 2020 at 10:27 UTC facca7f06e7256bf15675657f59ef6f6c883aec3
1 file changed +8 -8
sequencer.c
+8 -8
@@ -3659,23 +3659,23 @@ static enum todo_command peek_command(struct todo_list *todo_list, int offset)
3659
3660 static int apply_autostash(const char *path)
3661 {
3662 - struct strbuf stash_sha1 = STRBUF_INIT;
3662 + struct strbuf stash_oid = STRBUF_INIT;
3663 struct child_process child = CHILD_PROCESS_INIT;
3664 int ret = 0;
3665
3666 - if (!read_oneliner(&stash_sha1, path,
3666 + if (!read_oneliner(&stash_oid, path,
3667 READ_ONELINER_SKIP_IF_EMPTY)) {
3668 - strbuf_release(&stash_sha1);
3668 + strbuf_release(&stash_oid);
3669 return 0;
3670 }
3671 - strbuf_trim(&stash_sha1);
3671 + strbuf_trim(&stash_oid);
3672
3673 child.git_cmd = 1;
3674 child.no_stdout = 1;
3675 child.no_stderr = 1;
3676 argv_array_push(&child.args, "stash");
3677 argv_array_push(&child.args, "apply");
3678 - argv_array_push(&child.args, stash_sha1.buf);
3678 + argv_array_push(&child.args, stash_oid.buf);
3679 if (!run_command(&child))
3680 fprintf(stderr, _("Applied autostash.\n"));
3681 else {
@@ -3687,9 +3687,9 @@ static int apply_autostash(const char *path)
3687 argv_array_push(&store.args, "-m");
3688 argv_array_push(&store.args, "autostash");
3689 argv_array_push(&store.args, "-q");
3690 - argv_array_push(&store.args, stash_sha1.buf);
3690 + argv_array_push(&store.args, stash_oid.buf);
3691 if (run_command(&store))
3692 - ret = error(_("cannot store %s"), stash_sha1.buf);
3692 + ret = error(_("cannot store %s"), stash_oid.buf);
3693 else
3694 fprintf(stderr,
3695 _("Applying autostash resulted in conflicts.\n"
@@ -3698,7 +3698,7 @@ static int apply_autostash(const char *path)
3698 " \"git stash drop\" at any time.\n"));
3699 }
3700
3701 - strbuf_release(&stash_sha1);
3701 + strbuf_release(&stash_oid);
3702 return ret;
3703 }
3704