From: Michael J Gruber <git@drmicha.warpmail.net>
To: "Daniel Nyström" <daniel.nystrom@timeterminal.se>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [Q] Mark files for later commit?
Date: Tue, 29 Mar 2011 14:01:53 +0200 [thread overview]
Message-ID: <4D91CA31.20908@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTik33jiKipcv8d8tY_FXa2nE0BtBdi9vro0gkdQc@mail.gmail.com>
Daniel Nyström venit, vidit, dixit 29.03.2011 11:18:
> Den 29 mars 2011 09:51 skrev Junio C Hamano <gitster@pobox.com>:
>>> Daniel Nyström <daniel.nystrom@timeterminal.se> writes:
>>>> How would you like a git feature like described above, marking files
>>>> for later inclusion?
>>>
>>> That does not sound like a feature but merely a source of confusion.
>>
>> If that is the case, then probably you shouldn't be even updating the
>> "changelog" file constantly to begin with. Instead, how about creating a
>> separate "changelog+" file that is not tracked, and keep its contents
>> maintained continuously so stuff won't be forgotten? When the time to
>> release comes, you can "mv changelog changelog", and commit it.
>
> If we ignore this particular case, how would a "git hold <file>..." feature do?
> --
> $ git status
> # On branch master
> # Changed but not updated:
> # (use "git add <file>..." to update what will be committed)
> # (use "git checkout -- <file>..." to discard changes in working directory)
> #
> # modified: package/qt/qt.mk
> #
> # Changed but on hold:
> # (use "git add --holds <file>..." to update what will be committed)
> #
> # modified: CHANGES
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> --
> Would there be other use-cases?
As Junio pointed out, your "hold file" (ChangeLog+) is really not
versioned (tracked) at all, so it has no place in the worktree.
Otherwise you'll have constant nagging during the release cycle one way
or the other, if you want git to remind you of the files on hold. If you
don't need the reminder, git does not need to know about the file.
Simply store it somewhere else (such as in .git/description if you don't
use that, or under .git/info/).
Michael
next prev parent reply other threads:[~2011-03-29 12:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-29 6:04 [Q] Mark files for later commit? Daniel Nyström
2011-03-29 6:49 ` Junio C Hamano
2011-03-29 7:09 ` Michael J Gruber
2011-03-29 7:38 ` Johan Herland
2011-03-29 7:45 ` Michael J Gruber
2011-03-29 7:51 ` Junio C Hamano
2011-03-29 9:18 ` Daniel Nyström
2011-03-29 12:01 ` Michael J Gruber [this message]
2011-03-29 12:15 ` Daniel Nyström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D91CA31.20908@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=daniel.nystrom@timeterminal.se \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).